New Landing How can we help? Themeforest Theme Support Dante Problem with Dante JQuery-UI implementation?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Dante
  • #327913
    rlshaw
    Member
    Post count: 47

    We use the MP3-jPlayer plugin player with Dante and have some problems with the player which have surfaced.

    Here’s the problem description

    https://wordpress.org/support/topic/position-seek-working-only-on-1-of-our-sites/

    The developer said that the problem is likely to be coming from this:

    http://vanessashaw.com/wp-content/themes/dante/js/combine/jquery-ui-1.10.2.custom.min.js

    He said “this is the wrong way to implement jQuery-UI within wordpress, and it’s likely breaking things.”

    In particular, he notes:

    “it is the most common bad practice I see in themes, an unbelievable amount do this kind of ramming of script libraries into the page with no regard for the environment they’re functioning in.

    It’s very simple to do things properly:

    wp_enqueue_script()

    Can you take a look at this?

    cheers,

    Robert

    #328249
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    We do correctly register and enqueue the script, this can be seen in the functions.php file. Look for: wp_enqueue_script('jquery-ui');

    Knowing this, you can simply use a child theme to dequeue this.

    Please install and activate the supplied child theme, inside the child theme functions.php file paste this code below to dequeue this script file. I’d really not recommend this for that plugin though, the theme does require that JS file.

    
    		    function sf_child_remove_scripts() {
        			wp_dequeue_script('jquery-ui');
    			}
    			add_action( 'wp_enqueue_scripts', 'sf_child_remove_scripts' );

    WordPress will automatically play your MP3 file links if you paste them into your post/page content – is there a real need for the plugin?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register