Thanks for the great question.The delay that you're seeing ( I'm guessing in Firebug ) is attributed to the overhead of your particular installation of WordPress®. s2Member loads it's CSS through WordPress® to
maximize the flexibility of it's framework. If you're running lots of other plugins, it could add to the overhead you're seeing.
That being said, if you would rather load a static CSS file, you can create a PHP file at this location:
/wp-content/mu-plugins/my-s2member-hacks.php- Code: Select all
<?php
add_action("ws_plugin__s2member_during_add_css", "use_static_css_for_s2member");
function use_static_css_for_s2member(){
wp_dequeue_style("ws-plugin--s2member");
wp_enqueue_style("ws-plugin--s2member", "http://path/to/your.css");
}
if(!function_exists('wp_dequeue_style')) {
function wp_dequeue_style( $handle ) {
global $wp_styles;
if ( !is_a($wp_styles, 'WP_Styles') )
$wp_styles = new WP_Styles();
$wp_styles->dequeue( $handle );
}
}
?>
This code is untested ( just wrote this up quickly ) but it should do the trick. If you don't have an /mu-plugins/ directory, please create one. /mu-plugins = Must use plugins, which are loaded automatically.
Related Codex topic:
http://codex.wordpress.org/Function_Ref ... ueue_style