General: Update code for readability and inclusion

There are two pieces in here:

1) The update to change blacklist to blocklist is moved to disallowed_list. "Block" has a meaning in our code, and there could be ambiguity between this code and code related to blocks.

2) This improves backwards compatibility for code that was accessing the now deprecated code.

Previously: [48477], [48405], [48400], [48121], [48122], [48124], [48142], [48566]

Props: desrosj, SergeyBiryukov, johnjamesjacoby
Fixes: #50413



git-svn-id: https://develop.svn.wordpress.org/trunk@48575 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin
2020-07-23 03:12:49 +00:00
parent 5e35ad2510
commit cefe2c7f7c
9 changed files with 116 additions and 39 deletions

View File

@@ -4025,7 +4025,7 @@ function wp_unregister_GLOBALS() { // phpcs:ignore WordPress.NamingConventions.
* Does comment contain disallowed characters or words.
*
* @since 1.5.0
* @deprecated 5.5.0 Use wp_blocklist_check() instead.
* @deprecated 5.5.0 Use wp_check_comment_disallowed_list() instead.
* Please consider writing more inclusive code.
*
* @param string $author The author of the comment
@@ -4037,9 +4037,9 @@ function wp_unregister_GLOBALS() { // phpcs:ignore WordPress.NamingConventions.
* @return bool True if comment contains disallowed content, false if comment does not
*/
function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) {
_deprecated_function( __FUNCTION__, '5.5.0', 'wp_blocklist_check()' );
_deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' );
return wp_blocklist_check( $author, $email, $url, $comment, $user_ip, $user_agent );
return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent );
}
/**