From bee50a461d85aa8cc242577824f20c6a5cd1a04f Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 3 Aug 2024 19:56:52 +0200 Subject: [PATCH] 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. --- functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 358309a..7dada97 100644 --- a/functions.php +++ b/functions.php @@ -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'); }