The Original Poster was missing the pair priority, parameters
when declaring the filter hook:
add_filter( 'get_avatar', array( $this, 'get_avatar' ), 10, 5 );
Being 5
all the parameters the callback function can use:
public function get_avatar( $avatar, $id_or_email, $size, $default, $alt )
{
return $avatar;
}
Related Posts:
- Modify existing plugin function using filter (without modifying the plugin directly)
- Limit Media Library to Given Folder
- What is the proper way to apply the login_form_bottom filter?
- How-to inspect filter-able $vars?
- How to exclude certain widget from showing up on home/front page? [duplicate]
- Custom Queries – Child Categories not showing up
- Custom search page and search by title, content and tag
- Customizing the default logout page of WordPress
- Is there a filter hook that I can use to change how taxonomy term names are displayed?
- Syncing Avatars across multisite
- Add options to the “Screen Options” section on the “Menus” editor
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How to add an extra variable to login and authenticate it?
- changing font size and font of a custom message added after comment
- result from custom filter admin table list backend does not work
- custom default avatar showing broken link
- Admin search post meta
- Combine two conditions in one statement syntax [closed]
- Get users based on month ACF datepicker field
- Change admin avatar only (without Gravatar or plugin)?
- Dynamically Filtering Posts by Data Points – Any Pointers?
- How to append custom text to the output of ‘categories widget’?
- How to Add Additional Search Button?
- Inline-Table under TwentyTwelve not working
- Custom Register Link on Backend Form
- How to make WordPress search page use a relative path
- Adding overlay search to wordpress using add action/filter
- How to get the full product name by ignoring custom modification on it
- Gender based user avatar
- Moving Quantity after product description
- Wrap WordPress Login Form in custom Div
- Custom Avatars for WordPress Comments VIA Website URL?
- Post filter with multiple checkbox taxonomy terms
- How to append the excerpt to the content in the single post page?
- Show different pages on site depending on user choice
- Custom display for homepage, tag and author pages
- Pre_Get_Posts order DESC not registering
- Apply `the_content’ filter to theme customisation live preview
- Add variable : 1 Week ago
- How to add filters to my site?
- How do I add nopin=”nopin” to the default avatar?
- Can’t change WordPress / WooCommerce attribute value order
- How to: Easily Move a WordPress Install from Development to Production?
- Is there a flowchart for WordPress loading sequence?
- Essential technical features for high-end WordPress web hosting? [closed]
- How to remove admin menu pages inserted by plugins?
- How to put logs in WordPress
- How to get the Date Format and Time Format settings for use in my template?
- Where are Additional CSS files stored
- How can I edit post data before it is saved?
- add_action(), add_filter() before or after function
- Best Practices for Regression Testing WordPress Websites?
- Remove wrapping div and ul from output of wp_nav_menu
- What Is The Use Of map_meta_cap Filter?
- How to create an API for my plugin?
- get post author id outside loop
- Custom Walker: how to get ID in function start_lvl
- Creative uses of WordPress [closed]
- How to *remove* a parent theme page template from a child theme?
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- Multiple Inputs in a Customizer Control
- New WP_Customize API – how does it work under the hood?
- Embedding a SOAP Client into a WordPress Plugin?
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Update widget form after drag-and-drop (WP save bug)
- Data sanitization: Best Practices with code examples
- How to benchmark a WordPress installation? [closed]
- Should I delete the default themes?
- Moving WP install from local to live, what about wp_posts GUID?
- Modified wp.media.view.Settings.Gallery in Backbone JS, but editing doesn’t work
- Running Gutenberg React in Development Mode
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- Is there a blank theme framework compatible with WP 3.0? [closed]
- Plugin SVN & update API – how are plugins identified?
- Users with custom roles not showing in post author select box
- How to use more than 256MB of memory in the admin?
- How do register_sidebar() and get_sidebar() work together?
- How do you get formatted content of a post using the WordPress API?
- Localization: I want the backend: english and frontend in defined language
- Are there any forks of WordPress (and what is different about them)?
- How to Change 404 page title
- Make Custom Metaboxes Collapse by Default
- WordPress Paginate $wpdb->get_results
- Custom maintenance page
- Add button to TinyMCE bar without creating a plugin
- Why do I get the timeout warning?
- How to add a new product type on woocommerce product types? [closed]
- How to include own css on wordpress tinymce editor?
- How to disable page delete
- add button to post edit page when post_status=publish
- how to override woocommerce specific loop or archive-product.php [closed]
- Rename UPLOADS folder with custom WP_CONTENT_DIR
- WordPress hook before inserting post into database
- Any post install tips after installing WordPress 3.0.1?
- Making Custom Fields Standard in the Admin UI
- Remove WordPress theme from a specific page
- Version Control: Entire site or just pieces?
- Getting a stack trace when an error occurs?
- Check for and enforce unique value in user-entered custom meta field in WP Admin