Changeset 10704
- Timestamp:
- 02/18/2021 05:54:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php
r10672 r10704 131 131 132 132 foreach ( $types as $type ) { 133 $ slugs = wp_get_post_terms( $topic_id, 'topic-' . $type, array( 'fields' => 'slugs' ));134 if ( $ slugs ) {133 $terms = get_the_terms( $topic_id, 'topic-' . $type ); 134 if ( $terms ) { 135 135 break; 136 136 } 137 137 } 138 138 139 if ( ! $ slugs || is_wp_error( $slugs ) ) {139 if ( ! $terms || is_wp_error( $terms ) ) { 140 140 return false; 141 141 } … … 143 143 return array( 144 144 'type' => $type, 145 'slug' => $ slugs[0],145 'slug' => $terms[0]->slug, 146 146 'user_nicename' => $user->user_nicename, 147 147 );
Note: See TracChangeset
for help on using the changeset viewer.