Adds option to hide core title from metadata list, as it already appears on the page title.
This commit is contained in:
parent
ce74fc429d
commit
cd9c3390eb
|
@ -639,6 +639,29 @@ function tainacan_customize_register( $wp_customize ) {
|
|||
'fallback_refresh' => true
|
||||
) );
|
||||
|
||||
/**
|
||||
* Adds options to hide or no the core metadada in the metadada list.
|
||||
*/
|
||||
$wp_customize->add_setting( 'tainacan_single_item_hide_core_title_metadata', array(
|
||||
'type' => 'theme_mod',
|
||||
'capability' => 'edit_theme_options',
|
||||
'default' => false,
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'tainacan_callback_sanitize_checkbox'
|
||||
) );
|
||||
$wp_customize->add_control( 'tainacan_single_item_hide_core_title_metadata', array(
|
||||
'type' => 'checkbox',
|
||||
'priority' => 2, // Within the section.
|
||||
'section' => 'tainacan_single_item_page',
|
||||
'label' => __( 'Hide core title from metadata list', 'tainacan-interface' ),
|
||||
'description' => __( 'Toggle to hide or not the core title from the metadada list, as it already appears on the page title.', 'tainacan-interface' )
|
||||
) );
|
||||
$wp_customize->selective_refresh->add_partial( 'tainacan_single_item_hide_core_title_metadata', array(
|
||||
'selector' => '.metadata-type-core_title',
|
||||
'render_callback' => '__return_false',
|
||||
'fallback_refresh' => true
|
||||
) );
|
||||
|
||||
/**
|
||||
* Adds options to control single items page number of metadata columns.
|
||||
*/
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
'after_title' => '</h3>',
|
||||
'before_value' => '<p>',
|
||||
'after_value' => '</p></div>',
|
||||
'exclude_title' => get_theme_mod('tainacan_single_item_hide_core_title_metadata', false)
|
||||
);
|
||||
//$field = null;
|
||||
tainacan_the_metadata( $args );
|
||||
|
|
Loading…
Reference in New Issue