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:
Kumi 2024-08-03 19:56:52 +02:00
parent 3c3c337ad7
commit bee50a461d
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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');
}