Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
*Looks*
It looks like that topbar() is added via an action.
https://plugins.trac.wordpress.org/browser/slider-wd/trunk/slider-wd.php#L123
add_action('admin_notices', array( 'WDW_S_Library', 'topbar' ), 11);
I tried to hook into it to remove that action but I just made a mess of it. My WordPress actions are a little rusty.
But this did work to hide it via CSS.
https://wordpress.stackexchange.com/questions/239302/how-to-remove-hide-action-links-cluttering-under-specific-plugins-names
That became this.
<?php
/*
* Plugin Name: Remove slider-wd admin notice via CSS display none
*/
add_action( 'admin_enqueue_scripts', 'mh_hide_slider_wd_offer' );
function mh_hide_slider_wd_offer() {
global $pagenow;
if ( $pagenow == 'admin.php' ) {
?>
<style type="text/css">
.wds-topbar.wds-topbar-content { display: none; }
.wds-topbar.wds-topbar-links { display: none; }
</style>
<?php
}
}
The remove_action() would be better IMHO but this will hide that as long as the CSS does change in the plugin.
If I can work out the remove_action() I’ll post back here again.
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Oh. That was easy.
Try this instead.
<?php
/*
* Plugin Name: Remove slider-wd topbar admin action
*/
add_action( 'admin_print_scripts', 'mh_remove_slider_wd_topbar' );
function mh_remove_slider_wd_topbar() {
global $pagenow;
if ( $pagenow == 'admin.php' ) {
remove_action('admin_notices', array( 'WDW_S_Library', 'topbar' ), 11);
}
}
I like this better because the top portion doesn’t get sent in HTML. The topbar() gets un-queued and never sent. No blank space and no plugin topbar to display: none with CSS.