Permalink
Browse files

Performance: Delicious Cache-y Goodness!

Use get_the_terms instead of wp_get_post_terms, as the former is cached.
  • Loading branch information...
1 parent 6795bdc commit 2d8709bf30945fb407d85be72595b9d5128c016a @mjangda mjangda committed Nov 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 template-tags.php
View
@@ -14,7 +14,7 @@ function get_coauthors( $post_id = 0, $args = array() ) {
$args = wp_parse_args( $args, $defaults );
if ( $post_id ) {
- $coauthor_terms = wp_get_post_terms( $post_id, $coauthors_plus->coauthor_taxonomy, $args );
+ $coauthor_terms = get_the_terms( $post_id, $coauthors_plus->coauthor_taxonomy, $args );
if ( is_array( $coauthor_terms ) && !empty( $coauthor_terms ) ) {
foreach( $coauthor_terms as $coauthor ) {

0 comments on commit 2d8709b

Please sign in to comment.