Skip to content
Permalink
Browse files

Imp: add an option to control the singular page featured image visibi…

…lity

disabled by default
fixes #793
  • Loading branch information
eri-trabiccolo committed May 27, 2019
1 parent 86ce189 commit 818f0770d1c44469d9b33c8512c4c15361d5211f
Showing with 26 additions and 1 deletion.
  1. +25 −0 functions/class-utils-settings-map.php
  2. +1 −1 tmpl/page-tmpl.php
@@ -113,6 +113,7 @@ function hu_popul_setting_control_map( $_map, $get_default = null ) {
//CONTENT
//'hu_content_home_sec',
'hu_content_blog_sec',
'hu_content_page_sec',
'hu_content_single_sec',
'hu_content_thumbnail_sec',
'hu_content_layout_sec',
@@ -1262,6 +1263,25 @@ function hu_content_single_sec() {
}
/*-----------------------------------------------------------------------------------------------------
SINGLE PAGE SECTION
------------------------------------------------------------------------------------------------------*/
function hu_content_page_sec() {
return array(
'singular-page-featured-image' => array(
'default' => 0,
'control' => 'HU_controls',
'label' => __( 'Featured image', 'hueman' ),
'section' => 'content_page_sec',
'type' => 'nimblecheck',
'notice' => __( 'Display the page\'s featured image, if it exists' , 'hueman')
),
);
}
/*-----------------------------------------------------------------------------------------------------
THUMBNAIL SECTION
------------------------------------------------------------------------------------------------------*/
@@ -1680,6 +1700,11 @@ function hu_popul_section_map( $_sections ) {
'panel' => 'hu-content-panel',
//'active_callback' => 'hu_is_post_list'
),
'content_page_sec' => array(
'title' => __( 'Single Pages Settings', 'hueman' ),
'priority' => 35,
'panel' => 'hu-content-panel',
),
'content_single_sec' => array(
'title' => __( 'Single Posts Settings', 'hueman' ),
'priority' => 40,
@@ -2,7 +2,7 @@

<article <?php post_class('group'); ?>>

<?php hu_get_template_part('parts/page-image'); ?>
<?php if ( hu_is_checked( 'singular-page-featured-image' ) ) { hu_get_template_part('parts/page-image'); } ?>

<div class="entry themeform">
<?php the_content(); ?>

0 comments on commit 818f077

Please sign in to comment.
You can’t perform that action at this time.