Genesis Simple Hooks - Version 2.1.0

Version Description

  • Increased requirement to Genesis 2.1.0.
  • Site title and description hooks.
  • Fixed outdated hook descriptions.
Download this release

Release Info

Developer nathanrice
Plugin Icon 128x128 Genesis Simple Hooks
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.1 to 2.1.0

Files changed (3) hide show
  1. admin.php +42 -29
  2. plugin.php +4 -4
  3. readme.txt +9 -4
admin.php CHANGED
@@ -137,6 +137,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
137
  'genesis_before_sidebar_alt_widget_area' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
138
  'genesis_after_sidebar_alt_widget_area' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
139
 
 
140
  'genesis_before_footer' => 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 ),
@@ -244,18 +245,30 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
244
 
245
  simplehooks_form_generate( array(
246
  'hook' => 'genesis_before_header',
247
- 'desc' => __( 'This hook executes immediately before the header (outside the <code>#header</code> div).', 'simplehooks' )
248
  ) );
249
 
250
  simplehooks_form_generate( array(
251
  'hook' => 'genesis_header',
252
- 'desc' => __( 'This hook outputs the default header (the <code>#header</code> div)', 'simplehooks' ),
253
  'unhook' => array( 'genesis_do_header' )
254
  ) );
255
 
256
  simplehooks_form_generate( array(
257
  'hook' => 'genesis_after_header',
258
- 'desc' => __( 'This hook executes immediately after the header (outside the <code>#header</code> div).', 'simplehooks' )
 
 
 
 
 
 
 
 
 
 
 
 
259
  ) );
260
 
261
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
@@ -266,22 +279,22 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
266
 
267
  simplehooks_form_generate( array(
268
  'hook' => 'genesis_before_content_sidebar_wrap',
269
- 'desc' => __( 'This hook executes immediately before the div block that wraps the content and the primary sidebar (outside the <code>#content-sidebar-wrap</code> div).', 'simplehooks' )
270
  ) );
271
 
272
  simplehooks_form_generate( array(
273
  'hook' => 'genesis_after_content_sidebar_wrap',
274
- 'desc' => __( 'This hook executes immediately after the div block that wraps the content and the primary sidebar (outside the <code>#content-sidebar-wrap</code> div).', 'simplehooks' )
275
  ) );
276
 
277
  simplehooks_form_generate( array(
278
  'hook' => 'genesis_before_content',
279
- 'desc' => __( 'This hook executes immediately before the content column (outside the <code>#content</code> div).', 'simplehooks' )
280
  ) );
281
 
282
  simplehooks_form_generate( array(
283
  'hook' => 'genesis_after_content',
284
- 'desc' => __( 'This hook executes immediately after the content column (outside the <code>#content</code> div).', 'simplehooks' )
285
  ) );
286
 
287
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
@@ -408,24 +421,24 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
408
 
409
  simplehooks_form_generate( array(
410
  'hook' => 'genesis_before_comments',
411
- 'desc' => __( 'This hook executes immediately before the comments block (outside the <code>#comments</code> div).', 'simplehooks' )
412
  ) );
413
 
414
  simplehooks_form_generate( array(
415
  'hook' => 'genesis_comments',
416
- 'desc' => __( 'This hook outputs the comments block, including the <code>#comments</code> div.', 'simplehooks' ),
417
  'unhook' => array( 'genesis_do_comments' )
418
  ) );
419
 
420
  simplehooks_form_generate( array(
421
  'hook' => 'genesis_list_comments',
422
- 'desc' => __( 'This hook executes inside the comments block, inside the <code>.comment-list</code> OL. By default, it outputs a list of comments associated with a post via the <code>genesis_default_list_comments()</code> function.', 'simplehooks' ),
423
  'unhook' => array( 'genesis_default_list_comments' )
424
  ) );
425
 
426
  simplehooks_form_generate( array(
427
  'hook' => 'genesis_after_comments',
428
- 'desc' => __( 'This hook executes immediately after the comments block (outside the <code>#comments</code> div).', 'simplehooks' )
429
  ) );
