Changeset 4620
- Timestamp:
- 01/10/2017 08:33:47 AM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r4603 r4620 202 202 'hierarchical' => false, 203 203 'query_var' => 'plugin_contributor', 204 'sort' => true, 204 205 'rewrite' => false, 205 206 'labels' => array( -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r4565 r4620 133 133 134 134 // Set categories if there aren't any yet. wp-admin takes precedent. 135 if ( ! wp_get_ post_terms( $plugin->ID, 'plugin_category', array( 'fields' => 'ids' ) ) ) {136 wp_set_ post_terms( $plugin->ID, Tag_To_Category::map( $readme->tags ), 'plugin_category' );135 if ( ! wp_get_object_terms( $plugin->ID, 'plugin_category', array( 'fields' => 'ids' ) ) ) { 136 wp_set_object_terms( $plugin->ID, Tag_To_Category::map( $readme->tags ), 'plugin_category' ); 137 137 } 138 138 139 139 // Set tags from the readme 140 wp_set_ post_terms( $plugin->ID, $readme->tags, 'plugin_tags' );140 wp_set_object_terms( $plugin->ID, $readme->tags, 'plugin_tags' ); 141 141 142 142 // Update the contributors list 143 wp_set_ post_terms( $plugin->ID, $readme->contributors, 'plugin_contributors' );143 wp_set_object_terms( $plugin->ID, $readme->contributors, 'plugin_contributors' ); 144 144 145 145 // Update the committers list … … 147 147 148 148 if ( in_array( 'adopt-me', $readme->tags ) ) { 149 wp_set_ post_terms( $plugin->ID, array( 74 /* Term ID for adopt-me */ ), 'plugin_section' );149 wp_set_object_terms( $plugin->ID, 'adopt-me', 'plugin_section' ); 150 150 } 151 151 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-developers.php
r4468 r4620 18 18 $output = ''; 19 19 20 if ( $contributors = get_the_terms( $post->ID, 'plugin_contributors' ) ) { 21 $contributors = wp_list_pluck( $contributors, 'name' ); 22 } else { 20 $contributors = get_terms( array( 21 'taxonomy' => 'plugin_contributors', 22 'object_ids' => array( $post->ID ), 23 'orderby' => 'term_order', 24 'fields' => 'names', 25 ) ); 26 27 if ( ! $contributors || is_wp_error( $contributors ) ) { 23 28 $contributors = array(); 24 29 if ( $author = get_user_by( 'id', $post->post_author ) ) { … … 26 31 } 27 32 } 28 sort( $contributors, SORT_NATURAL );29 33 30 34 $output .= '<p>' . __( 'This is open source software. The following people have contributed to this plugin.', 'wporg-plugins' ) . '</p>';
Note: See TracChangeset
for help on using the changeset viewer.