Plugin Directory

Changeset 2109580


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

Removed genesis_pre function check on activation

Location:
wpstudio-testimonial-slider/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpstudio-testimonial-slider/trunk/genesis-testimonials.php

    r2089782 r2109580  
    44 * Plugin URI: http://wpstud.io/plugins
    55 * Description: The Genesis Testimonials Slider is a simple-to-use plugin for adding Testimonials to your Genesis Theme, using a shortcode or a widget.
    6  * Version: 1.4
     6 * Version: 1.5
    77 * Author: Frank Schrijvers, WPStudio
    88 * Author URI: http://www.wpstud.io
     
    4646}
    4747
    48 register_activation_hook( __FILE__, 'wpstudio_gts_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 wpstudio_gts_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         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-testimonial-slider' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) );
    62     }
    63 
    64     if ( version_compare( $theme_info['Version'], $latest, '<' ) ) {
    65 
    66         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    67         /* translators: Genesis Framework version check. */
    68         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-testimonial-slider' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) );
    69 
    70     }
    71 
    72 }
    73 
    74 /**
    75  * This function runs on plugin deactivation.
    76  */
    77 function wpstudio_gts_deactivate_check() {
    78 
    79     if ( ! function_exists( 'genesis_pre' ) ) {
    80         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    81     }
    82 
    83 }
    84 
    85 add_action( 'after_switch_theme', 'wpstudio_gts_deactivate_check', 10 );
    86 
    8748/**
    8849 * Enqueue scripts and styles.
     
    10364function wpstudio_gts_init() {
    10465
    105     if ( function_exists( 'genesis_pre' ) ) {
    106 
    10766        require dirname( __FILE__ ) . '/inc/gts-admin.php';
    10867        include dirname( __FILE__ ) . '/inc/gts-company.php';
     
    11372        new WPSTUDIO_gts_Settings();
    11473
    115     }
     74}
    11675
    117 }
    118 add_action( 'after_setup_theme', 'wpstudio_gts_init' );
     76add_action( 'genesis_setup', 'wpstudio_gts_init' );
    11977
    12078// Image size for testimonial thumb.
  • wpstudio-testimonial-slider/trunk/inc/gts-admin.php

    r1978852 r2109580  
    1010
    1111/**
    12  * Register a metabox and default settings for the Genesis Simple Logo.
     12 * Register a new admin page for the testimonial settings.
    1313 *
    1414 * @package Genesis\Admin
  • wpstudio-testimonial-slider/trunk/readme.md

    r2089782 r2109580  
    44* Tags: testimonials, testimonial, testimonials plugin, widget, genesis, slider, Genesis Framework, genesiswp
    55* Requires at least: 3.6
    6 * Tested up to: 5.2
    7 * Stable tag: 1.4
     6* Tested up to: 5.2.2
     7* Stable tag: 1.5
    88* License: GPLv2 or later
    99* License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6060
    6161## Changelog
     62
     63**1.5**
     64* Update: fix for Genesis 3.0
     65* Removed genesis_pre function check on activation
     66
    6267
    6368**1.4**
  • wpstudio-testimonial-slider/trunk/readme.txt

    r2089782 r2109580  
    33Tags: testimonials, testimonial, testimonials plugin, widget, genesis, slider, Genesis Framework, genesiswp
    44Requires at least: 3.6
    5 Tested up to: 5.2
    6 Stable tag: 1.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
     
    6060== Changelog ==
    6161
     62= 1.5 =
     63* Update: fix for Genesis 3.0
     64* Removed genesis_pre function check on activation
     65
    6266= 1.4 =
    6367* Tweak: removed Structured Data. Testimonials are used in many diffrent ways. The structured data is a limitation here.
Note: See TracChangeset for help on using the changeset viewer.