430
 
431
  }
@@ -434,24 +447,24 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
434
 
435
  simplehooks_form_generate( array(
436
  'hook' => 'genesis_before_pings',
437
- 'desc' => __( 'This hook executes immediately before the pings block (outside the <code>#pings</code> div).', 'simplehooks' ),
438
  'unhook' => array( 'genesis_do_pings' )
439
  ) );
440
 
441
  simplehooks_form_generate( array(
442
  'hook' => 'genesis_pings',
443
- 'desc' => __( 'This hook outputs the pings block, including the <code>#pings</code> div.', 'simplehooks' )
444
  ) );
445
 
446
  simplehooks_form_generate( array(
447
  'hook' => 'genesis_list_pings',
448
- 'desc' => __( 'This hook executes inside the pings block, inside the <code>.ping-list</code> OL. By default, it outputs a list of pings associated with a post via the <code>genesis_default_list_pings()</code> function.', 'simplehooks' ),
449
  'unhook' => array( 'genesis_default_list_pings' )
450
  ) );
451
 
452
  simplehooks_form_generate( array(
453
  'hook' => 'genesis_after_pings',
454
- 'desc' => __( 'This hook executes immediately after the pings block (outside the <code>#pings</code> div).', 'simplehooks' )
455
  ) );
456
 
457
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
@@ -478,18 +491,18 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
478
 
479
  simplehooks_form_generate( array(
480
  'hook' => 'genesis_before_comment_form',
481
- 'desc' => __( 'This hook executes immediately before the comment form, outside the <code>#respond</code> div.', 'simplehooks' )
482
  ) );
483
 
484
  simplehooks_form_generate( array(
485
  'hook' => 'genesis_comment_form',
486
- 'desc' => __( 'This hook outputs the entire comment form, including the <code>#respond</code> div.', 'simplehooks' ),
487
  'unhook' => array( 'genesis_do_comment_form' )
488
  ) );
489
 
490
  simplehooks_form_generate( array(
491
  'hook' => 'genesis_after_comment_form',
492
- 'desc' => __( 'This hook executes immediately after the comment form, outside the <code>#respond</code> div.', 'simplehooks' )
493
  ) );
494
 
495
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
@@ -500,7 +513,7 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
500
 
501
  simplehooks_form_generate( array(
502
  'hook' => 'genesis_before_sidebar',
503
- 'desc' => __( 'This hook executes immediately before the primary sidebar column (outside the <code>#sidebar</code> div).', 'simplehooks' )
504
  ) );
505
 
