Making WordPress.org

Changeset 1092


Ignore:
Timestamp:
01/06/2015 06:11:40 PM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Remove unnecessary post_type_supports_user_notes()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r1090 r1092  
    910910
    911911    /**
    912      * Does the post type support having user notes?
    913      *
    914      * Currently all parsed post types support user notes.
    915      *
    916      * @param  null|string $post_type Optional. The post type name. If null, assumes current post type. Default null.
    917      *
    918      * @return bool
    919      */
    920     function post_type_supports_user_notes( $post_type = null ) {
    921         return is_parsed_post_type( $post_type );
    922     }
    923 
    924     /**
    925912     * Retrieve the root directory of the parsed WP code.
    926913     *
     
    10241011     */
    10251012    function can_user_post_note( $open, $post ) {
    1026 
    1027         // Only proceed if the post type is one that has user contributed notes.
    1028         if ( ! post_type_supports_user_notes( get_post_type( $post ) ) ) {
     1013        // Only proceed if for a parsed post type.
     1014        if ( ! is_parsed_post_type( get_post_type( $post ) ) ) {
    10291015            // Temporarily disable commenting that isn't for a note since various
    10301016            // changes need to take place to enable regular commenting.
Note: See TracChangeset for help on using the changeset viewer.