mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Simplify sanitize_key() and use it in more places. see #14910
git-svn-id: https://develop.svn.wordpress.org/trunk@15635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -571,7 +571,7 @@ function register_post_status($post_status, $args = array()) {
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
$args = (object) $args;
|
||||
|
||||
$post_status = sanitize_user($post_status, true);
|
||||
$post_status = sanitize_key($post_status);
|
||||
$args->name = $post_status;
|
||||
|
||||
if ( null === $args->public && null === $args->internal && null === $args->protected && null === $args->private )
|
||||
@@ -819,7 +819,7 @@ function register_post_type($post_type, $args = array()) {
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
$args = (object) $args;
|
||||
|
||||
$post_type = sanitize_user($post_type, true);
|
||||
$post_type = sanitize_key($post_type);
|
||||
$args->name = $post_type;
|
||||
|
||||
// If not set, default to the setting for public.
|
||||
|
||||
Reference in New Issue
Block a user