506
  simplehooks_form_generate( array(
@@ -511,22 +524,22 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
511
 
512
  simplehooks_form_generate( array(
513
  'hook' => 'genesis_after_sidebar',
514
- 'desc' => __( 'This hook executes immediately after the primary sidebar column (outside the <code>#sidebar</code> div).', 'simplehooks' )
515
  ) );
516
 
517
  simplehooks_form_generate( array(
518
  'hook' => 'genesis_before_sidebar_widget_area',
519
- 'desc' => __( 'This hook executes immediately before the primary sidebar widget area (inside the <code>#sidebar</code> div).', 'simplehooks' )
520
  ) );
521
 
522
  simplehooks_form_generate( array(
523
  'hook' => 'genesis_after_sidebar_widget_area',
524
- 'desc' => __( 'This hook executes immediately after the primary sidebar widget area (inside the <code>#sidebar</code> div).', 'simplehooks' )
525
  ) );
526
 
527
  simplehooks_form_generate( array(
528
  'hook' => 'genesis_before_sidebar_alt',
529
- 'desc' => __( 'This hook executes immediately before the alternate sidebar column (outside the <code>#sidebar-alt</code> div).', 'simplehooks' )
530
  ) );
531
 
532
  simplehooks_form_generate( array(
@@ -537,17 +550,17 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
537
 
538
  simplehooks_form_generate( array(
539
  'hook' => 'genesis_after_sidebar_alt',
540
- 'desc' => __( 'This hook executes immediately after the alternate sidebar column (outside the <code>#sidebar-alt</code> div).', 'simplehooks' )
541
  ) );
542
 
543
  simplehooks_form_generate( array(
544
  'hook' => 'genesis_before_sidebar_alt_widget_area',
545
- 'desc' => __( 'This hook executes immediately before the alternate sidebar widget area (inside the <code>#sidebar-alt</code> div).', 'simplehooks' )
546
  ) );
547
 
548
  simplehooks_form_generate( array(
549
  'hook' => 'genesis_after_sidebar_alt_widget_area',
550
- 'desc' => __( 'This hook executes immediately after the alternate sidebar widget area (inside the <code>#sidebar-alt</code> div).', 'simplehooks' )
551
  ) );
552
 
553
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
@@ -558,18 +571,18 @@ class Genesis_Simple_Hooks_Admin extends Genesis_Admin_Boxes {
558
 
559
  simplehooks_form_generate( array(
560
  'hook' => 'genesis_before_footer',
561
- 'desc' => __( 'This hook executes immediately before the footer (outside the <code>#footer</code> div).', 'simplehooks' )
562
  ) );
563
 
564
  simplehooks_form_generate( array(
565
  'hook' => 'genesis_footer',
566
- 'desc' => __( 'This hook, by default, outputs the content of the footer (inside the <code>#footer</code> div).', 'simplehooks' ),
567
  'unhook' => array( 'genesis_do_footer' )
568
  ) );
569
 
570
  simplehooks_form_generate( array(
571
  'hook' => 'genesis_after_footer',
572
- 'desc' => __( 'This hook executes immediately after the footer (outside the <code>#footer</code> div).', 'simplehooks' )
573
  ) );
574
 
575
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
137
  'genesis_before_sidebar_alt_widget_area' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
138
  'genesis_after_sidebar_alt_widget_area' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
139
 
140
+ //* Footer hooks
141
  'genesis_before_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
142
  'genesis_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
143
  'genesis_after_footer' => array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ),
245
 
246
  simplehooks_form_generate( array(
247
  'hook' => 'genesis_before_header',
248
+ 'desc' => __( 'This hook executes immediately before the header.', 'simplehooks' )
249
  ) );
250
 
251
  simplehooks_form_generate( array(
252
  'hook' => 'genesis_header',
253
+ 'desc' => __( 'This hook outputs the default header.', 'simplehooks' ),
254
  'unhook' => array( 'genesis_do_header' )
255
  ) );
256
 
257
  simplehooks_form_generate( array(
258
  'hook' => 'genesis_after_header',
259
+ 'desc' => __( 'This hook executes immediately after the header.', 'simplehooks' )
260
+ ) );
261
+
262
+ simplehooks_form_generate( array(
263
+ 'hook' => 'genesis_site_title',
264
+ 'desc' => __( 'This hooks executes inside the header, and by default, outputs the site title.' , 'simplehooks' ),
265
+ 'unhook' => array( 'genesis_seo_site_title' ),
266
+ ) );
267
+
268
+ simplehooks_form_generate( array(
269
+ 'hook' => 'genesis_site_description',
270
+ 'desc' => __( 'This hooks executes inside the header, and by default, outputs the site description.' , 'simplehooks' ),
271
+ 'unhook' => array( 'genesis_seo_site_description' ),
272
  ) );
273
 
274
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
279
 
280
  simplehooks_form_generate( array(
281
  'hook' => 'genesis_before_content_sidebar_wrap',
282
+ 'desc' => __( 'This hook executes immediately before the div block that wraps the content and the primary sidebar.', 'simplehooks' )
283
  ) );
284
 
285
  simplehooks_form_generate( array(
286
  'hook' => 'genesis_after_content_sidebar_wrap',
287
+ 'desc' => __( 'This hook executes immediately after the div block that wraps the content and the primary sidebar.', 'simplehooks' )
288
  ) );
289
 
290
  simplehooks_form_generate( array(
291
  'hook' => 'genesis_before_content',
292
+ 'desc' => __( 'This hook executes immediately before the content column.', 'simplehooks' )
293
  ) );
294
 
295
  simplehooks_form_generate( array(
296
  'hook' => 'genesis_after_content',
297
+ 'desc' => __( 'This hook executes immediately after the content column.', 'simplehooks' )
298
  ) );
299
 
300
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
421
 
422
  simplehooks_form_generate( array(
423
  'hook' => 'genesis_before_comments',
424
+ 'desc' => __( 'This hook executes immediately before the comments block.', 'simplehooks' )
425
  ) );
426
 
427
  simplehooks_form_generate( array(
428
  'hook' => 'genesis_comments',
429
+ 'desc' => __( 'This hook outputs the comments block.', 'simplehooks' ),
430
  'unhook' => array( 'genesis_do_comments' )
431
  ) );
432
 
433
  simplehooks_form_generate( array(
434
  'hook' => 'genesis_list_comments',
435
+ 'desc' => __( 'This hook executes inside the comments block. By default, it outputs a list of comments associated with a post via the <code>genesis_default_list_comments()</code> function.', 'simplehooks' ),
436
  'unhook' => array( 'genesis_default_list_comments' )
437
  ) );
438
 
439
  simplehooks_form_generate( array(
440
  'hook' => 'genesis_after_comments',
441
+ 'desc' => __( 'This hook executes immediately after the comments block.', 'simplehooks' )
442
  ) );
443
 
444
  }
447
 
448
  simplehooks_form_generate( array(
449
  'hook' => 'genesis_before_pings',
450
+ 'desc' => __( 'This hook executes immediately before the pings block.', 'simplehooks' ),
451
  'unhook' => array( 'genesis_do_pings' )
452
  ) );
453
 
454
  simplehooks_form_generate( array(
455
  'hook' => 'genesis_pings',
456
+ 'desc' => __( 'This hook outputs the pings block.', 'simplehooks' )
457
  ) );
458
 
459
  simplehooks_form_generate( array(
460
  'hook' => 'genesis_list_pings',
461
+ 'desc' => __( 'This hook executes inside the pings block. By default, it outputs a list of pings associated with a post via the <code>genesis_default_list_pings()</code> function.', 'simplehooks' ),
462
  'unhook' => array( 'genesis_default_list_pings' )
463
  ) );
464
 
465
  simplehooks_form_generate( array(
466
  'hook' => 'genesis_after_pings',
467
+ 'desc' => __( 'This hook executes immediately after the pings block.', 'simplehooks' )
468
  ) );
469
 
470
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
491
 
492
  simplehooks_form_generate( array(
493
  'hook' => 'genesis_before_comment_form',
494
+ 'desc' => __( 'This hook executes immediately before the comment form.', 'simplehooks' )
495
  ) );
496
 
497
  simplehooks_form_generate( array(
498
  'hook' => 'genesis_comment_form',
499
+ 'desc' => __( 'This hook outputs the entire comment form.', 'simplehooks' ),
500
  'unhook' => array( 'genesis_do_comment_form' )
501
  ) );
502
 
503
  simplehooks_form_generate( array(
504
  'hook' => 'genesis_after_comment_form',
505
+ 'desc' => __( 'This hook executes immediately after the comment form.', 'simplehooks' )
506
  ) );
507
 
508
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
513
 
514
  simplehooks_form_generate( array(
515
  'hook' => 'genesis_before_sidebar',
516
+ 'desc' => __( 'This hook executes immediately before the primary sidebar column.', 'simplehooks' )
517
  ) );
518
 
519
  simplehooks_form_generate( array(
524
 
525
  simplehooks_form_generate( array(
526
  'hook' => 'genesis_after_sidebar',
527
+ 'desc' => __( 'This hook executes immediately after the primary sidebar column.', 'simplehooks' )
528
  ) );
529
 
530
  simplehooks_form_generate( array(
531
  'hook' => 'genesis_before_sidebar_widget_area',
532
+ 'desc' => __( 'This hook executes immediately before the primary sidebar widget area.', 'simplehooks' )
533
  ) );
534
 
535
  simplehooks_form_generate( array(
536
  'hook' => 'genesis_after_sidebar_widget_area',
537
+ 'desc' => __( 'This hook executes immediately after the primary sidebar widget area.', 'simplehooks' )
538
  ) );
539
 
540
  simplehooks_form_generate( array(
541
  'hook' => 'genesis_before_sidebar_alt',
542
+ 'desc' => __( 'This hook executes immediately before the alternate sidebar column.', 'simplehooks' )
543
  ) );
544
 
545
  simplehooks_form_generate( array(
550
 
551
  simplehooks_form_generate( array(
552
  'hook' => 'genesis_after_sidebar_alt',
553
+ 'desc' => __( 'This hook executes immediately after the alternate sidebar column.', 'simplehooks' )
554
  ) );
555
 
556
  simplehooks_form_generate( array(
557
  'hook' => 'genesis_before_sidebar_alt_widget_area',
558
+ 'desc' => __( 'This hook executes immediately before the alternate sidebar widget area.', 'simplehooks' )
559
  ) );
560
 
561
  simplehooks_form_generate( array(
562
  'hook' => 'genesis_after_sidebar_alt_widget_area',
563
+ 'desc' => __( 'This hook executes immediately after the alternate sidebar widget area.', 'simplehooks' )
564
  ) );
565
 
566
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
571
 
572
  simplehooks_form_generate( array(
573
  'hook' => 'genesis_before_footer',
574
+ 'desc' => __( 'This hook executes immediately before the footer.', 'simplehooks' )
575
  ) );
576
 
577
  simplehooks_form_generate( array(
578
  'hook' => 'genesis_footer',
579
+ 'desc' => __( 'This hook, by default, outputs the content of the footer.', 'simplehooks' ),
580
  'unhook' => array( 'genesis_do_footer' )
581
  ) );
582
 
583
  simplehooks_form_generate( array(
584
  'hook' => 'genesis_after_footer',
585
+ 'desc' => __( 'This hook executes immediately after the footer.', 'simplehooks' )
586
  ) );
587
 
588
  submit_button( __( 'Save Changes', 'simplehooks' ), 'primary' );
plugin.php CHANGED
@@ -8,7 +8,7 @@
8
  Author: Nathan Rice
9
  Author URI: http://www.nathanrice.net/
10
 
11
- Version: 2.0.1
12
 
13
  License: GNU General Public License v2.0 (or later)
14
  License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -27,8 +27,8 @@ register_activation_hook( __FILE__, 'simplehooks_activation' );
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,7 +39,7 @@ function simplehooks_activation() {
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 ) );
8
  Author: Nathan Rice
9
  Author URI: http://www.nathanrice.net/
10
 
11
+ Version: 2.1.0
12
 
13
  License: GNU General Public License v2.0 (or later)
14
  License URI: http://www.opensource.org/licenses/gpl-license.php
27
  */
28
  function simplehooks_activation() {
29
 
30
+ if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, '2.1.0', '>=' ) )
31
+ simplehooks_deactivate( '2.1.0', '3.9.2' );
32
 
33
  }
34
 
39
  *
40
  * @since 1.8.0.2
41
  */
42
+ function simplehooks_deactivate( $genesis_version = '2.1.0', $wp_version = '3.9.2' ) {
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 ) );
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
6
- Tested up to: 3.6
7
- Stable tag: 2.0.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
 
@@ -124,4 +124,9 @@ The most common request from Genesis users is how to properly modify their foote
124
  * Remove unused boxes.php file.
125
 
126
  = 2.0.1 =
127
- * Genesis 2.0 favicon unhook location fix
 
 
 
 
 
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.9.2
6
+ Tested up to: 4.0.0
7
+ Stable tag: 2.1.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
 
124
  * Remove unused boxes.php file.
125
 
126
  = 2.0.1 =
127
+ * Genesis 2.0 favicon unhook location fix.
128
+
129
+ = 2.1.0 =
130
+ * Increased requirement to Genesis 2.1.0.
131
+ * Site title and description hooks.
132
+ * Fixed outdated hook descriptions.