WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Exclure certains scripts dans le backend

[Resolved] Exclure certains scripts dans le backend

  • Tout est dans le titre.

    Déjà bravo pour ce plugin (qui fonctionne à merveille sur l’un de mes sites).
    Cependant sur un autre site un peu plus complexe, les scripts ne sont pas forcément exécutés dès lors qu’ils sont différés.

    Je me demandais s’il n’y avait pas moyen de couper la poire en deux en permettant d’exclure certains scripts via l’interface d’administration.

    http://wordpress.org/extend/plugins/wp-deferred-javascripts/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Daniel Roch

    @confridin

    Hi Nedmic,

    PS : le forum étant en anglais, on est forcé de parler dans la langue de Shakespear.

    It’s a bit complex to do, and i’m not sure it will help. If our plugin breaks your WordPress, it means that your theme or one of your plugins do not enqueue script properly.

    Hi Daniel.

    Thanks for your answer.
    Actually, I thought it was possible to do like in the WP Minify plugin, in which we can write the path from the script directly into a text field in order to exclude it.

    Just in case, the plugins which don’t work are widgetkit (from yootheme) and gd star ratings.

    PS : ‘sont fous ces ricains ^^

    Plugin Author Daniel Roch

    @confridin

    Ok, i’ll check this with the main author of this plugin to see if we can include this improvement.

    For now, can you mark this topic as resolved (this is not really a bug).

    Great can’t wait 😉

    Nice plugin but same problem ^^, i wait for excluding possibilities !
    My theme is fullscene and all the content is loaded by a script, as you can look, and it must be out of the asynchrone loop else any content is load ! :p
    Thanks a lot

    It would also be nice to exclude specific pages with sub pages because it works on my site but only a gallery page/plugin doesn’t work with it.

    Hello, really nice plugin but I have the same problem, only one plugin is not working and I am sure it will work perfect if we could exclude specific pages!

    thank you :S

    Plugin Author Willy Bahuaud

    @willybahuaud

    You can now exclude some scripts from queuing process using the ‘do_not_defer’ filter hook. You have to return an array of scripts handles in it, like this :

    function scripts_to_not_defer(){
    return array('jquery','custom-script');
    }
    add_filter('do_not_defer','scripts_to_not_defer');

    You can also take another way using ‘wdjs_before_end_lab’ fitler hook to had a callback function after labJS process…

    is it possible to specify filename extension as style.css ?

    Plugin Author Willy Bahuaud

    @willybahuaud

    Nope, only javascript handlers. But styles will not be deferred 🙂

    sorry, little mistake for script.js 🙂

    is it possible to create an option page in backend to exclude script, the user just need to add the script name enqueue ?

    Or maybe an another solution would be better is to select which script who want deffering because actually too much plugins can’t work with your plugin.

    Instead deffering all, let user choice which script

    Plugin Author Willy Bahuaud

    @willybahuaud

    We wont add an option page to exclude script. You just have to use the “do_not_defer” hook, passing an array of script handle 🙂

    How could it be easiest ?

    If you can find the “script name” which cause error, I think you’re able to add this line of code in “function.php” of your theme. We dont want to overload WordPress backend with unnecessary information for the final user. Are you agree ?

    In fact, with revolution slider, layer slider or other sames plugins there are a lot of errors.

    I understand you don’t want add an option to exclude script but if you add a hook for only include what we want it would be better because when you have more than 20 javascripts files, it’s hard difficult to find errors

    any suggests ?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Exclure certains scripts dans le backend’ is closed to new replies.