Plugin Directory

Changeset 2109594


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

Removed genesis_pre function check on activation

Location:
wpstudio-countdown/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpstudio-countdown/trunk/genesis-countdown.php

    r1835120 r2109594  
    44 * Plugin URI: http://wpstud.io/plugins
    55 * Description: The Genesis Countdown is a simple-to-use plugin for adding a Countdown to your Genesis Theme, using a widget.
    6  * Version: 1.1.4
     6 * Version: 1.2
    77 * Author: Frank Schrijvers
    88 * Author URI: http://www.wpstud.io
     
    4646require_once ABSPATH . 'wp-admin/includes/plugin.php';
    4747
    48 register_activation_hook( __FILE__, 'wps_gcd_activation_check' );
    49 /**
    50  * This function runs on plugin activation. It checks to make sure the required
    51  * minimum Genesis version is installed. If not, it deactivates itself.
    52  */
    53 function wps_gcd_activation_check() {
    54 
    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 Countdown unless you have installed the %3$sGenesis Framework%4$s. Go back to the %5$sPlugins Page%4$s.', 'wpstudio-countdown' ), '<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 Countdown unless you have installed the %3$sGenesis %4$s%5$s. Go back to the %6$sPlugins Page%5$s.', 'wpstudio-countdown' ), '<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 /**
    77  * This function runs on plugin deactivation.
    78  */
    79 function wps_gcd_deactivate_check() {
    80 
    81     if ( ! function_exists( 'genesis_pre' ) ) {
    82         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    83     }
    84 
    85 }
    86 add_action( 'after_switch_theme', 'wps_gcd_deactivate_check' );
    8748
    8849/**
     
    11879
    11980}
    120 add_action( 'after_setup_theme', 'wps_gcd_init' );
     81add_action( 'genesis_setup', 'wps_gcd_init' );
    12182
    12283/**
  • wpstudio-countdown/trunk/readme.txt

    r1835120 r2109594  
    33Tags: countdown, clock, counter, timer, genesis, ticker, widget, Genesis Framework, genesiswp
    44Requires at least: 3.6
    5 Tested up to: 4.9.4
    6 Stable tag: 1.1.4
     5Tested up to: 5.2.2
     6Stable tag: 1.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4545
    4646== Changelog ==
     47= 1.2 =
     48* Update: fix for Genesis 3.0
     49* Removed genesis_pre function check on activation
     50
    4751= 1.1.4 =
    4852*  Update: fix for Genesis 2.6
Note: See TracChangeset for help on using the changeset viewer.