Trying to remove with and height attributes off get_avatar
-
Just curious why does my filter not work?
// Remove height/width attributes on avatar img tags. function myscript_remove_dimensions_avatars( $avatar ) { $avatar = preg_replace( '/(width|height)=\"\d*\"\s/', "", $avatar ); return $avatar; } add_filter( 'get_avatar', 'myscript_remove_dimensions_avatars', 10 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Trying to remove with and height attributes off get_avatar’ is closed to new replies.