Make WordPress Core


Ignore:
Timestamp:
05/29/2015 08:16:22 PM (10 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing.
Some functions can simply return apply_filters(...) instead of setting a variable that is immediately returned.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/comment.php

    r32642 r32654  
    2121    global $wpdb;
    2222
    23     $comment_author = stripslashes($comment_author);
    24     $comment_date = stripslashes($comment_date);
    25 
    2623    return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments
    27             WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) );
     24            WHERE comment_author = %s AND comment_date = %s",
     25            stripslashes( $comment_author ),
     26            stripslashes( $comment_date )
     27    ) );
    2828}
    2929
     
    3434 */
    3535function edit_comment() {
    36 
    3736    if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
    3837        wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
     
    8180 *
    8281 * @param int $id ID of comment to retrieve.
    83  * @return bool|object Comment if found. False on failure.
     82 * @return object|false Comment if found. False on failure.
    8483 */
    8584function get_comment_to_edit( $id ) {
     
    157156 *
    158157 * @since 2.5.0
    159  * 
     158 *
    160159 * @global object $comment
    161160 *
Note: See TracChangeset for help on using the changeset viewer.