X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..e3ff8f35458a959c1879c0a4976701ed8dcfe651:/wp-admin/includes/taxonomy.php diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php index 3d4154da..524cf05d 100644 --- a/wp-admin/includes/taxonomy.php +++ b/wp-admin/includes/taxonomy.php @@ -65,7 +65,7 @@ function wp_create_category( $cat_name, $parent = 0 ) { * * @param array $categories List of categories to create. * @param int $post_id Optional. The post ID. Default empty. - * @return List of categories to create for the given post. + * @return array List of categories to create for the given post. */ function wp_create_categories( $categories, $post_id = '' ) { $cat_ids = array (); @@ -242,7 +242,7 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { $terms = get_object_term_cache( $post_id, $taxonomy ); if ( false === $terms ) { $terms = wp_get_object_terms( $post_id, $taxonomy ); - wp_cache_add( $post_id, $terms, $taxonomy . '_relationships' ); + wp_cache_add( $post_id, wp_list_pluck( $terms, 'term_id' ), $taxonomy . '_relationships' ); } if ( ! $terms ) { @@ -259,7 +259,7 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { $terms_to_edit = esc_attr( join( ',', $term_names ) ); /** - * Filter the comma-separated list of terms available to edit. + * Filters the comma-separated list of terms available to edit. * * @since 2.8.0 *