Plugin Directory

Changeset 2109621


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

Removed genesis_pre function check on activation

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

Legend:

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

    r1330172 r2109621  
    44Plugin URI: http://www.wpstud.io
    55Description: Adds the featured image or custom image as background of the widget.
    6 Version: 1.3
     6Version: 1.4
    77Author: Frank Schrijvers
    88Author URI: http://www.wpstud.io
     
    1010License: GPLv2
    1111
    12     This program is free software; you can redistribute it and/or modify
    13     it under the terms of the GNU General Public License, version 2, as
    14     published by the Free Software Foundation.
     12    This program is free software; you can redistribute it and/or modify
     13    it under the terms of the GNU General Public License, version 2, as
     14    published by the Free Software Foundation.
    1515
    16     This program is distributed in the hope that it will be useful,
    17     but WITHOUT ANY WARRANTY; without even the implied warranty of
    18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19     GNU General Public License for more details.
     16    This program is distributed in the hope that it will be useful,
     17    but WITHOUT ANY WARRANTY; without even the implied warranty of
     18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     19    GNU General Public License for more details.
    2020
    21     You should have received a copy of the GNU General Public License
    22     along with this program; if not, write to the Free Software
    23     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     21    You should have received a copy of the GNU General Public License
     22    along with this program; if not, write to the Free Software
     23    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2424*/
    2525
    2626defined( 'WPINC' ) or die;
    27 
    28 
    29 register_activation_hook( __FILE__, 'wpstudio_gwb_activation_check' );
    30 function wpstudio_gwb_activation_check() {
    31 
    32     $latest = '2.1.2';
    33     $theme_info = wp_get_theme( 'genesis' );
    34 
    35     if ( 'genesis' != basename( TEMPLATEPATH ) ) {
    36         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin
    37         wp_die( sprintf( __( 'Sorry, you can\'t activate the Genesis Widget Background unless you have installed the Genesis Framework. Go back to the Plugins Page.', 'genesis-widget-background' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) );
    38     }
    39 
    40     if ( version_compare( $theme_info['Version'], $latest, '<' ) ) {
    41         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin
    42         wp_die( sprintf( __( 'Sorry, you can\'t activate the Genesis Widget Background unless you have installed the Genesis Framework. Go back to the Plugins Page.', 'genesis-widget-background' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) );
    43     }
    44 
    45 }
    46 
    47 add_action('admin_init', 'wpstudio_gwb_deactivate_check');
    48 function wpstudio_gwb_deactivate_check() {
    49 
    50     if ( ! function_exists('genesis_pre') ) {
    51         deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin
    52     }
    53 
    54 }
    5527
    5628/**
     
    6537function wpstudio_gwb_register_widget() {
    6638
    67      register_widget( 'Genesis_Widget_Background' );
     39    register_widget( 'Genesis_Widget_Background' );
    6840
    6941}
     
    7244function wpstudio_gwb_load_plugin_textdomain() {
    7345
    74     load_plugin_textdomain('genesis-widget-background', false, dirname(plugin_basename(__FILE__)) . '/languages/');
     46    load_plugin_textdomain( 'genesis-widget-background', false, dirname(plugin_basename(__FILE__)) . '/languages/' );
    7547
    7648}
  • genesis-widget-background/trunk/readme.txt

    r1598742 r2109621  
    33Tags: featured page, genesis, widget, featured content, Genesis Framework, genesiswp, page, widget-only, widgets
    44Requires at least: 3.6
    5 Tested up to: 4.7.2
    6 Stable tag: 1.3
     5Tested up to: 5.2.2
     6Stable tag: 1.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
     52= 1.4 =
     53* Update: fix for Genesis 3.0
     54* Removed genesis_pre function check on activation
     55
    5256= 1.3 =
    5357* Bugfix, Show only title works now.
Note: See TracChangeset for help on using the changeset viewer.