I see a couple of problems here.
This line
if (!is_admin() || 'default' != $domain)
return $translated;
returns the Howdy right back unchanged if is_admin is false – which it is if you’re not in the dashboard.
Also, you’re running your filter callback on gettext. This means it will be run every time some internationalized content is used, which is very inefficient. You’d be better off using a more appropriate filter, like below.
function change_howdy( $wp_admin_bar ) {
$my_account = $wp_admin_bar->get_node( 'my-account' );
$new_title = str_replace( 'Howdy', 'Explore the Possibilities', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $new_title,
) );
}
add_filter( 'admin_bar_menu', 'change_howdy', 25 );
Related Posts:
- Modify Admin Bar Link
- How to manually activate user in dashboard only by admin
- How do I create a new WP admin color scheme?
- Add admin bar link to edit author
- How to get an array of menu items from the toolbar?
- Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php
- Create dropdown of users in admin dashboard
- Display WooCommerce subscriptions for user [closed]
- Adding widget to dashboard with wp_dashboard_setup not working
- Dashboard widget custom positioning?
- WordPress function only executes once
- Sortable column (by numbers) in admin users
- How to remove some item from WordPress Dashboard for user Author
- Add Link to Users List (Backend) to open each users front-end profile
- hook for dashboard show_user_profile
- What function actually renders the wp_admin_bar ? How can I call it?
- How to display my comment count in the wordpress admin bar?
- Create custom admin bar menu items
- Remove theme, change theme button and WP version on “Right Now” admin dashboard?
- Code in functions.php appearing on front-end and dashboard [closed]
- How to check if a user exists by a given id
- How to use the do_action () with parameter
- TinyMCE custom styles remove class when switching styles
- Extending the site search to include a single custom field
- Notify users whenever a new post is published based on their preference
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- syntax for remove_filter in parent theme with class
- Remove Header and Footer in iframe
- How to Acheive the custom woocommerce category template
- Can I remove the Rich Text box editor for a specific post?
- Formatting post content to exclude gallery
- Why do I get undefined function export_wp()?
- Redirect if not logged in?
- How to set global variables in template page?
- How To Get WordPress Categories Link List?
- Generate permalinks
- Best Practice for Syncing Local Development With Staging Development [closed]
- How to use max and min values of custom fields
- How can I create a page with a specific URL?
- When using wp_enqueue_script(); in a theme why don’t we use add_action?
- How does this function get the id of the most recent post?
- Batch update menu_order attribute alphabetically
- How to create function from code?
- How to use Internationalized human_time_diff() function in Chinese?
- Automatically wrap multiple images in div
- Ajax not working properly
- create shortcode to list users with specific meta key value
- How to add ‘data-caption’ inside an anchor tag
- How can I get my Script to work on the Login page?
- Execute a ultimate member action when user role is updated
- Search filter by Post title OR Meta Title Value [duplicate]
- Why is functions.php file in child not initializing and over-writing parent?
- Filtering out the #more anchor link that gets produced by
- file_get_contents – failed to open stream
- Exclude from the query posts with meta_key and meta_value
- wp_nonce_field is breaking form for reasons unknown
- srcset and custom field get_post_meta and wp_get_attachment_url
- How do I call a function to use on a page?
- Extending a custom framework built into WordPress to automatically turn the ‘Search Engine Visibility’ setting ON / OFF, dependant on environment
- Different favicon on different pages
- Javascript not loading after the document ready
- Need to convert image url to a Base_64 data url with wordpress function..
- Add Adsense code between job listings – wp job manager plugin
- How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
- Modify shortcode to work with custom post types
- How to hightlight all ancestor menu items of a child page NOT displayed in menu
- Show admin page, only if function is being used
- Fatal error: allowed memory size when after using enqueue_script
- How to apply the ‘current_page_item’ class to an archive page in `wp_list_pages()`?
- How to redirect Subscribers on login to specific page, when logging in from a Page
- how can I add filter in specfic field in my website?
- functions.php pharse error on complete new install
- If has action not working as expected
- Update wp_postmeta table based on 2 keys
- Best practice to call a function from a button-link?
- Disable wordpress update notification
- How to customize archive widget only for cpt?
- some profile informations like youtube link doesnt seem
- Help using ShortCodes to style whole chunks of the post
- How to modify or override a core function (wp_star_rating)
- Is there is a way to check daily first login?
- Filter posts on new page
- Sticky – Featured Image
- delete_user_meta for user in spesific group
- Pagination not working on my archive page for a custom post type
- WordPress Jquery+scripts enqueue issue
- Remove Featured Images from Posts Older Than a Certain Date
- How to pass a variable from a template page to the child theme functions.php
- Home/Static Page View for Visitors pages after that should be restricted
- functions.php filters not applied in AJAX call
- Settings in functions.php used by a plugin
- Make WordPress search for only this tags or exclude certain tags from search [duplicate]
- Adding result from PHP function into an input field
- Using array page name together with page id to deregister script
- Echo a div to header.php from functions.php
- Modifying Page-Links format
- how to handle multiple forloop?
- PHP error in shortcode [closed]
- Is storing in a variable the result of a fonction a most powerful way to code an if structures in WordPress?
- woocommerce_sort_product_tabs() expects an array