Wordpress++

This commit is contained in:
nikolark committed 2015-08-22 18:55:55 +02:00
1 parent 790f1487a2
commit 3f49ab1747
610 files changed
+58979 -36562

No files matched your search

+10 -7
View File
@@ -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,8 @@ function get_pending_comments_num( $post_id ) {
* Add avatars to relevant places in admin, or try to.
*
* @since 2.5.0
* @uses $comment
*
* @global object $comment
*
* @param string $name User name.
* @return string Avatar with Admin name.
@@ -167,6 +167,9 @@ function floated_admin_avatar( $name ) {
return "$avatar $name";
}
/**
* @since 2.7.0
*/
function enqueue_comment_hotkeys_js() {
if ( 'true' == get_user_option( 'comment_shortcuts' ) )
wp_enqueue_script( 'jquery-table-hotkeys' );