Making WordPress.org

Changeset 1689


Ignore:
Timestamp:
06/28/2015 04:42:37 PM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Remove restriction that user must be member of blog to post user contributed notes.

Fixes #1094.

File:
1 edited

Legend:

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

    r1678 r1689  
    2525        // Disable pings.
    2626        add_filter( 'pings_open',                       '__return_false' );
    27 
    28         // Restricts commenting to logged in users.
    29         add_filter( 'comments_open',                    array( __CLASS__, 'prevent_invalid_comment_submissions' ), 10, 2 );
    3027
    3128        // Sets whether submitting notes is open for the user
     
    8077
    8178    /**
    82      * Disables commenting to invalid or non-users.
    83      *
    84      * @param bool  $status Default commenting status for post.
    85      * @return bool False if commenter isn't a user, otherwise the passed in status.
    86      */
    87     public static function prevent_invalid_comment_submissions( $status, $post_id ) {
    88         if ( $_POST && ( ! is_user_logged_in() || ! is_user_member_of_blog() ) ) {
    89             return false;
    90         }
    91 
    92         return $status;
    93     }
    94 
    95     /**
    9679     * Sets the default language for SyntaxHighlighter shortcode.
    9780     *
Note: See TracChangeset for help on using the changeset viewer.