proudcity / wp-proudcity

The ProudCity WordPress platform
https://proudcity.com
Other
21 stars 9 forks source link

Clean up top admin bar #2340

Open lukefretwell opened 1 year ago

lukefretwell commented 1 year ago

Source The source of the issue (ex: Customer: #CustomerName#).

LF

What feature would you like to improve A clear and concise description of the current feature.

Top admin bar

Describe the solution you'd like A clear and concise description of what you want to happen.

Menu display:

Left:

Right:

Additional context Add any other context or screenshots about the feature request here.

https://wordpress.com/support/admin-bar/

From ChatGPT on removing plugin links:

To remove a plugin link from the WordPress admin bar, you can use the admin_bar_menu action hook and check for the specific item to remove. Here's an example of how to do it:

// Remove a specific plugin link from the admin bar
function remove_plugin_link_from_admin_bar($wp_admin_bar) {
    // Replace 'plugin-slug' with the actual plugin slug you want to remove
    $plugin_slug = 'plugin-slug';

    // Remove the plugin link
    $wp_admin_bar->remove_node($plugin_slug);
}
add_action('admin_bar_menu', 'remove_plugin_link_from_admin_bar', 999);

In this example, replace 'plugin-slug' with the actual slug of the plugin link you want to remove from the admin bar. The 999 priority ensures that this action is executed after other items have been added to the admin bar.

Add this code to your theme's functions.php file or your custom plugin's main PHP file. After adding the code, refresh your WordPress admin area to see the changes. The specified plugin link should be removed from the admin bar.

kevindherman commented 1 year ago

@lukefretwell the dashboard link is used a lot for people to get into different content types. It's usually the first step in our documentation so having it spelled out for people is grounding so I'd definitely like to keep that in there.

If there's a concern that it's redundant with the PC logo, I'd suggest the logo just being for branding purposes.

lukefretwell commented 1 year ago

@kevindherman thank you. I updated the checklist to account for that.

kevindherman commented 1 year ago

@lukefretwell by dashboard I don't mean my sites I mean the backend of the website: https://demo.proudcity.com/wp-admin/admin.php?page=proud_dashboard#/sites/citytemplate/dashboard

Or whatever we want the first screen to be when someone goes to the backend.

So it should say "Dashboard" in the admin bar and behave how it does now.

lukefretwell commented 1 year ago

@kevindherman I updated the issue to specify menu links/order/location.