Changeset 1689
- Timestamp:
- 06/28/2015 04:42:37 PM (10 years ago)
- 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 25 25 // Disable pings. 26 26 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 );30 27 31 28 // Sets whether submitting notes is open for the user … … 80 77 81 78 /** 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 /**96 79 * Sets the default language for SyntaxHighlighter shortcode. 97 80 *
Note: See TracChangeset
for help on using the changeset viewer.