From e3e9a8f68cf480d59d530a04eff4935bcc1eb4d1 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Thu, 23 Jun 2016 12:16:18 -0400 Subject: [PATCH] Change post_meta checkboxes to be settings aware "Don't move title" will only show if the "don't move title" is not set in the general plugin settings. --- .../class-displayfeaturedimagegenesis-postmeta.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-postmeta.php b/includes/class-displayfeaturedimagegenesis-postmeta.php index 2dbec3e..82ae905 100644 --- a/includes/class-displayfeaturedimagegenesis-postmeta.php +++ b/includes/class-displayfeaturedimagegenesis-postmeta.php @@ -43,16 +43,20 @@ class Display_Featured_Image_Genesis_Post_Meta { * @since 2.5.2 */ protected function get_checkboxes() { - return array( + $checkboxes = array( array( 'setting' => $this->disable, 'label' => __( 'Don\'t show the featured image on this post', 'display-featured-image-genesis' ), ), - array( - 'setting' => $this->move, - 'label' => __( 'Don\'t move the title to overlay the featured image on this post', 'display-featured-image-genesis' ), - ), ); + $setting = displayfeaturedimagegenesis_get_setting(); + if ( ! $setting['keep_titles'] ) { + $checkboxes[] = array( + 'setting' => $this->move, + 'label' => __( 'Don\'t move the title to overlay the backstretch featured image on this post', 'display-featured-image-genesis' ), + ); + } + return $checkboxes; } /**