[Plugin: Co-Authors Plus] Feature: Iterator Filter
-
Co-authors-plus is a great plugin! Thanks for all the hard work.
I would like to suggest one feature, a filter to the iterator. Currently I apply WP’s ‘the_author’ filter, but any filter hook would be very convenient.
--- a/wp-content/plugins/co-authors-plus/template-tags.php +++ b/wp-content/plugins/co-authors-plus/template-tags.php @@ -145,6 +145,16 @@ function coauthors__echo( $tag, $type = 'tag', $separators = array(), $tag_args if( empty( $author_text ) ) $author_text = $i->current_author->user_login; + /* + * CUSTOMIZATION: Apply wordpress filter + */ + $author_text = apply_filters( 'the_author', $author_text ); + if ( empty( $author_text ) ) { + $i->count = $i->count - 1; + $i->position = $i-position - 1; + continue; + } + // Append separators if ( ! $i->is_first() && $i->count() > 2 ) $output .= $separators['between'];
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Co-Authors Plus] Feature: Iterator Filter’ is closed to new replies.