Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions inc/Modules/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function register_hooks(): void {
add_action( 'admin_menu', [ $this, 'add_submenu' ], 20 ); // 20 priority to make sure settings page respect its position.
add_action( 'admin_menu', [ $this, 'remove_default_submenu' ], 999 );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
add_action( 'admin_enqueue_scripts', [ $this, 'add_menu_icon_styles' ] );
add_action( 'admin_notices', [ $this, 'render_notices' ] );

add_filter( 'plugin_action_links_' . ONESEARCH_PLUGIN_BASENAME, [ $this, 'add_action_links' ], 2 );
Expand Down Expand Up @@ -122,6 +123,13 @@ public function enqueue_scripts( string $hook ): void {
wp_enqueue_style( Assets::ADMIN_STYLES_HANDLE );
}

/**
* Shows the menu icon at full opacity on every admin screen.
*/
public function add_menu_icon_styles(): void {
wp_add_inline_style( 'wp-admin', '#toplevel_page_' . self::MENU_SLUG . ' .wp-menu-image img { opacity: 1; }' );
}

/**
* Renders the setup admin notice.
*/
Expand Down
Loading