Integrate post tags in Post Edit page with qTranslate

When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any). In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately after that. Looking at source … Read more

How to update widget from widget() function?

Huh. It had never actually occurred to me to use widget instance as cache. I hadn’t ever seen such implementation either. This is quite an original idea, and as such it is hard to accurately point out benefits and issues with implementation. For starters update() doesn’t actually save anything, it just used as check for … Read more

How to change submit button value in comment from “Post Comment” to “Send”

Open comments.php file inside your theme’s folder <?php if ( comments_open() ) : ?> <?php $fields = array( ‘author’ => ‘<p class=”comment-form-author”>’ . ‘<label for=”author”>’ . __( ‘Name’, ‘responsive’ ) . ‘</label> ‘ . ( $req ? ‘<span class=”required”>*</span>’ : ” ) . ‘<input id=”author” name=”author” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author’] ) . ‘” size=”30″ … Read more

Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’

Luckily, I was facing the same issue an hour ago so I brainstormed for a long time to find a find a solution. I posted it here before seeing this: http://www.hardeepasrani.com/2015/12/using-postmessage-transport-method-for-header-image/ So instead of just using: $wp_customize->get_setting( ‘header_image’ )->transport=”postMessage”; I used: $wp_customize->get_setting( ‘header_image’ )->transport=”postMessage”; $wp_customize->get_setting( ‘header_image_data’ )->transport=”postMessage”; After that, in JS, we got the value … Read more

Adding HTML within an image title attribute

First of all i’d recommend you stop using title attribute for html container purpose: Image title (and the element name speaks for itself) should provide additional information and follow the rules of the regular title: it should be relevant, short, catchy, and concise (a title “offers advisory information about the element for which it is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)