Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/wpGetObjectTerms.php

    r46586 r47122  
    1919                $terms_1_slugs = array( 'foo', 'bar', 'baz' );
    2020
    21                 // set the initial terms
     21                // Set the initial terms.
    2222                $tt_1 = wp_set_object_terms( $post_id, $terms_1, $this->taxonomy );
    2323                $this->assertEquals( 3, count( $tt_1 ) );
    2424
    25                 // make sure they're correct
     25                // Make sure they're correct.
    2626                $terms = wp_get_object_terms(
    2727                        $post_id,
    … …  
    898898        public function filter_get_object_terms( $terms ) {
    899899                $term_ids = wp_list_pluck( $terms, 'term_id' );
    900                 // all terms should still be objects
     900                // All terms should still be objects.
    901901                return $terms;
    902902        }
    … …  
    942942                $set     = wp_set_object_terms( $post_id, $terms, $taxonomy );
    943943
    944                 // Filter for maintaining term order
     944                // Filter for maintaining term order.
    945945                add_filter( 'wp_get_object_terms_args', array( $this, 'filter_wp_get_object_terms_args' ), 10, 3 );
    946946
    947                 // Test directly
     947                // Test directly.
    948948                $get_object_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'names' ) );
    949949                $this->assertEquals( $terms, $get_object_terms );
    950950
    951                 // Test metabox taxonomy (admin advanced edit)
     951                // Test metabox taxonomy (admin advanced edit).
    952952                $terms_to_edit = get_terms_to_edit( $post_id, $taxonomy );
    953953                $this->assertEquals( implode( ',', $terms ), $terms_to_edit );
Note: See TracChangeset for help on using the changeset viewer.