From 70ed7d33638afd5cc9d6fd6d4bc8f68c07958935 Mon Sep 17 00:00:00 2001 From: Vincent Rozenberg Date: Tue, 24 Sep 2024 10:17:00 +0200 Subject: [PATCH] Add files via upload --- vincent-defaults.php | 102 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 vincent-defaults.php diff --git a/vincent-defaults.php b/vincent-defaults.php new file mode 100644 index 0000000..fa17c3c --- /dev/null +++ b/vincent-defaults.php @@ -0,0 +1,102 @@ +query(" + UPDATE $wpdb->posts + SET comment_status = 'closed', ping_status = 'closed' + WHERE post_status = 'publish' + "); +} +register_activation_hook(__FILE__, 'vincent_disable_comments_settings'); + +// Remove Quick Draft from the dashboard +function vincent_remove_dashboard_widgets() { + remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); +} +add_action('wp_dashboard_setup', 'vincent_remove_dashboard_widgets' ); + +// Hide the 'About WordPress' icon in the admin bar +function vincent_remove_wp_logo_from_admin_bar() { + global $wp_admin_bar; + if (is_admin_bar_showing()) { + $wp_admin_bar->remove_node('wp-logo'); + } +} +add_action('wp_before_admin_bar_render', 'vincent_remove_wp_logo_from_admin_bar'); + +// Hide 'Thank you for creating with WordPress' from the footer +function vincent_remove_footer_admin() { + remove_filter('admin_footer_text', 'core_update_footer'); + add_filter('admin_footer_text', '__return_empty_string', 11); +} +add_action('admin_menu', 'vincent_remove_footer_admin'); \ No newline at end of file