From 34d3291d3287fd3e6a23e6eb85c239cc982e46c0 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 25 Feb 2010 21:56:28 +0000 Subject: [PATCH] Disable update service editing by default for multisite. See #12229. Introduce __return_false for simple filtering. See #12381. git-svn-id: http://svn.automattic.com/wordpress/trunk@13413 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 11 +++++++++++ wp-includes/ms-default-filters.php | 3 +++ 2 files changed, 14 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ee1c297dd9..a4a408db3b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -4042,4 +4042,15 @@ function get_file_data( $file, $default_headers, $context = '' ) { function _search_terms_tidy($t) { return trim($t, "\"'\n\r "); } + +/** + * Returns false + * + * Useful for returning false to filters easily + * + * @return bool false + */ +function __return_false() { + return false; +} ?> \ No newline at end of file diff --git a/wp-includes/ms-default-filters.php b/wp-includes/ms-default-filters.php index 33c36deef7..3ba2ea9fb4 100644 --- a/wp-includes/ms-default-filters.php +++ b/wp-includes/ms-default-filters.php @@ -36,4 +36,7 @@ add_filter ( 'wp_mail_from', 'wordpressmu_wp_mail_from' ); add_action( "phpmailer_init", "fix_phpmailer_messageid" ); + +// Disable somethings by default for multisite +add_filter( 'enable_update_services_configuration', '__return_false' ); ?>