WordPress Iris Colour Picker adding iOS touch events

After a bit of investigation, the following code will add touch events to the Iris picker which uses jQuery UI. I did have to make the color picker handle 25px x 25px so it’s easier to grab on an iPad, but other than that this works: $(document).on({ touchstart: touchHandler, touchmove: touchHandler, touchend: touchHandler, touchcancel: touchHandler … Read more

calling jquery function on plugin page

You can review the explanation here to include any script here function my_enqueue($hook) { if( ‘edit.php’ != $hook ) return; wp_enqueue_script( ‘my_custom_script’, plugins_url(‘/myscript.js’, __FILE__) ); } add_action( ‘admin_enqueue_scripts’, ‘my_enqueue’ ); The above code will add the script in all your admin pages. In order to identify the page you may follow this: if (isset($_GET[‘page’]) && … Read more

Enqueuing jQuery in plug-ins

First of all, if your code (or the theme’s code) is unregistering jQuery and re-registering it from another location (Google), you need to add this somewhere: jQuery.noConflict(); This makes jQuery cooperate with other scripts (i.e. Prototype) that try to define the $ variable globally. WordPress has this line bundled into their version, Google does not. … Read more

WordPress loads whole jQuery UI library

jQuery-UI is included in every default WP installation. Whether it is loaded depends on your theme and/or plugin(s). Three Options: live with it disable plugins one by one (and switch theme), figure out which is responsible and whether that’s needed manually deregister it (something, i.e. a plugin, will probably break)

jQuery UI Autocomplete showing all results

You get all terms because you’re asking for all terms, in fact, the line $tradeList = get_terms(‘trade’); just get all the terms, ignoring the ‘term’ query string passed to file. If you want to get all the terms “filterd” you have to use the string in the query, something like: include_once( ‘../../../wp-load.php’ ); // adjust … Read more

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