Version Description
- Genesis 2.6+ compatibility (prevents white screen).
- Remove reference to deprecated function.
Download this release
Release Info
Developer | nathanrice |
Plugin | Genesis Simple Hooks |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.2.1
- genesis-simple-hooks.php +6 -4
- includes/class-genesis-simple-hooks-admin.php +1 -1
- package.json +1 -1
- plugin.php +3 -3
- readme.txt +8 -3
genesis-simple-hooks.php
CHANGED
@@ -5,7 +5,7 @@ class Genesis_Simple_Hooks {
|
|
5 |
/**
|
6 |
* Plugin version
|
7 |
*/
|
8 |
-
public $plugin_version = '2.2.
|
9 |
|
10 |
/**
|
11 |
* Minimum WordPress version.
|
@@ -70,7 +70,7 @@ class Genesis_Simple_Hooks {
|
|
70 |
|
71 |
// Because this is a Genesis-dependent plugin
|
72 |
add_action( 'genesis_setup', array( $this, 'includes' ) );
|
73 |
-
add_action( '
|
74 |
add_action( 'genesis_setup', array( $this, 'execute_hooks' ) );
|
75 |
|
76 |
}
|
@@ -84,9 +84,11 @@ class Genesis_Simple_Hooks {
|
|
84 |
|
85 |
if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, $this->min_genesis_version, '>=' ) ) {
|
86 |
|
87 |
-
$
|
88 |
|
89 |
-
$
|
|
|
|
|
90 |
echo '<div class="notice notice-warning"><p>' . $message . '</p></div>';
|
91 |
|
92 |
}
|
5 |
/**
|
6 |
* Plugin version
|
7 |
*/
|
8 |
+
public $plugin_version = '2.2.1';
|
9 |
|
10 |
/**
|
11 |
* Minimum WordPress version.
|
70 |
|
71 |
// Because this is a Genesis-dependent plugin
|
72 |
add_action( 'genesis_setup', array( $this, 'includes' ) );
|
73 |
+
add_action( 'genesis_admin_init', array( $this, 'instantiate' ) );
|
74 |
add_action( 'genesis_setup', array( $this, 'execute_hooks' ) );
|
75 |
|
76 |
}
|
84 |
|
85 |
if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, $this->min_genesis_version, '>=' ) ) {
|
86 |
|
87 |
+
$plugin = get_plugin_data( $this->plugin_dir_path . 'plugin.php' );
|
88 |
|
89 |
+
$action = defined( 'PARENT_THEME_VERSION' ) ? __( 'upgrade to', 'plugin-boilerplate' ) : __( 'install and activate', 'plugin-boilerplate' );
|
90 |
+
|
91 |
+
$message = sprintf( __( '%s requires WordPress %s and <a href="%s" target="_blank">Genesis %s</a>, or greater. Please %s the latest version of Genesis to use this plugin.', 'plugin-boilerplate' ), $plugin['name'], $this->min_wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $this->min_genesis_version, $action );
|
92 |
echo '<div class="notice notice-warning"><p>' . $message . '</p></div>';
|
93 |
|
94 |
}
|
includes/class-genesis-simple-hooks-admin.php
CHANGED
@@ -103,7 +103,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
103 |
|
104 |
// Load parent scripts as well as Genesis admin scripts */
|
105 |
parent::scripts();
|
106 |
-
|
107 |
|
108 |
}
|
109 |
|
103 |
|
104 |
// Load parent scripts as well as Genesis admin scripts */
|
105 |
parent::scripts();
|
106 |
+
genesis_scripts()->enqueue_and_localize_admin_scripts();
|
107 |
|
108 |
}
|
109 |
|
package.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
"description": "Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme.",
|
30 |
"author": "StudioPress",
|
31 |
"authoruri": "http://www.studiopress.com/",
|
32 |
-
"version": "2.2.
|
33 |
"license": "GPL-2.0+",
|
34 |
"licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html",
|
35 |
"textdomain": "genesis-simple-hooks"
|
29 |
"description": "Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme.",
|
30 |
"author": "StudioPress",
|
31 |
"authoruri": "http://www.studiopress.com/",
|
32 |
+
"version": "2.2.1",
|
33 |
"license": "GPL-2.0+",
|
34 |
"licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html",
|
35 |
"textdomain": "genesis-simple-hooks"
|
plugin.php
CHANGED
@@ -5,10 +5,10 @@ Plugin URI: http://www.studiopress.com/plugins/simple-hooks
|
|
5 |
|
6 |
Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme.
|
7 |
|
8 |
-
Author:
|
9 |
-
Author URI: http://www.
|
10 |
|
11 |
-
Version: 2.2.
|
12 |
|
13 |
Text Domain: genesis-simple-hooks
|
14 |
Domain Path: /languages
|
5 |
|
6 |
Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme.
|
7 |
|
8 |
+
Author: StudioPress
|
9 |
+
Author URI: http://www.studiopress.com/
|
10 |
|
11 |
+
Version: 2.2.1
|
12 |
|
13 |
Text Domain: genesis-simple-hooks
|
14 |
Domain Path: /languages
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: nathanrice, studiopress
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
4 |
Tags: hooks, genesis, genesiswp, studiopress
|
5 |
-
Requires at least: 4.
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.2.
|
8 |
|
9 |
This plugin creates a new Genesis settings page that allows you to insert code (HTML, Shortcodes, and PHP), and attach it to any of the 50+ action hooks throughout the Genesis Theme Framework, from StudioPress.
|
10 |
|
@@ -72,12 +72,17 @@ The most common request from Genesis users is how to properly modify their foote
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
75 |
= 2.2.0 =
|
76 |
* Rewrite plugin based on new plugin boilerplate.
|
77 |
* Added new hooks.
|
78 |
* Require unfiltered_html capability to execute PHP.
|
79 |
* Better Genesis dependency handling.
|
80 |
* Change activation hook to conditional admin notice.
|
|
|
81 |
|
82 |
= 2.1.2 =
|
83 |
* Load textdomain
|
2 |
Contributors: nathanrice, studiopress
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
4 |
Tags: hooks, genesis, genesiswp, studiopress
|
5 |
+
Requires at least: 4.9.0
|
6 |
+
Tested up to: 4.9.4
|
7 |
+
Stable tag: 2.2.1
|
8 |
|
9 |
This plugin creates a new Genesis settings page that allows you to insert code (HTML, Shortcodes, and PHP), and attach it to any of the 50+ action hooks throughout the Genesis Theme Framework, from StudioPress.
|
10 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 2.2.1 =
|
76 |
+
* Genesis 2.6+ compatibility (prevents white screen).
|
77 |
+
* Remove reference to deprecated function.
|
78 |
+
|
79 |
= 2.2.0 =
|
80 |
* Rewrite plugin based on new plugin boilerplate.
|
81 |
* Added new hooks.
|
82 |
* Require unfiltered_html capability to execute PHP.
|
83 |
* Better Genesis dependency handling.
|
84 |
* Change activation hook to conditional admin notice.
|
85 |
+
* Allow hooks to be de-registered via filter.
|
86 |
|
87 |
= 2.1.2 =
|
88 |
* Load textdomain
|