mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@32654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -20,11 +20,11 @@
|
||||
function comment_exists($comment_author, $comment_date) {
|
||||
global $wpdb;
|
||||
|
||||
$comment_author = stripslashes($comment_author);
|
||||
$comment_date = stripslashes($comment_date);
|
||||
|
||||
return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments
|
||||
WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) );
|
||||
WHERE comment_author = %s AND comment_date = %s",
|
||||
stripslashes( $comment_author ),
|
||||
stripslashes( $comment_date )
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,6 @@ function comment_exists($comment_author, $comment_date) {
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function edit_comment() {
|
||||
|
||||
if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
|
||||
wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
|
||||
|
||||
@@ -80,7 +79,7 @@ function edit_comment() {
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param int $id ID of comment to retrieve.
|
||||
* @return bool|object Comment if found. False on failure.
|
||||
* @return object|false Comment if found. False on failure.
|
||||
*/
|
||||
function get_comment_to_edit( $id ) {
|
||||
if ( !$comment = get_comment($id) )
|
||||
@@ -156,7 +155,7 @@ function get_pending_comments_num( $post_id ) {
|
||||
* Add avatars to relevant places in admin, or try to.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
*
|
||||
* @global object $comment
|
||||
*
|
||||
* @param string $name User name.
|
||||
|
||||
Reference in New Issue
Block a user