Changeset 2109609
- Timestamp:
- 06/20/2019 03:10:10 PM (7 years ago)
- Location:
- genesis-slide-in-widget/trunk
- Files:
-
- 2 edited
-
genesis-slide-in-widget.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
genesis-slide-in-widget/trunk/genesis-slide-in-widget.php
r1835225 r2109609 29 29 } 30 30 31 register_activation_hook( __FILE__, 'wpstudio_gsw_activation_check' );32 /**33 * This function runs on plugin activation. It checks to make sure the required34 * minimum Genesis version is installed. If not, it deactivates itself.35 */36 function wpstudio_gsw_activation_check() {37 38 $latest = '2.0';39 $theme_info = wp_get_theme( 'genesis' );40 41 if ( ! function_exists( 'genesis_pre' ) ) {42 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.43 /* translators: Genesis Framework version check. */44 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.', 'genesis-overlay-widget' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) );45 }46 47 if ( version_compare( $theme_info['Version'], $latest, '<' ) ) {48 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.49 /* translators: Genesis Framework version check. */50 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.', 'genesis-overlay-widget' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) );51 }52 53 }54 55 add_action( 'after_switch_theme', 'wpstudio_gsw_deactivate_check' );56 function wpstudio_gsw_deactivate_check() {57 58 if ( ! function_exists( 'genesis_pre' ) ) {59 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.60 }61 62 }63 31 64 32 add_action( 'wp_enqueue_scripts', 'wpstudio_gsw_load_scripts', 99 ); … … 82 50 83 51 84 add_action( ' after_setup_theme', 'wpstudio_gsw_init' );52 add_action( 'genesis_setup', 'wpstudio_gsw_init' ); 85 53 function wpstudio_gsw_init() { 86 54 -
genesis-slide-in-widget/trunk/readme.txt
r1835225 r2109609 3 3 Tags: overlay, genesis, widget, featured content, Genesis Framework, genesiswp, slide, widget-only, widgets, slide-in 4 4 Requires at least: 3.6 5 Tested up to: 4.9.46 Stable tag: 1. 4.45 Tested up to: 5.2.2 6 Stable tag: 1.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 47 47 2. Screenshot Admin panel 48 48 49 = 1.5 = 50 * Update: fix for Genesis 3.0 51 * Removed genesis_pre function check on activation 49 52 50 53 == Changelog ==
Note: See TracChangeset
for help on using the changeset viewer.