Coding Standards: Reformat some long apply_filters_deprecated() and do_action_deprecated() calls for better readability.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48167 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-06-25 12:04:05 +00:00
parent de36eb3326
commit e65d19b9ed
6 changed files with 33 additions and 6 deletions
+6 -1
View File
@@ -372,7 +372,12 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
* @param string $cap Capability name.
* @param string[] $caps Array of the user's capabilities.
*/
$allowed = apply_filters_deprecated( "auth_{$object_type}_{$object_subtype}_meta_{$meta_key}", array( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ), '4.9.8', "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}" );
$allowed = apply_filters_deprecated(
"auth_{$object_type}_{$object_subtype}_meta_{$meta_key}",
array( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ),
'4.9.8',
"auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}"
);
}
if ( ! $allowed ) {
+7 -1
View File
@@ -1325,7 +1325,13 @@ function wp_blocklist_check( $author, $email, $url, $comment, $user_ip, $user_ag
* @param string $user_ip Comment author's IP address.
* @param string $user_agent Comment author's browser user agent.
*/
do_action_deprecated( 'wp_blacklist_check', array( $author, $email, $url, $comment, $user_ip, $user_agent ), '5.5.0', 'wp_blocklist_check', __( 'Please consider writing more inclusive code.' ) );
do_action_deprecated(
'wp_blacklist_check',
array( $author, $email, $url, $comment, $user_ip, $user_agent ),
'5.5.0',
'wp_blocklist_check',
__( 'Please consider writing more inclusive code.' )
);
/**
* Fires before the comment is tested for disallowed characters or words.
+6 -1
View File
@@ -132,7 +132,12 @@ function wp_insert_site( array $data ) {
* @param int $network_id Network ID. Only relevant on multi-network installations.
* @param array $meta Meta data. Used to set initial site options.
*/
do_action_deprecated( 'wpmu_new_blog', array( $new_site->id, $user_id, $new_site->domain, $new_site->path, $new_site->network_id, $meta ), '5.1.0', 'wp_insert_site' );
do_action_deprecated(
'wpmu_new_blog',
array( $new_site->id, $user_id, $new_site->domain, $new_site->path, $new_site->network_id, $meta ),
'5.1.0',
'wp_insert_site'
);
}
return (int) $new_site->id;