You could use the wp_before_admin_bar_render
hook. You can play with code samples on the Codex page by putting them in your theme’s functions.php
.
First off you can try examining the object by outputting its contents with print_r()
, and you’ll see all the familiar items. I would probably use remove_menu
helper and then add a new one with the modified link title, just to keep things clean.
add_action( 'wp_before_admin_bar_render', 'my_tweaked_admin_bar' );
function my_tweaked_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('edit-profile');
$wp_admin_bar->add_menu( array(
'id' => 'edit-profile',
'title' => 'Edit Zee Profile',
'href' => admin_url('profile.php'),
'parent'=>'user-actions'
));
}
The downside of this approach is that the new item will not show up in the same spot.
Related Posts:
- Where is the best place to use add_filter
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- Is There a WordPress Hook to Filter the Edit Posts View?
- Add section (add_settings_section) to a custom page (add_submenu_page)
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Edit plugin without hooks in functions.php
- How do I only load a plugin js on it’s settings pages?
- Using add_filter inside another class
- Custom plugin settings: clicking “save changes” does not display success message
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Pass A Value From Outside To A Plugin Variable
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- Filter or action hook to insert content on admin pages before tag
- Custom preview_post_link not working for draft post
- Add Fields with Sub-Fields to WP Job Manager
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- Edit default comments page in WP Admin
- All Users > User List > Update User Meta Field Inline
- Creating a plugin to sanitize comment and the url field before display only
- How to find the origin of a file upload from within wp_handle_upload?
- Display update notification messages like ‘What’s New’
- White page by using filter template_include
- How to check current user before all actions and filters?
- Create a navbar filter that filters by a custom field
- Passing an array from shortcode-function to filter-function
- Get Time Taken By Each Action Hook in WordPress
- How to set add question capability for author role in wp pro quiz plugin
- qTranslate remove default directory from link
- do_action() hook into load-(page)
- Adding CSS to custom post type admin page causes error
- Proper way to replace the_content only for pages created by custom plugin
- add_filter doesn’t work
- Redirect to another page using contact form 7? [closed]
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- Check if variable is set in filter
- Check filter defined or not?
- remove all submenus from plugin
- creating a plug in that would tap into save/update action of posts [closed]
- How to use the CSS of the WordPress core in the development of my administration page?
- Add a function call after content automatically?
- what is the point of telling add_filter how many parameters you want passed to the function?
- How to add filter for wordpress plugin?
- How to use add_action for multiple instances of the same class
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Ajax request sends url rather than data
- How to add captcha to publish widget
- Adding a jQuery modal dialog to the admin area
- Want to create custom design of progress indicator in wpforms
- Add hook after content without formatting
- How to create admin setting for this small plugin
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Using OR Condition with facetwp facets
- Hide all Admin Notices and move on a separate page
- 500 Internal server error wp_handle_upload_prefilter
- Nested Actions and Filters
- Remove action added in plugin class from theme
- Using multi-dimensional array with filter
- Echo custom admin field into a is_single()
- Can I add content before post content without using the_content filter
- WordPress Add advertising ads befor and after content with periority [closed]
- Get content and send to 3rd party
- trying to create simple plugin to filter categories from all authors
- shortcode which is introduced into entry the blog, and appears in side bar
- How do i get all author posts on custom post type list
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- Display Any Field fromAdmin Panel in Frontend via Shortcode?
- How to stop showing admin notice after close button has been clicked
- How to get Login Error messages on a custom template
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- do_action and hook methods
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- finding whether request is for post, and post id
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- wp_footer hook only working on homepage not in other pages
- How do I make a secure API call from a shortcode when a button is clicked?
- Modify page title and subtitle with a plugin
- override filter in a plugin
- Hook into the rendering of a WordPress Template
- Save user total active time after login in wordpress [closed]
- Calling a save function from a “submit” button
- How to hook into action/filter call
- Select Form Element Not Saving from Plugin Options
- How to automatically activate users after registration without activation email?
- Pass PHP variable to javascript
- Make downloadable ebook read online without download option
- WordPress rewrite rule depend on meta values not ids
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- Add_Meta_box to custom page (formidable edit post)
- Making a Custom Post Type Plugin – keep getting the white screen of death
- Limit Google Ads to particular blog posts
- Communicating to plugins from webserver
- Hook into install email
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Linking Plugin Files to WP
- How to provide page_template path in custom plugin using WordPress