Changeset 2109624
- Timestamp:
- 06/20/2019 03:27:17 PM (7 years ago)
- Location:
- wpstudio-mobile-redirect/trunk
- Files:
-
- 2 edited
-
genesis-mobile-redirect.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpstudio-mobile-redirect/trunk/genesis-mobile-redirect.php
r1835148 r2109624 4 4 * Plugin URI: http://wpstud.io/plugins 5 5 * Description: A simple-to-use plugin for setting a different homepage for mobile devices. 6 * Version: 1. 0.16 * Version: 1.1 7 7 * Author: Frank Schrijvers 8 8 * Author URI: http://www.wpstud.io … … 46 46 } 47 47 48 register_activation_hook( __FILE__, 'gmr_activation_check' );49 /**50 * This function runs on plugin activation. It checks to make sure the required51 * minimum Genesis version is installed. If not, it deactivates itself.52 */53 function gmr_activation_check() {54 48 55 $latest = '2.0'; 56 $theme_info = wp_get_theme( 'genesis' ); 57 58 if ( ! function_exists( 'genesis_pre' ) ) { 59 60 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin. 61 /* translators: Genesis Framework version check. */ 62 wp_die( sprintf( __( 'Sorry, you can\'t activate %1$sGenesis Slide-in Widget unless you have installed the %3$sGenesis Framework%4$s. Go back to the %5$sPlugins Page%4$s.', 'wpstudio-mobile-redirect' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) ); 63 } 64 65 66 if ( version_compare( $theme_info['Version'], $latest, '<' ) ) { 67 68 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin. 69 /* translators: Genesis Framework version check. */ 70 wp_die( sprintf( __( 'Sorry, you can\'t activate %1$sGenesis Slide-in Widget unless you have installed the %3$sGenesis %4$s%5$s. Go back to the %6$sPlugins Page%5$s.', 'wpstudio-mobile-redirect' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) ); 71 72 } 73 74 } 75 76 add_action( 'after_switch_theme', 'gmr_deactivate_check' ); 77 /** 78 * This function runs on plugin deactivation. 79 */ 80 function gmr_deactivate_check() { 81 82 if ( ! function_exists( 'genesis_pre' ) ) { 83 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin 84 } 85 86 } 87 88 add_action( 'after_setup_theme', 'gmr_init' ); 49 add_action( 'genesis_setup', 'gmr_init' ); 89 50 /** 90 51 * Load required files. -
wpstudio-mobile-redirect/trunk/readme.txt
r1835148 r2109624 3 3 Tags: mobile redirect, redirect, index, mobile, detection, homepage, redirect homepage, mediaqueries, genesis, Genesis Framework, genesiswp 4 4 Requires at least: 3.6 5 Tested up to: 4.9.46 Stable tag: 1. 0.15 Tested up to: 5.2.2 6 Stable tag: 1.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 == Changelog == 42 42 43 = 1.1 = 44 * Update: fix for Genesis 3.0 45 * Removed genesis_pre function check on activation 46 43 47 = 1.0.1 = 44 48 * Update: fix for Genesis 2.6
Note: See TracChangeset
for help on using the changeset viewer.