This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Redirect WPML + Geotargeting shared by thomsonreuters.com | |
| */ | |
| function redirect_ip_country(){ | |
| global $wpdb, $post, $sitepress; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Change default WPML Woocommerce currency | |
| * depending on user's country | |
| * https://timersys.com/?p=21090&preview=true | |
| */ | |
| function geot_woo_default_currency( $currency ) { | |
| if( ! function_exists( 'geot_country_code' ) || isset( $_COOKIE['geot_currency'] ) ) | |
| return $currency; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Remove product-category slug | |
| Plugin URI: https://timersys.com/ | |
| Description: Check if url slug matches a woocommerce product category and use it instead | |
| Version: 0.1 | |
| Author: Timersys | |
| License: GPLv2 or later | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Change geotargeting hook to be able to use template functions | |
| * */ | |
| add_action('init', 'change_geot_hook',5); | |
| function change_geot_hook(){ | |
| global $geot; | |
| remove_action( 'init', array( $geot->public, 'geot_redirections' )); | |
| add_action( 'template_redirect', array( $geot->public, 'geot_redirections' )); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Create a whitelist for geotargeting redirections | |
| * to be used with Geotargeting Pro plugin https://timersys.com/plugins/geotargeting-pro/ | |
| * */ | |
| // add filter before redirects are performed | |
| add_action( 'init', 'geot_redirects', 9 ); | |
| function geot_redirects() { | |
| add_filter( 'geot/perform_redirect', 'geot_redirect_whitelist'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Custom Email Template | |
| * | |
| * @wordpress-plugin | |
| * Plugin Name: Custom Email Template | |
| * Plugin URI: http://wordpress.org/plugins/email-templates | |
| * Description: Custom template for Email templates plugin | |
| * Version: 1.0.0 | |
| * Author: Damian Logghe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Geotargeting dropdown | |
| * @link https://timersys.com/geotargeting/ | |
| * | |
| * @wordpress-plugin | |
| * Plugin Name: GeoTargeting Pro Custom Redirects | |
| * Plugin URI: https://timersys.com/geotargeting/ | |
| * Description: Geo Targeting custom dropdown widget values | |
| * Version: 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Show different WordPress menus depending on user country | |
| * by using Geotargeting plugin API functions | |
| * https://timersys.com/plugins/geotargeting-pro/ | |
| **/ | |
| if( function_exists( 'geot_target' ) ) { | |
| //USA menu | |
| if( geot_target( 'US' ) ) { | |
| wp_nav_menu( array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * In Geotargeting Pro plugin you can print countries and states using shortcodes | |
| * These are printed in English by default but Maxmind provide more languages | |
| * Get WordPress Geotargeting plugin in https://timersys.com/plugins/geotargeting-pro/ | |
| * Cities languages are only included in premium databases or insights services ( https://www.maxmind.com/en/geoip2-precision-services&rld=timersys ) | |
| * Avilable languages: | |
| * de German | |
| * en English English names may still include accented characters if that is the accepted spelling in English. In other words, English does not mean ASCII. | |
| * es Spanish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Function to open or close Popups programatically using Javascript | |
| * Popup Plugin https://wordpress.org/plugins/popups/ | |
| * | |
| **/ | |
| SPU.show(120); | |
| SPU.hide(120, false, true); |