Errors while Loading Most Recent Version of jQuery

According to this article: “hover” pseudo-event As of 1.9, the event name string “hover” is no longer supported as a synonym for “mouseenter mouseleave”. This allows applications to attach and trigger a custom “hover” event. Changing existing code is a simple find/replace, and the “hover” pseudo-event is also supported in the jQuery Migrate plugin to … Read more

jQuery issue and wp_enqueue_script

Best practise while developing a WordPress theme is to always use the jquery included in WP. So deregister it and use a cdn hosted version should be avoided. This is a required practise, e.g. to include themes in wordpress repository and also some famous themes marketplaces (like themeforest) at this time do not accept themes … Read more

Enqueue script/style with multiple GET parameters

esc_url is run on the stylesheet URL and that converts those characters. You can work around it with a couple of filters. function style_params($src, $handle) { if (‘twentyfourteen-style’ == $handle) { add_filter(‘clean_url’,’alter_clean_url’,10,3); } return $src; } add_filter(‘style_loader_src’,’style_params’,10,2); function alter_clean_url($good_protocol_url, $original_url, $_context ) { remove_filter(‘clean_url’,’alter_clean_url’,10,3); $good_protocol_url = html_entity_decode($good_protocol_url); $good_protocol_url = $good_protocol_url.’&abc=def’; return $good_protocol_url; }

Theme now uses require.js and enqueue script no longer works

If the script is there it should work. It’s probably failing because you’re not declaring the jquery dependency and you’re not wrapping it correctly (in no conflict mode). Here’s how your script should be enqueued: function custom_scripts() { wp_enqueue_script( ‘unique-custom-script’, get_stylesheet_directory_uri() . ‘/custom.js’, array(‘jquery’) , false, true ); } add_action( ‘wp_enqueue_scripts’, ‘custom_scripts’, 99 ); And … Read more

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