Make WordPress Core

Ticket #17447: patch_commit_7407597a15e3.patch

File patch_commit_7407597a15e3.patch, 878 bytes (added by nickciske, 11 years ago)

Cleaned up (formatting & style) -- allows filtering of all args for custom types, but only label filtering for _builtin types.

  • wp-includes/post.php

    diff --git a/wp-includes/post.php b/wp-includes/post.php
    index 5d56c45c994e1cdbd8a25d95fe25e95661578e95..8adb3cff12ca878568eb6e359ec5c70086268801 100644
    a b function register_post_type( $post_type, $args = array() ) { 
    12141214                '_edit_link'           => 'post.php?post=%d',
    12151215        );
    12161216       
    1217         // Allow filtering of all arguments for non built-in post types
    1218         if( $args['_builtin'] == false ){
     1217        // Allow filtering of all arguments for non built-in post types.
     1218        if( false == $args['_builtin'] )
    12191219                $args = apply_filters( 'register_post_type_args', $args, $post_type );
    1220         }
    12211220
    1222         // Allow filtering of labels for all post types
     1221        // Allow filtering of labels for all post types.
    12231222        $args['labels'] = apply_filters( 'register_post_type_labels', $args['labels'], $post_type );
    12241223
    12251224        $args = wp_parse_args( $args, $defaults );