From 708d475b96803acbe5afc8f5797b6071d276e3d0 Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Sun, 22 Jul 2012 08:45:35 +0000 Subject: [PATCH] Remove unused arguments (hierarchical, _edit_link, capability_type) from register_post_status Props scribu, simonwheatley. Fixes #18578, #18972. git-svn-id: https://develop.svn.wordpress.org/trunk@21302 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index ceef94bc6b..b22abf6a82 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -671,7 +671,21 @@ function register_post_status($post_status, $args = array()) { $wp_post_statuses = array(); // Args prefixed with an underscore are reserved for internal use. - $defaults = array('label' => false, 'label_count' => false, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => null, 'internal' => null, 'protected' => null, 'private' => null, 'show_in_admin_all' => null, 'publicly_queryable' => null, 'show_in_admin_status_list' => null, 'show_in_admin_all_list' => null, 'single_view_cap' => null); + $defaults = array( + 'label' => false, + 'label_count' => false, + 'exclude_from_search' => null, + '_builtin' => false, + 'public' => null, + 'internal' => null, + 'protected' => null, + 'private' => null, + 'show_in_admin_all' => null, + 'publicly_queryable' => null, + 'show_in_admin_status_list' => null, + 'show_in_admin_all_list' => null, + 'single_view_cap' => null, + ); $args = wp_parse_args($args, $defaults); $args = (object) $args; @@ -703,7 +717,7 @@ function register_post_status($post_status, $args = array()) { $args->show_in_admin_all_list = !$args->internal; if ( null === $args->show_in_admin_status_list ) - $args->show_in_admin_status_list = !$args->internal; + $args->show_in_admin_status_list = !$args->internal; if ( null === $args->single_view_cap ) $args->single_view_cap = $args->public ? '' : 'edit';