Genesis Title Toggle - Version 1.6.2

Version Description

  • Fix issue when you have all titles disabled by default
Download this release

Release Info

Developer billerickson
Plugin Icon 128x128 Genesis Title Toggle
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

Files changed (2) hide show
  1. genesis-title-toggle.php +7 -5
  2. readme.txt +5 -2
genesis-title-toggle.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Turn on/off page titles on a per page basis, and set sitewide defaults from Theme Settings. Must be using the Genesis theme.
6
  * Author: Bill Erickson
7
  * Author URI: http://www.billerickson.net
8
- * Version: 1.6.1
9
  * Text Domain: genesis-title-toggle
10
  * Domain Path: languages
11
  *
@@ -189,8 +189,10 @@ class BE_Title_Toggle {
189
  $default = genesis_get_option( 'be_title_toggle_' . $post_type );
190
 
191
  // Grab current value
192
- $value = get_post_meta( get_the_ID(), 'be_title_toggle_hide', true );
193
- $value = ( !empty( $value ) ? true : false );
 
 
194
 
195
  // Security nonce
196
  wp_nonce_field( 'be_title_toggle', 'be_title_toggle_nonce' );
@@ -202,7 +204,7 @@ class BE_Title_Toggle {
202
  // Hide by default
203
  printf( '<label for="be_title_toggle_show">%s</label>', __( 'Show Title', 'genesis-title-toggle' ) );
204
 
205
- echo '<input type="checkbox" id="be_title_toggle_show" name="be_title_toggle_show" ' . checked( true , $value, false ) . ' style="margin:0 20px 0 10px;">';
206
 
207
  printf( '<span style="color:#999;">%s</span>', __( 'By default, this post type is set to remove titles. This checkbox lets you show this specific page&rsquo;s title.', 'genesis-title-toggle' ) );
208
 
@@ -213,7 +215,7 @@ class BE_Title_Toggle {
213
  // Show by default
214
  printf( '<label for="be_title_toggle_hide">%s</label>', __( 'Hide Title', 'genesis-title-toggle' ) );
215
 
216
- echo '<input type="checkbox" id="be_title_toggle_hide" name="be_title_toggle_hide" ' . checked( true , $value, false ) . ' style="margin:0 20px 0 10px;">';
217
 
218
  printf( '<span style="color:#999;">%s</span>', __( 'By default, this post type is set to display titles. This checkbox lets you hide this specific page&rsquo;s title.', 'genesis-title-toggle' ) );
219
 
5
  * Description: Turn on/off page titles on a per page basis, and set sitewide defaults from Theme Settings. Must be using the Genesis theme.
6
  * Author: Bill Erickson
7
  * Author URI: http://www.billerickson.net
8
+ * Version: 1.6.2
9
  * Text Domain: genesis-title-toggle
10
  * Domain Path: languages
11
  *
189
  $default = genesis_get_option( 'be_title_toggle_' . $post_type );
190
 
191
  // Grab current value
192
+ $hide = get_post_meta( get_the_ID(), 'be_title_toggle_hide', true );
193
+ $hide = !empty( $hide ) ? true : false;
194
+ $show = get_post_meta( get_the_ID(), 'be_title_toggle_show', true );
195
+ $show = !empty( $show ) ? true : false;
196
 
197
  // Security nonce
198
  wp_nonce_field( 'be_title_toggle', 'be_title_toggle_nonce' );
204
  // Hide by default
205
  printf( '<label for="be_title_toggle_show">%s</label>', __( 'Show Title', 'genesis-title-toggle' ) );
206
 
207
+ echo '<input type="checkbox" id="be_title_toggle_show" name="be_title_toggle_show" ' . checked( true , $show, false ) . ' style="margin:0 20px 0 10px;">';
208
 
209
  printf( '<span style="color:#999;">%s</span>', __( 'By default, this post type is set to remove titles. This checkbox lets you show this specific page&rsquo;s title.', 'genesis-title-toggle' ) );
210
 
215
  // Show by default
216
  printf( '<label for="be_title_toggle_hide">%s</label>', __( 'Hide Title', 'genesis-title-toggle' ) );
217
 
218
+ echo '<input type="checkbox" id="be_title_toggle_hide" name="be_title_toggle_hide" ' . checked( true , $hide, false ) . ' style="margin:0 20px 0 10px;">';
219
 
220
  printf( '<span style="color:#999;">%s</span>', __( 'By default, this post type is set to display titles. This checkbox lets you hide this specific page&rsquo;s title.', 'genesis-title-toggle' ) );
221
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: billerickson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EDYM76U6BTE5L
4
  Tags: genesis, genesiswp, title,
5
  Requires at least: 3.0
6
- Tested up to: 4.0
7
- Stable tag: 1.6.1
8
 
9
  Turn on/off page titles on a per page basis, and set sitewide defaults from Theme Settings. Must be using the Genesis theme.
10
 
@@ -40,6 +40,9 @@ Finally, if you're comfortable with code you can use the `be_title_toggle_post_t
40
 
41
  == Changelog ==
42
 
 
 
 
43
  = 1.6.1 =
44
  * Fix issue with HTML5 themes using post formats
45
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EDYM76U6BTE5L
4
  Tags: genesis, genesiswp, title,
5
  Requires at least: 3.0
6
+ Tested up to: 4.3
7
+ Stable tag: 1.6.2
8
 
9
  Turn on/off page titles on a per page basis, and set sitewide defaults from Theme Settings. Must be using the Genesis theme.
10
 
40
 
41
  == Changelog ==
42
 
43
+ = 1.6.2 =
44
+ * Fix issue when you have all titles disabled by default
45
+
46
  = 1.6.1 =
47
  * Fix issue with HTML5 themes using post formats
48