Plugin Directory

Changeset 2109586


Ignore:
Timestamp:
06/20/2019 02:43:39 PM (7 years ago)
Author:
frankschrijvers
Message:

Removed genesis_pre function check on activation

Location:
wpstudio-login-modal-box/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpstudio-login-modal-box/trunk/genesis-login-modal-box.php

    r1956786 r2109586  
    44 * Plugin URI: https://wpstud.io/plugins
    55 * Description: Login modal box
    6  * Version: 1.2.4
     6 * Version: 1.3
    77 * Author: Frank Schrijvers
    88 * Author URI: https://www.wpstud.io
     
    5050add_action( 'init', 'wps_load_plugin_textdomain' );
    5151
    52 /**
    53  * This function runs on plugin activation. It checks to make sure the required
    54  * minimum Genesis version is installed. If not, it deactivates itself.
    55  */
    56 function wps_glmb_activation_check() {
    57 
    58     $latest     = '2.0';
    59     $theme_info = wp_get_theme( 'genesis' );
    60 
    61     if ( ! function_exists( 'genesis_pre' ) ) {
    62 
    63         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    64         wp_die( sprintf( __( 'Sorry, you can not activate the Genesis Slide-in Widget unless you have installed the Genesis Framework. Go back to the Plugins Page.', 'wpstudio-login-modal-box' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) );
    65 
    66     }
    67 
    68     if ( version_compare( $theme_info['Version'], $latest, '<' ) ) {
    69 
    70         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    71         wp_die( sprintf( __( 'Sorry, you can not activate the Genesis Slide-in Widget unless you have installed the Genesis Framework. Go back to the Plugins Page.', 'wpstudio-login-modal-box' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) );
    72 
    73     }
    74 
    75 }
    76 
    77 /**
    78  * This function runs on plugin deactivation.
    79  */
    80 function wps_glmb_deactivate_check() {
    81 
    82     if ( ! function_exists( 'genesis_pre' ) ) {
    83 
    84         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    85 
    86     }
    87 
    88 }
    89 
    90 add_action( 'after_switch_theme', 'wps_glmb_deactivate_check', 10 );
    91 
    9252
    9353/**
     
    11070function wps_glmb_init() {
    11171
    112     if ( function_exists( 'genesis_pre' ) ) {
    113 
    11472        require dirname( __FILE__ )  . '/inc/glmb-admin.php';
    11573        include dirname( __FILE__ ) . '/inc/glmb-frontend.php';
    11674        new WPSTUDIO_Glmb_Settings();
    11775
    118     }
    119 
    12076}
    12177
    122 add_action( 'after_setup_theme', 'wps_glmb_init' );
     78add_action( 'genesis_setup', 'wps_glmb_init' );
    12379
    12480
  • wpstudio-login-modal-box/trunk/readme.txt

    r1956786 r2109586  
    33Tags: overlay, genesis, login, modal, Genesis Framework, genesiswp, login form, custom login, wordpress login
    44Requires at least: 3.6
    5 Tested up to: 4.9.8
    6 Stable tag: 1.2.4
     5Tested up to: 5.2.2
     6Stable tag: 1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4545== Changelog ==
    4646
     47=1.3 =
     48* Update: fix for Genesis 3.0
     49* Removed genesis_pre function check on activation
     50
    4751=1.2.4 =
    4852* Bug fix: fixed check wich causes a error 500 if switched to an none Genesis theme.
Note: See TracChangeset for help on using the changeset viewer.