Make WordPress Core


Ignore:
Timestamp:
02/05/2020 06:24:16 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: In register_taxonomy(), return the registered taxonomy object on success, for consistency with register_post_type().

Props krynes, SergeyBiryukov.
Fixes #48558.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/types.php

    r47122 r47186  
    3838
    3939        _unregister_post_type( 'foo' );
     40    }
     41
     42    /**
     43     * @ticket 48558
     44     */
     45    function test_register_post_type_return_value() {
     46        $this->assertInstanceOf( 'WP_Post_Type', register_post_type( 'foo' ) );
    4047    }
    4148
Note: See TracChangeset for help on using the changeset viewer.