WordPress.org

Ready to get started?Download WordPress

Ideas

Plugin de/activate scripts and styles, option.

  1. Covi
    Member

    I feel that it's quite negative for any developement...:

    remove_action('wp_head', 'downloads_css'); // Download Manager
    remove_action('wp_head', 'ngg_addjs', 1); // NextGenGallery
    remove_action('wp_head', 'FlashVideo_head', 1); // Plugin Flash VĂ­deo
    remove_action('wp_head', 'swas_footnote_insert_styles', 1); // Plugin Footnotes
    remove_action('wp_head', 'some_inject_code_in_especial_if_don't_use_wp_register'); // Other Plugin

    *Only are examples, I like these plugins.

    Think we need a simple option in each plugin wich that allows a user to activate or deactivate the inject code in wp_head for scripts, styles...

    I know,... the plugins should use wp_register_x and, ourself, we can use wp_deregister but, IMHumbleO, I think we can implemented a simple option in the options plugin page, so easy as:
    Print Styles?
    Print Scripts?

    if ( $options['print_styles'] )
    	add_action('wp_head', 'hook_action_style')
    ...

    ...in adition, I support the idea of using, from the core (WP_PrintX), the Minify library (Google Code http://code.google.com/p/minify/ by Ryan Grove Steve Clay) for compress and compile some static files, at least in a optional way.

    So... what do you think?.

    PD: Sincerely, sorry my... "bad?" ^.^! english :(
    ;)

    Posted: 5 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    0 Votes
  • Status

    Sorry, not right now