WordPress.org

Make WordPress Core

Changeset 21302


Ignore:
Timestamp:
07/22/2012 08:45:35 AM (9 years ago)
Author:
duck_
Message:

Remove unused arguments (hierarchical, _edit_link, capability_type) from register_post_status

Props scribu, simonwheatley. Fixes #18578, #18972.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r21286 r21302  
    672672
    673673    // Args prefixed with an underscore are reserved for internal use.
    674     $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);
     674    $defaults = array(
     675        'label' => false,
     676        'label_count' => false,
     677        'exclude_from_search' => null,
     678        '_builtin' => false,
     679        'public' => null,
     680        'internal' => null,
     681        'protected' => null,
     682        'private' => null,
     683        'show_in_admin_all' => null,
     684        'publicly_queryable' => null,
     685        'show_in_admin_status_list' => null,
     686        'show_in_admin_all_list' => null,
     687        'single_view_cap' => null,
     688    );
    675689    $args = wp_parse_args($args, $defaults);
    676690    $args = (object) $args;
     
    704718
    705719    if ( null === $args->show_in_admin_status_list )
    706             $args->show_in_admin_status_list = !$args->internal;
     720        $args->show_in_admin_status_list = !$args->internal;
    707721
    708722    if ( null === $args->single_view_cap )
Note: See TracChangeset for help on using the changeset viewer.