Plugin Directory

Changeset 2109598


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

Removed genesis_pre function check on activation

Location:
genesis-widget-overlay/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • genesis-widget-overlay/trunk/genesis-overlay-widget.php

    r1835201 r2109598  
    44 * Plugin URI: http://wpstud.io
    55 * Description: This plugin allows you to create a full screen overlay widget-area
    6  * Version: 1.1.2
     6 * Version: 1.2
    77 * Author: Frank Schrijvers
    88 * Author URI: http://www.frankschrijvers.nl
     
    2929}
    3030
    31 register_activation_hook( __FILE__, 'wpstudio_gow_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_gow_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 Overlay 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 Overlay 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( 'admin_init', 'wpstudio_gow_deactivate_check' );
    56 function wpstudio_gow_deactivate_check() {
    57 
    58     if ( ! function_exists( 'genesis_pre' ) ) {
    59 
    60         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin.
    61 
    62     }
    63 
    64 }
    6531
    6632add_action( 'wp_enqueue_scripts', 'wpstudio_gow_load_scripts' );
     
    7642}
    7743
    78 add_action( 'after_setup_theme', 'wpstudio_gow_init' );
     44add_action( 'genesis_setup', 'wpstudio_gow_init' );
    7945/**
    8046 * Load required files.
  • genesis-widget-overlay/trunk/readme.txt

    r1835201 r2109598  
    33Tags: overlay, genesis, widget, featured content, Genesis Framework, genesiswp, page, widget-only, widgets
    44Requires at least: 3.6
    5 Tested up to: 4.9.4
    6 Stable tag: 1.1.2
     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
     
    4949== Changelog ==
    5050
     51= 1.2 =
     52* Update: fix for Genesis 3.0
     53* Removed genesis_pre function check on activation
     54
    5155= 1.1.2 =
    5256* Update: fix for Genesis 2.6
Note: See TracChangeset for help on using the changeset viewer.