Multisite: Change WP_Network id property to an integer.

For consistency and developer sanity.

Props flixos90.
Fixes #37050.

Built from https://develop.svn.wordpress.org/trunk@37870


git-svn-id: http://core.svn.wordpress.org/trunk@37811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt
2016-06-26 14:26:29 +00:00
parent c5d9d5cc18
commit 6f3f00ea97
27 changed files with 525 additions and 270 deletions

View File

@@ -655,6 +655,60 @@ function remove_all_actions($tag, $priority = false) {
return remove_all_filters($tag, $priority);
}
/**
* Fires functions attached to a deprecated filter hook.
*
* When a filter hook is deprecated, the apply_filters() call is replaced with
* apply_filters_deprecated(), which triggers a deprecation notice and then fires
* the original filter hook.
*
* @since 4.6.0
*
* @see _deprecated_hook()
*
* @param string $tag The name of the filter hook.
* @param array $args Array of additional function arguments to be passed to apply_filters().
* @param string $version The version of WordPress that deprecated the hook.
* @param string $replacement Optional. The hook that should have been used.
* @param string $message Optional. A message regarding the change.
*/
function apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
if ( ! has_filter( $tag ) ) {
return;
}
_deprecated_hook( $tag, $version, $replacement, $message );
return apply_filters_ref_array( $tag, $args );
}
/**
* Fires functions attached to a deprecated action hook.
*
* When an action hook is deprecated, the do_action() call is replaced with
* do_action_deprecated(), which triggers a deprecation notice and then fires
* the original hook.
*
* @since 4.6.0
*
* @see _deprecated_hook()
*
* @param string $tag The name of the action hook.
* @param array $args Array of additional function arguments to be passed to do_action().
* @param string $version The version of WordPress that deprecated the hook.
* @param string $replacement Optional. The hook that should have been used.
* @param string $message Optional. A message regarding the change.
*/
function do_action_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
if ( ! has_action( $tag ) ) {
return;
}
_deprecated_hook( $tag, $version, $replacement, $message );
do_action_ref_array( $tag, $args );
}
//
// Functions for handling plugins.
//