Make WordPress Core

Changeset 36652

Timestamp:
02/23/2016 10:49:17 PM (8 years ago)
Author:
swissspidy
Message:

Posts: Introduce get_post_types_by_support().

Similar to get_post_types(), this new function returns a list of post type names that support a specific feature.

Props wpsmith, barryceelen, swissspidy.
Fixes #34010.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r36607 r36652  
    16401640
    16411641/**
     1642
     1643
     1644
     1645
     1646
     1647
     1648
     1649
     1650
     1651
     1652
     1653
     1654
     1655
     1656
     1657
     1658
     1659
     1660
     1661
     1662
     1663
    16421664 * Update the post type for the post ID.
    16431665 *
  • trunk/tests/phpunit/tests/post/types.php

    r36316 r36652  
    380380        $this->assertFalse( post_type_exists( 'foo' ) );
    381381    }
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
    382431}
Note: See TracChangeset for help on using the changeset viewer.