]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/taxonomy.php
WordPress 4.7.1-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / taxonomy.php
index 19f7ebe37178615471ad7d83ac4d467467e00fd7..524cf05d2742bfc360f3ec0fba5a91fbaf7de4c0 100644 (file)
@@ -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
         *