Wordpress: Plugin jQuery Conflict

  • Status Closed
  • Budget £20 - £250 GBP
  • Total Bids 8

Project Description

Our plugin named CSV 2 POST conflicts with some other plugins and themes. The plugins main developer spent an entire day trying to fix it but all we can do is confirm what code triggers the problem and provide example conflicts. This task could be very quick for anyone with experience in Wordpress script loading and debugging script.

The conflict causes our use of jQuery UI tabs to fail and so multiple screens are stacked with a list of links at the top.

Example Conflicting Plugin: Wordfence Security

This plugin can be downloaded by searching Wordfence in your blogs admin. It happens to be great plugin and highly recommended to anyone not yet taking care of security in Wordpress.

The specific lines in Wordfence Security that load scripts which conflict with CSV 2 POST are on lines 1354 and 1355 in wordfenceClass.php. They are wp_enqueue_style('wp-pointer') and wp_enqueue_script('wp-pointer'). So the conflict is wp-pointer script being loaded and may happen with other plugins. It is a standard Wordpress core script and always registered.

CSV 2 POST Conflict

CSV 2 POST by Zara Walsh can be found on [url removed, login to view] by searching CSV 2 POST on the Wordpress plugins screen in the blog admin. Please install this first and see how our plugin is meant to look. We may be updating it very soon to improve installation.

The wp-pointer script conflicts with our jQuery UI button and possibly our use of jQuery UI dialog but we know for sure the removal of the button allows the CSV 2 POST screen to operate correctly, in most ways. The script for the button is called using a PHP function on many screens csv2post_jquery_button(). The main use of the button code is at the end of our forms however it is used in around 15 different files. Our forms are finished using csv2post_formend_standard().

The button...

<button id="">

The script...

$(function() {

$( "button, input:submit, a", ".jquerybutton" ).button();

$( "a", ".jquerybutton" ).click(function() { return false; });


Our Script Loading

We use PHP function csv2post_print_admin_scripts() and csv2post_ADDACTION_admin_init_registered_scripts(). These function names may change eventually but we'll try not to continue our re-structuring work until this is complete. If you cannot find the functions in a search just search wp_register_script() and wp_enqueue_script(). We do load scripts properly and only when on a CSV 2 POST screen. The example plugins and examples of conflicting themes can be giving which load scripts at all times. Sometimes they must, sometimes the author just has not avoided loading scripts on all admin pages. Either way the fault looks to be CSV 2 POST and it is urgent we fix it.

We use these two lines in csv2post.php. The first loads script files the second prints them as any Wordpress developer knows. Both are placed for happening within admin and when on CSV 2 POST screens.


add_action( 'wp_print_scripts', 'csv2post_print_admin_scripts' );

Get free quotes for a project like this
Awarded to:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online