From e83b6365d5019de9b5d60df5b1d52c5cb004f8ae Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Thu, 7 Jul 2016 17:41:24 -0400 Subject: [PATCH] Update help tabs for style settings --- ...s-displayfeaturedimagegenesis-helptabs.php | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-helptabs.php b/includes/class-displayfeaturedimagegenesis-helptabs.php index 4e31f98..88ed904 100644 --- a/includes/class-displayfeaturedimagegenesis-helptabs.php +++ b/includes/class-displayfeaturedimagegenesis-helptabs.php @@ -12,7 +12,7 @@ class Display_Featured_Image_Genesis_HelpTabs extends Display_Featured_Image_Gen * Base id for the help tabs * @var string $id */ - protected $id = 'displayfeaturedimage-help'; + protected $id = 'displayfeaturedimage-help-'; /** * Help tab for settings screen @@ -40,6 +40,26 @@ class Display_Featured_Image_Genesis_HelpTabs extends Display_Featured_Image_Gen $active_tab = $this->get_active_tab(); switch ( $active_tab ) { + case 'style': + $help_tabs = array( + array( + 'id' => $this->id . 'less_header', + 'title' => __( 'Height', 'display-featured-image-genesis' ), + 'content' => $this->height(), + ), + array( + 'id' => $this->id . 'centering', + 'title' => __( 'Centering', 'display-featured-image-genesis' ), + 'content' => $this->centering(), + ), + array( + 'id' => $this->id . 'fade', + 'title' => __( 'Fade', 'display-featured-image-genesis' ), + 'content' => $this->fade(), + ), + ); + break; + case 'cpt': $help_tabs = array( array( @@ -69,11 +89,6 @@ class Display_Featured_Image_Genesis_HelpTabs extends Display_Featured_Image_Gen default: $help_tabs = array( - array( - 'id' => $this->id . 'less_header', - 'title' => __( 'Height', 'display-featured-image-genesis' ), - 'content' => $this->height(), - ), array( 'id' => $this->id . 'default', 'title' => __( 'Default Featured Image', 'display-featured-image-genesis' ), @@ -113,7 +128,6 @@ class Display_Featured_Image_Genesis_HelpTabs extends Display_Featured_Image_Gen break; } - return $help_tabs; } @@ -261,4 +275,25 @@ class Display_Featured_Image_Genesis_HelpTabs extends Display_Featured_Image_Gen return $help; } + + /** + * Help text for the centering settings. + * @return string + * @since 2.6.0 + */ + protected function centering() { + $help = '

' . __( 'By default, backstretch images are centered both vertically and horizontally. If centering is disabled horizontally, the image will start at left edge of the screen; if vertically, the top of the image will align with the top of the screen.', 'display-featured-image-genesis' ) . '

'; + $help .= '

' . __( 'Depending on the screen size and orientation, this can make a significant difference in the output of the image. Please note that although not all images will center well, not all images will not center well, either.', 'display-featured-image-genesis' ) . '

'; + + return $help; + } + + /** + * Help text for the fade setting. + * @return string + * @since 2.6.0 + */ + protected function fade() { + return '

' . __( 'By default, the backstretch image takes 750 milliseconds to fade in once the image has loaded into the browser. You can make the image fade in more quickly or slowly, as you prefer.', 'display-featured-image-genesis' ) . '

'; + } }