Exclude by Post Author ID (similar to exclude by domain) Feature Request
-
Using your plugin and all is working fine w/ WP 4.5.2 and thank you.
I would like to exclude all processing by author ID. Looks like there is no enabled hooks for this to be done.With all the internet chatter regarding nofollow and Google’s position on unnatural links, I thought exclusion by author would be a good enhancement.
I added the following to the main plugin code (with added associated admin UI) for my purposes (line 183 of sem-external-links.php:
// short circuit if exclude author by id
if ( isset( $this->opts[‘exclude_authors’] ) && $this->opts[‘exclude_authors’] )
{
$exclude_authors = array();
$exclude_authors = explode (“,”, $this->opts[‘exclude_authors’]);
$current_post = get_post();
$current_post_author_id = $current_post->post_author;
if ( in_array($current_post_author_id, $exclude_authors ))
return($text);
}
- The topic ‘Exclude by Post Author ID (similar to exclude by domain) Feature Request’ is closed to new replies.