fix(customizer): clarify label for disabling posts option
Updated the label for the customizer setting to 'Disable Post content type' for increased clarity and maintained code consistency. Also removed an unnecessary whitespace line in the toolbar function.
This commit is contained in:
parent
3c3c337ad7
commit
bee50a461d
1 changed files with 2 additions and 2 deletions
|
@ -1045,7 +1045,7 @@ function customize_register($wp_customize)
|
|||
|
||||
// Add control for the setting
|
||||
$wp_customize->add_control('disable_posts_control', array(
|
||||
'label' => __('Disable Posts', 'duck_behavior_journal'),
|
||||
'label' => __('Disable Post content type', 'duck_behavior_journal'),
|
||||
'section' => 'title_tagline',
|
||||
'settings' => 'disable_posts',
|
||||
'type' => 'checkbox',
|
||||
|
@ -1092,7 +1092,7 @@ add_action('pre_get_posts', 'exclude_posts_from_queries');
|
|||
function remove_posts_from_toolbar($wp_admin_bar)
|
||||
{
|
||||
$disable_posts = get_theme_mod('disable_posts', false);
|
||||
|
||||
|
||||
if ($disable_posts) {
|
||||
$wp_admin_bar->remove_node('new-post');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue