Make WordPress Core


Ignore:
Timestamp:
11/17/2010 06:21:34 AM (14 years ago)
Author:
nacin
Message:

Don't check post_type_supports in map_meta_cap. see #14122.

File:
1 edited

Legend:

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

    r16273 r16422  
    832832        }
    833833
    834         if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' ) ) {
     834        if ( '' != $post->post_author ) {
    835835            $post_author_data = get_userdata( $post->post_author );
    836836        } else {
    837             // No author set yet or post type doesn't support authors,
    838             // so default to current user for cap checks.
     837            // No author set yet, so default to current user for cap checks.
    839838            $post_author_data = $author_data;
    840839        }
     
    875874        }
    876875
    877         if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' ) ) {
     876        if ( '' != $post->post_author ) {
    878877            $post_author_data = get_userdata( $post->post_author );
    879878        } else {
    880             // No author set yet or post type doesn't support authors,
    881             // so default to current user for cap checks.
     879            // No author set yet, so default to current user for cap checks.
    882880            $post_author_data = $author_data;
    883881        }
     
    922920        }
    923921
    924         if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' ) ) {
     922        if ( '' != $post->post_author ) {
    925923            $post_author_data = get_userdata( $post->post_author );
    926924        } else {
    927             // No author set yet or post type doesn't support authors,
    928             // so default to current user for cap checks.
     925            // No author set yet, so default to current user for cap checks.
    929926            $post_author_data = $author_data;
    930927        }
Note: See TracChangeset for help on using the changeset viewer.