Skip to content

Commit 0425550

Browse files
authored
Merge pull request #8 from firstandthird/filter-oembed
Filter out author name on oembed
2 parents d3f495b + 74ad15c commit 0425550

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

inc/rename-author.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ function disableauthors_filter_author($name) {
77
return $disableauthorsAuthorName;
88
}
99

10+
function disableauthors_filter_oembed($data) {
11+
global $disableauthorsAuthorName;
12+
13+
$data['author_name'] = $disableauthorsAuthorName;
14+
15+
return $data;
16+
}
17+
1018
add_filter('the_author', 'disableauthors_filter_author', 1);
1119
add_filter('get_the_author_display_name', 'disableauthors_filter_author', 1);
1220
add_filter('get_the_author_first_name', 'disableauthors_filter_author', 1);
1321
add_filter('get_the_author_last_name', 'disableauthors_filter_author', 1);
1422
add_filter('get_the_author_nickname', 'disableauthors_filter_author', 1);
1523
add_filter('get_the_author_user_login', 'disableauthors_filter_author', 1);
24+
25+
26+
add_filter('oembed_response_data', 'disableauthors_filter_oembed');

0 commit comments

Comments
 (0)