pippinsplugins / bbPress-Private-replies

A simple bbPress extension for allowing users to mark their replies as private
13 stars 19 forks source link

Remove action that triggers the css file #16

Closed ahansson89 closed 9 years ago

ahansson89 commented 10 years ago

I think it is a waste to use a request for one line of css, so I am trying to remove the action that is triggering the enqueued css file:

remove_action( 'wp_enqueue_scripts', array( 'BBP_Private_Replies', 'register_plugin_styles' ), 1000 );

The above is not working. Can you help me out with htis @pippinsplugins ?? :)

solhuebner commented 10 years ago

Would be interesting

jrfnl commented 9 years ago

@ahansson89 @RugWarrior The below should work (or rather: works without issue on my customer's site).

add_action( 'wp_enqueue_scripts', 'no_bbprivate_stylesheet', 12 );
function no_bbprivate_stylesheet() {
    wp_dequeue_style( 'bbp_private_replies_style' );
}
solhuebner commented 9 years ago

@jrfnl Thank you :)

pippinsplugins commented 9 years ago

@jrfnl's solution is correct. I'd like to leave it as a separate file for now in order to easily accommodate future styles, and to make it easier to remove entirely.