function add_verification_bagdge_to_authors($display_name) { global $authordata; if (!is_object($authordata)) return $display_name; $icon_roles = array( 'administrator', 'verified_author', ); $found_role = false; foreach ($authordata->roles as $role) { if (in_array(strtolower($role), $icon_roles)) { $found_role = true; break; } } if (!$found_role) return $display_name; $result = sprintf('%s ', $display_name, __('This is a Verified Author', 'text-domain-here') ); return $result; } add_filter( 'the_author', 'add_verification_bagdge_to_authors' );Eadex Archives » Codedmp3

All posts tagged "Eadex"