icon-256x256

The plugin can create beautiful Google Charts based on your SQL queries, then you can use those charts in any part of your website: 1. Give any name to your report. 2. Use our preinstalled chart or create new one yourself: choose desired chart type, type sql query, enter field names, labels and then press to Publish/Update 3. After update/save you will see needed shortcode below there. Then you can use that shortcode anywhere in your website: in pages, posts, widgets etc. Continue reading →

200

WP-Admin has Comments section, which gives us ability to edit comments. But they let us edit only 4 fields: Name, Email, Url, Content.

But what about another data?  This bloggy section of WordPress is outmoded and needs improvements. For example if i change Name field there, it will just change the name field in wp_comments mysql table. But authorhip is defined by user_id and user email, not by name. So changing name is not serious change.

What about wp_update_comment( $commentarr ); function? It neither doesn’t help. Although we pass userid,email parameters via $commentarr  argument, it will not take any effect. Why? For knowing the reason we should check wp core code, namely wp-includes/comment.php, we will see such piece there:

$keys = array( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent' ); $data = wp_array_slice_assoc( $data, $keys ); $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );

Continue reading →