Plugin Directory

Changeset 2109609


Ignore:
Timestamp:
06/20/2019 03:10:10 PM (7 years ago)
Author:
frankschrijvers
Message:

Removed genesis_pre function check on activation

Location:
genesis-slide-in-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • genesis-slide-in-widget/trunk/genesis-slide-in-widget.php

    r1835225 r2109609  
    2929}
    3030
    31 register_activation_hook( __FILE__, 'wpstudio_gsw_activation_check' );
    32 /**
    33  * This function runs on plugin activation. It checks to make sure the required
    34  * 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 }
    6331
    6432add_action( 'wp_enqueue_scripts', 'wpstudio_gsw_load_scripts', 99 );
     
    8250
    8351
    84 add_action( 'after_setup_theme', 'wpstudio_gsw_init' );
     52add_action( 'genesis_setup', 'wpstudio_gsw_init' );
    8553function wpstudio_gsw_init() {
    8654
  • genesis-slide-in-widget/trunk/readme.txt

    r1835225 r2109609  
    33Tags: overlay, genesis, widget, featured content, Genesis Framework, genesiswp, slide, widget-only, widgets, slide-in
    44Requires at least: 3.6
    5 Tested up to: 4.9.4
    6 Stable tag: 1.4.4
     5Tested up to: 5.2.2
     6Stable tag: 1.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    47472. Screenshot Admin panel
    4848
     49= 1.5 =
     50* Update: fix for Genesis 3.0
     51* Removed genesis_pre function check on activation
    4952
    5053== Changelog ==
Note: See TracChangeset for help on using the changeset viewer.