Skip to content

Commit

Permalink
Notifications: do not rely on admin-bar styles (#13690)
Browse files Browse the repository at this point in the history
* Notifications: do not rely on admin-bar styles

Follow up from #13450

In some cases, admin-bar styles may be dequeued (like when the Masterbar module is active).

* Stop dequeuing style when we need it (when notes is active)

This also adds the dependency back:
#13690 (comment)
  • Loading branch information
jeherve authored and kraftbj committed Oct 9, 2019
1 parent 40046aa commit cd17208
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/masterbar/masterbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ public function admin_body_class( $admin_body_classes ) {
* Remove the default Admin Bar CSS.
*/
public function remove_core_styles() {
wp_dequeue_style( 'admin-bar' );
/*
* Notifications need the admin bar styles,
* so let's not remove them when the module is active.
*/
if ( ! Jetpack::is_module_active( 'notes' ) ) {
wp_dequeue_style( 'admin-bar' );
}
}

/**
Expand Down

0 comments on commit cd17208

Please sign in to comment.