WordPress.org

Ready to get started?Download WordPress

Forums

Facebook AWD All in one
[resolved] jQuery CSS Admin Area issue (9 posts)

  1. AITpro
    Member
    Posted 2 years ago #

    Hello,
    The jquery-ui-1.8.14.custom.css script is loading throughout the entire WP Admin area including all other plugin's options pages, which is interfering with other jquery css scripts for other plugins. Please see this post as a reference on how to correct this. http://www.ait-pro.com/aitpro-blog/2734/wordpress-tips-tricks-fixes/wordpress-load-css-and-js-scripts-on-wordpress-plugin-pages-only-wordpress-top-level-plugin-menu-admin-scripts/
    Thank you.

    Currently i am disabling your jquery CSS from loading throughout the entire WP Admin area with FilesMatch.

    <FilesMatch "^(wp-config\.php|php\.ini|php5\.ini|readme\.html|bb-config\.php|jquery-ui-1.8.14.custom\.css)">
    Order allow,deny
    Deny from all
    #Allow from 88.77.66.55
    </FilesMatch>

    http://wordpress.org/extend/plugins/facebook-awd/

  2. AITpro
    Member
    Posted 2 years ago #

    Also jquery-ui-1.8.14.custom.min.js is being blocked as well with FilesMatch until this issue can be corrected. This unfortunately causes your plugin to break.

  3. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    I am woking on new verion 0.9.9,
    I will add some special hook to add this file only where it's needed.

    this file is needed in all post type editor, and in AWD pages.
    It will be fixed in 0.9.9

    I created an issue tracker for that.
    http://trac.ahwebdev.fr/issues/84

    Thanks!

  4. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    In fact i can't limit the UI.css only in admin pages of AWd.

    This file is required to get hte openGraph form to work on all edit page,

    if you want remove it, you can simply add wp_dequeue_style and wp_dequeue_script functions.
    in a plugin in the init hook of your admin.

    you can do

    <?php
    global $AWD_facebook;
    wp_dequeue_style($AWD_facebook->plugin_slug.'-jquery-ui');
    wp_dequeue_script($AWD_facebook->plugin_slug.'-jquery-ui');
     ?>
  5. AITpro
    Member
    Posted 2 years ago #

    Does openGraph need to work throughout the WordPress admin backend area and in other plugin's admin options pages? I think you mean that it only needs to be loaded everywhere on the front end of WordPress, which is fine and would not interfere with WordPress or other plugins.

    Did you look at the link i posted in my first comment above. It shows how to contain your plugin's css and js from loading throughout the WordPress backend and only loading in your plugin's options pages, which it should already be doing. It may be that you need to use a specific WP function that is specific to loading scripts in the admin area and also a separate function for loading your scripts throughout the frontend of WP for your type of plugin.

    I don't think it is appropriate for me to add coding to compensate for a coding flaw in your plugin. There are many other plugins that share the WP jquery libraries without causing problems for other plugins - my plugin BPS is not interfering with your plugin because i have contained my css and js to my plugin admin options pages so you should also implement this in your plugin. Thanks.

  6. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    I know perfectly how to add script on specific pages,

    You just need to wait the 0.9.9, or just use the solution above.
    OpenGrapah need the Jquery UI in admin post, page, and cutom post type editor page.
    So i need to list all the edit page that is used, and add the library only on it.

    Thank you

  7. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    Note: the next version of the plugin contains majors update, so It will only work on wordpress 3.3 and after.

  8. AITpro
    Member
    Posted 2 years ago #

    Oh my mistake. I did not realize that you were offering this fix as an interim fix. I apologize for that misunderstanding. Thanks.

  9. AHWEBDEV
    Member
    Plugin Author

    Posted 2 years ago #

    Your welcome, my english is so poor...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic