diff --git a/admin.php b/admin.php index 4652ed4..7b39bd3 100644 --- a/admin.php +++ b/admin.php @@ -337,29 +337,33 @@ function loop_hooks_box() { function html5_entry_hooks_box() { - simplehooks_form_generate(array( + simplehooks_form_generate( array( 'hook' => 'genesis_before_entry', 'desc' => __( 'This hook executes before each entry in all loop blocks (outside the entry markup element).', 'simplehooks' ) ) ); - simplehooks_form_generate(array( + simplehooks_form_generate( array( 'hook' => 'genesis_entry_header', - 'desc' => __( 'This hook executes before the entry content. By default, it outputs the entry title and meta information.', 'simplehooks' ) + 'desc' => __( 'This hook executes before the entry content. By default, it outputs the entry title and meta information.', 'simplehooks' ), + 'unhook' => array( 'genesis_do_post_title', array( 'genesis_post_info', 12 ) ) ) ); - simplehooks_form_generate(array( + simplehooks_form_generate( array( 'hook' => 'genesis_entry_content', - 'desc' => __( 'This hook, by default, outputs the entry content.', 'simplehooks' ) + 'desc' => __( 'This hook, by default, outputs the entry content.', 'simplehooks' ), + 'unhook' => array( array( 'genesis_do_post_image', 8 ), 'genesis_do_post_content' ) ) ); - simplehooks_form_generate(array( + simplehooks_form_generate( array( 'hook' => 'genesis_entry_footer', - 'desc' => __( 'This hook executes after the entry content. By Default, it outputs entry meta information.', 'simplehooks' ) + 'desc' => __( 'This hook executes after the entry content. By Default, it outputs entry meta information.', 'simplehooks' ), + 'unhook' => array( 'genesis_post_meta' ) ) ); - simplehooks_form_generate(array( + simplehooks_form_generate( array( 'hook' => 'genesis_after_entry', - 'desc' => __( 'This hook executes after each entry in all loop blocks (outside the entry markup element).', 'simplehooks' ) + 'desc' => __( 'This hook executes after each entry in all loop blocks (outside the entry markup element).', 'simplehooks' ), + 'unhook' => array( array( 'genesis_do_author_box_single', 8 ) ) ) ); submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' ); @@ -376,7 +380,7 @@ function post_hooks_box() { simplehooks_form_generate( array( 'hook' => 'genesis_after_post', 'desc' => __( 'This hook executes after each post in all loop blocks (outside the post_class() div).', 'simplehooks' ), - 'unhook' => array( 'genesis_do_author_box' ) + 'unhook' => array( 'genesis_do_author_box_single' ) ) ); simplehooks_form_generate( array( diff --git a/functions.php b/functions.php index d69dfee..d3aa4c4 100644 --- a/functions.php +++ b/functions.php @@ -49,9 +49,17 @@ function simplehooks_form_generate( $args = array() ) { if ( isset( $args['unhook'] ) ) { foreach ( (array) $args['unhook'] as $function ) { + + if ( is_array( $function ) ) { + $function_name = $function[0]; + $function = implode( ',', $function ); + } + else { + $function_name = $function; + } ?> - />
+ />