wp-media / adminimize

Adminimize is a WordPress plugin that lets you hide 'unnecessary' items from the WordPress backend.
https://wordpress.org/plugins/adminimize/
GNU General Public License v2.0
100 stars 30 forks source link

[Bug]: Conflict with Yoast? #150

Closed davidglines closed 2 years ago

davidglines commented 2 years ago

Description of the bug

We are trying to hide the "SEO" menu item for Yoast, but the menu item will not be hidden. This is the only menu item not responding to Adminimize.

Have you heard of any conflicts with Yoast?

Reproduction instructions

  1. Install Yoast plugin
  2. Hide SEO menu group for all roles
  3. All roles still see the menu item.

Expected behavior

Hiding the SEO menu item for all roles should hide it for all roles.

Environment info

Adminimize 1.11.7 Chrome

Relevant log output

No response

Additional context

Others seem to be having the same issue on the WP support forums. Would ideally use Adminimize for this instead of hiding it via our own plugin or theme.

Code of Conduct

bueltge commented 2 years ago

The problem is, that Yoast SEO add a different page for the menu for different roles. You as Administrator runs with the page wpseo_dashboard and the subscriber is it wpseo_workouts. So it is not possible for the settings page to list them.

remove_menu_page( 'wpseo_workouts' ); is the key to hide for subscribers.

The fastest solution is to add this slug to the "custom option" below the default menu items. Add to "Your own options Slug": WPSEO Workous And for "Custom Slug": wpseo_workouts

image

davidglines commented 2 years ago

Thanks, Frank!

DG

Get Outlook for iOShttps://aka.ms/o0ukef


From: Frank Bültge @.> Sent: Tuesday, May 31, 2022 1:00:28 AM To: bueltge/adminimize @.> Cc: David Glines @.>; Author @.> Subject: Re: [bueltge/adminimize] [Bug]: Conflict with Yoast? (Issue #150)

CAUTION: External Sender

Closed #150https://github.com/bueltge/adminimize/issues/150 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/bueltge/adminimize/issues/150#event-6706558364, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVOGGYZMGGETIBGQQOPAE6TVMWTHZANCNFSM5TLHRJWQ. You are receiving this because you authored the thread.Message ID: @.***>