From fd0925a920d6b2ca31872c28bc66dc13bc78521a Mon Sep 17 00:00:00 2001 From: Peter Westwood 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: https://develop.svn.wordpress.org/trunk@13413 602fd350-edb4-49c9-b593-d223f7449a82 --- 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' ); ?>