Version Description
- Updated to use new entry hooks in Genesis 2.0.
- Remove unused boxes.php file.
Download this release
Release Info
Developer | nathanrice |
Plugin | Genesis Simple Hooks |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.8.0.2 to 2.0.0
- admin.php +56 -13
- plugin.php +12 -15
- readme.txt +8 -4
admin.php
CHANGED
@@ -40,24 +40,24 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
40 |
|
41 |
$default_settings = array(
|
42 |
|
43 |
-
|
44 |
'wp_head' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
45 |
'wp_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
46 |
|
47 |
-
|
48 |
'genesis_pre' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
49 |
'genesis_pre_framework' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
50 |
'genesis_init' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
51 |
'genesis_setup' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
52 |
|
53 |
-
|
54 |
'genesis_doctype' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
55 |
'genesis_title' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
56 |
'genesis_meta' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
57 |
'genesis_before' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
58 |
'genesis_after' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
59 |
|
60 |
-
|
61 |
'genesis_before_header' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
62 |
'genesis_header' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
63 |
'genesis_header_right' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
@@ -66,14 +66,14 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
66 |
'genesis_site_title' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
67 |
'genesis_site_description' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
68 |
|
69 |
-
|
70 |
'genesis_before_content_sidebar_wrap' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
71 |
'genesis_after_content_sidebar_wrap' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
72 |
|
73 |
'genesis_before_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
74 |
'genesis_after_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
75 |
|
76 |
-
|
77 |
'genesis_before_loop' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
78 |
'genesis_loop' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
79 |
'genesis_after_loop' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
@@ -81,7 +81,14 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
81 |
'genesis_after_endwhile' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
82 |
'genesis_loop_else' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
'genesis_before_post' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
86 |
'genesis_after_post' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
87 |
|
@@ -93,7 +100,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
93 |
'genesis_post_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
94 |
'genesis_after_post_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
95 |
|
96 |
-
|
97 |
'genesis_before_comments' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
98 |
'genesis_comments' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
99 |
'genesis_list_comments' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
@@ -115,7 +122,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
115 |
'genesis_comment_form' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
116 |
'genesis_after_comment_form' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
117 |
|
118 |
-
|
119 |
'genesis_before_sidebar' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
120 |
'genesis_sidebar' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
121 |
'genesis_after_sidebar' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
@@ -134,7 +141,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
134 |
'genesis_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
135 |
'genesis_after_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
136 |
|
137 |
-
|
138 |
'genesis_import_export_form' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
139 |
'genesis_export' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
140 |
'genesis_import' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
@@ -143,7 +150,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
143 |
|
144 |
);
|
145 |
|
146 |
-
|
147 |
$this->create( $page_id, $menu_ops, $page_ops, $settings_field, $default_settings );
|
148 |
|
149 |
}
|
@@ -156,7 +163,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
156 |
*/
|
157 |
function scripts() {
|
158 |
|
159 |
-
|
160 |
parent::scripts();
|
161 |
genesis_load_admin_js();
|
162 |
|
@@ -175,7 +182,12 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
175 |
add_meta_box( 'simplehooks-header-hooks', __( 'Header Hooks', 'simplehooks' ), array( $this, 'header_hooks_box' ), $this->pagehook, 'main' );
|
176 |
add_meta_box( 'simplehooks-content-hooks', __( 'Content Hooks', 'simplehooks' ), array( $this, 'content_hooks_box' ), $this->pagehook, 'main' );
|
177 |
add_meta_box( 'simplehooks-loop-hooks', __( 'Loop Hooks', 'simplehooks' ), array( $this, 'loop_hooks_box' ), $this->pagehook, 'main' );
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
179 |
add_meta_box( 'simplehooks-comment-list-hooks', __( 'Comment List Hooks', 'simplehooks' ), array( $this, 'comment_list_hooks_box' ), $this->pagehook, 'main' );
|
180 |
add_meta_box( 'simplehooks-ping-list-hooks', __( 'Ping List Hooks', 'simplehooks' ), array( $this, 'ping_list_hooks_box' ), $this->pagehook, 'main' );
|
181 |
add_meta_box( 'simplehooks-comment-hooks', __( 'Single Comment Hooks', 'simplehooks' ), array( $this, 'comment_hooks_box' ), $this->pagehook, 'main' );
|
@@ -310,6 +322,37 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
|
|
310 |
|
311 |
}
|
312 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
function post_hooks_box() {
|
314 |
|
315 |
simplehooks_form_generate( array(
|
40 |
|
41 |
$default_settings = array(
|
42 |
|
43 |
+
//* Wordpress Hooks
|
44 |
'wp_head' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
45 |
'wp_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
46 |
|
47 |
+
//* Internal Hooks
|
48 |
'genesis_pre' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
49 |
'genesis_pre_framework' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
50 |
'genesis_init' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
51 |
'genesis_setup' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
52 |
|
53 |
+
//* Document Hooks
|
54 |
'genesis_doctype' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
55 |
'genesis_title' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
56 |
'genesis_meta' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
57 |
'genesis_before' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
58 |
'genesis_after' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
59 |
|
60 |
+
//* Header hooks
|
61 |
'genesis_before_header' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
62 |
'genesis_header' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
63 |
'genesis_header_right' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
66 |
'genesis_site_title' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
67 |
'genesis_site_description' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
68 |
|
69 |
+
//* Content Hooks
|
70 |
'genesis_before_content_sidebar_wrap' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
71 |
'genesis_after_content_sidebar_wrap' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
72 |
|
73 |
'genesis_before_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
74 |
'genesis_after_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
75 |
|
76 |
+
//* Loop Hooks
|
77 |
'genesis_before_loop' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
78 |
'genesis_loop' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
79 |
'genesis_after_loop' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
81 |
'genesis_after_endwhile' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
82 |
'genesis_loop_else' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
83 |
|
84 |
+
//* HTML5 Entry Hooks
|
85 |
+
'genesis_before_entry' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
86 |
+
'genesis_entry_header' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
87 |
+
'genesis_entry_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
88 |
+
'genesis_entry_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
89 |
+
'genesis_after_entry' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
90 |
+
|
91 |
+
//* xHTML Entry Hooks
|
92 |
'genesis_before_post' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
93 |
'genesis_after_post' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
94 |
|
100 |
'genesis_post_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
101 |
'genesis_after_post_content' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
102 |
|
103 |
+
//* Comment Hooks
|
104 |
'genesis_before_comments' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
105 |
'genesis_comments' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
106 |
'genesis_list_comments' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
122 |
'genesis_comment_form' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
123 |
'genesis_after_comment_form' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
124 |
|
125 |
+
//* Sidebar Hooks
|
126 |
'genesis_before_sidebar' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
127 |
'genesis_sidebar' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
128 |
'genesis_after_sidebar' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
141 |
'genesis_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
142 |
'genesis_after_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
143 |
|
144 |
+
//* Admin Hooks
|
145 |
'genesis_import_export_form' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
146 |
'genesis_export' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
147 |
'genesis_import' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
|
150 |
|
151 |
);
|
152 |
|
153 |
+
//* Create the page */
|
154 |
$this->create( $page_id, $menu_ops, $page_ops, $settings_field, $default_settings );
|
155 |
|
156 |
}
|
163 |
*/
|
164 |
function scripts() {
|
165 |
|
166 |
+
//* Load parent scripts as well as Genesis admin scripts */
|
167 |
parent::scripts();
|
168 |
genesis_load_admin_js();
|
169 |
|
182 |
add_meta_box( 'simplehooks-header-hooks', __( 'Header Hooks', 'simplehooks' ), array( $this, 'header_hooks_box' ), $this->pagehook, 'main' );
|
183 |
add_meta_box( 'simplehooks-content-hooks', __( 'Content Hooks', 'simplehooks' ), array( $this, 'content_hooks_box' ), $this->pagehook, 'main' );
|
184 |
add_meta_box( 'simplehooks-loop-hooks', __( 'Loop Hooks', 'simplehooks' ), array( $this, 'loop_hooks_box' ), $this->pagehook, 'main' );
|
185 |
+
|
186 |
+
if ( current_theme_supports( 'html5' ) )
|
187 |
+
add_meta_box( 'simplehooks-entry-hooks', __( 'Entry Hooks', 'simplehooks' ), array( $this, 'html5_entry_hooks_box' ), $this->pagehook, 'main' );
|
188 |
+
else
|
189 |
+
add_meta_box( 'simplehooks-post-hooks', __( 'Post/Page Hooks', 'simplehooks' ), array( $this, 'post_hooks_box' ), $this->pagehook, 'main' );
|
190 |
+
|
191 |
add_meta_box( 'simplehooks-comment-list-hooks', __( 'Comment List Hooks', 'simplehooks' ), array( $this, 'comment_list_hooks_box' ), $this->pagehook, 'main' );
|
192 |
add_meta_box( 'simplehooks-ping-list-hooks', __( 'Ping List Hooks', 'simplehooks' ), array( $this, 'ping_list_hooks_box' ), $this->pagehook, 'main' );
|
193 |
add_meta_box( 'simplehooks-comment-hooks', __( 'Single Comment Hooks', 'simplehooks' ), array( $this, 'comment_hooks_box' ), $this->pagehook, 'main' );
|
322 |
|
323 |
}
|
324 |
|
325 |
+
function html5_entry_hooks_box() {
|
326 |
+
|
327 |
+
simplehooks_form_generate(array(
|
328 |
+
'hook' => 'genesis_before_entry',
|
329 |
+
'desc' => __( 'This hook executes before each entry in all loop blocks (outside the entry markup element).', 'simplehooks' )
|
330 |
+
) );
|
331 |
+
|
332 |
+
simplehooks_form_generate(array(
|
333 |
+
'hook' => 'genesis_entry_header',
|
334 |
+
'desc' => __( 'This hook executes before the entry content. By default, it outputs the entry title and meta information.', 'simplehooks' )
|
335 |
+
) );
|
336 |
+
|
337 |
+
simplehooks_form_generate(array(
|
338 |
+
'hook' => 'genesis_entry_content',
|
339 |
+
'desc' => __( 'This hook, by default, outputs the entry content.', 'simplehooks' )
|
340 |
+
) );
|
341 |
+
|
342 |
+
simplehooks_form_generate(array(
|
343 |
+
'hook' => 'genesis_entry_footer',
|
344 |
+
'desc' => __( 'This hook executes after the entry content. By Default, it outputs entry meta information.', 'simplehooks' )
|
345 |
+
) );
|
346 |
+
|
347 |
+
simplehooks_form_generate(array(
|
348 |
+
'hook' => 'genesis_after_entry',
|
349 |
+
'desc' => __( 'This hook executes after each entry in all loop blocks (outside the entry markup element).', 'simplehooks' )
|
350 |
+
) );
|
351 |
+
|
352 |
+
submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
|
353 |
+
|
354 |
+
}
|
355 |
+
|
356 |
function post_hooks_box() {
|
357 |
|
358 |
simplehooks_form_generate( array(
|
plugin.php
CHANGED
@@ -2,17 +2,19 @@
|
|
2 |
/*
|
3 |
Plugin Name: Genesis Simple Hooks
|
4 |
Plugin URI: http://www.studiopress.com/plugins/simple-hooks
|
|
|
5 |
Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme.
|
|
|
6 |
Author: Nathan Rice
|
7 |
Author URI: http://www.nathanrice.net/
|
8 |
|
9 |
-
Version:
|
10 |
|
11 |
License: GNU General Public License v2.0 (or later)
|
12 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
13 |
*/
|
14 |
|
15 |
-
|
16 |
define( 'SIMPLEHOOKS_SETTINGS_FIELD', 'simplehooks-settings' );
|
17 |
define( 'SIMPLEHOOKS_PLUGIN_DIR', dirname( __FILE__ ) );
|
18 |
|
@@ -25,9 +27,8 @@ register_activation_hook( __FILE__, 'simplehooks_activation' );
|
|
25 |
*/
|
26 |
function simplehooks_activation() {
|
27 |
|
28 |
-
if ( '
|
29 |
-
simplehooks_deactivate( '
|
30 |
-
}
|
31 |
|
32 |
}
|
33 |
|
@@ -38,10 +39,10 @@ function simplehooks_activation() {
|
|
38 |
*
|
39 |
* @since 1.8.0.2
|
40 |
*/
|
41 |
-
function simplehooks_deactivate( $genesis_version = '
|
42 |
|
43 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
44 |
-
wp_die( sprintf( __( 'Sorry, you cannot run Simple Hooks without WordPress %s and <a href="%s">Genesis %s</a>, or greater.', 'simplehooks' ), $wp_version, 'http://
|
45 |
|
46 |
}
|
47 |
|
@@ -52,16 +53,12 @@ add_action( 'genesis_init', 'simplehooks_init', 20 );
|
|
52 |
* @since 1.8.0
|
53 |
*/
|
54 |
function simplehooks_init() {
|
55 |
-
|
56 |
-
/** Deactivate if not running Genesis 1.8.0 or greater */
|
57 |
-
if ( ! class_exists( 'Genesis_Admin_Boxes' ) )
|
58 |
-
add_action( 'admin_init', 'simplehooks_deactivate', 10, 0 );
|
59 |
|
60 |
-
|
61 |
if ( is_admin() )
|
62 |
require_once( SIMPLEHOOKS_PLUGIN_DIR . '/admin.php' );
|
63 |
|
64 |
-
|
65 |
require_once( SIMPLEHOOKS_PLUGIN_DIR . '/functions.php' );
|
66 |
|
67 |
}
|
@@ -81,12 +78,12 @@ function simplehooks_execute_hooks() {
|
|
81 |
|
82 |
foreach ( (array) $hooks as $hook => $array ) {
|
83 |
|
84 |
-
|
85 |
if ( simplehooks_get_option( $hook, 'content' ) ) {
|
86 |
add_action( $hook, 'simplehooks_execute_hook' );
|
87 |
}
|
88 |
|
89 |
-
|
90 |
if ( isset( $array['unhook'] ) ) {
|
91 |
|
92 |
foreach( (array) $array['unhook'] as $function ) {
|
2 |
/*
|
3 |
Plugin Name: Genesis Simple Hooks
|
4 |
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: Nathan Rice
|
9 |
Author URI: http://www.nathanrice.net/
|
10 |
|
11 |
+
Version: 2.0.0
|
12 |
|
13 |
License: GNU General Public License v2.0 (or later)
|
14 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
15 |
*/
|
16 |
|
17 |
+
//* Define our constants
|
18 |
define( 'SIMPLEHOOKS_SETTINGS_FIELD', 'simplehooks-settings' );
|
19 |
define( 'SIMPLEHOOKS_PLUGIN_DIR', dirname( __FILE__ ) );
|
20 |
|
27 |
*/
|
28 |
function simplehooks_activation() {
|
29 |
|
30 |
+
if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, '2.0.0', '>=' ) )
|
31 |
+
simplehooks_deactivate( '2.0.0', '3.6' );
|
|
|
32 |
|
33 |
}
|
34 |
|
39 |
*
|
40 |
* @since 1.8.0.2
|
41 |
*/
|
42 |
+
function simplehooks_deactivate( $genesis_version = '2.0.0', $wp_version = '3.6' ) {
|
43 |
|
44 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
45 |
+
wp_die( sprintf( __( 'Sorry, you cannot run Simple Hooks without WordPress %s and <a href="%s">Genesis %s</a>, or greater.', 'simplehooks' ), $wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $genesis_version ) );
|
46 |
|
47 |
}
|
48 |
|
53 |
* @since 1.8.0
|
54 |
*/
|
55 |
function simplehooks_init() {
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
//* Admin Menu
|
58 |
if ( is_admin() )
|
59 |
require_once( SIMPLEHOOKS_PLUGIN_DIR . '/admin.php' );
|
60 |
|
61 |
+
//* Helper functions
|
62 |
require_once( SIMPLEHOOKS_PLUGIN_DIR . '/functions.php' );
|
63 |
|
64 |
}
|
78 |
|
79 |
foreach ( (array) $hooks as $hook => $array ) {
|
80 |
|
81 |
+
//* Add new content to hook
|
82 |
if ( simplehooks_get_option( $hook, 'content' ) ) {
|
83 |
add_action( $hook, 'simplehooks_execute_hook' );
|
84 |
}
|
85 |
|
86 |
+
//* Unhook stuff
|
87 |
if ( isset( $array['unhook'] ) ) {
|
88 |
|
89 |
foreach( (array) $array['unhook'] as $function ) {
|
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: 3.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag:
|
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 |
|
@@ -117,4 +117,8 @@ The most common request from Genesis users is how to properly modify their foote
|
|
117 |
* Removed an unnecessary version compare check that was causing some fatal errors.
|
118 |
|
119 |
= 1.8.0.2 =
|
120 |
-
* Fixed yet another fatal error but for people using less than Genesis 1.8.0. It should now deactivate gracefully.
|
|
|
|
|
|
|
|
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: 3.6
|
6 |
+
Tested up to: 3.6
|
7 |
+
Stable tag: 2.0.0
|
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 |
|
117 |
* Removed an unnecessary version compare check that was causing some fatal errors.
|
118 |
|
119 |
= 1.8.0.2 =
|
120 |
+
* Fixed yet another fatal error but for people using less than Genesis 1.8.0. It should now deactivate gracefully.
|
121 |
+
|
122 |
+
= 2.0.0 =
|
123 |
+
* Updated to use new entry hooks in Genesis 2.0.
|
124 |
+
* Remove unused boxes.php file.
|