Skip to content

Commit

Permalink
Ensure that contributor taxonomies are registered when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Jul 30, 2018
1 parent 77eddfd commit d6d2d82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/class-contributors.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace Pressbooks;

use function Pressbooks\Metadata\init_book_data_models;
use function Pressbooks\Utility\oxford_comma_explode;
use function Pressbooks\Utility\str_starts_with;

Expand Down Expand Up @@ -335,6 +336,7 @@ public function updateBlogUser( $user_id, $old_user_data ) {
* @return string
*/
public function personalName( $slug ) {
init_book_data_models();
$name = '';
$term = get_term_by( 'slug', $slug, self::TAXONOMY );
if ( $term ) {
Expand Down

0 comments on commit d6d2d82

Please sign in to comment.