| 1589 | * Lists all the currently registered post type supports options |
| 1590 | * |
| 1591 | * @return array all the supports options that could possibly be chosen |
| 1592 | */ |
| 1593 | function get_all_post_type_supports_features() { |
| 1594 | $supports_options = array(); |
| 1595 | $supports_options = apply_filters( "post_type_supports", $supports_options ); |
| 1596 | return $supports_options; |
| 1597 | } |
| 1598 | |
| 1599 | /** |
| 1600 | * Returns the 'core' options used in add_post_type_supports() |
| 1601 | * |
| 1602 | * The full set may include features that are only available for certain post types |
| 1603 | * |
| 1604 | * @param array $supports_options |
| 1605 | * @return array The core set |
| 1606 | */ |
| 1607 | function post_type_supports_core( $supports_options ) { |
| 1608 | $supports_options['author'] = __( "Author" ); |
| 1609 | $supports_options['comments'] = __( "Comments" ); |
| 1610 | $supports_options['custom-fields'] = __( "Custom fields" ); |
| 1611 | $supports_options['editor'] = __( "Content editor" ); |
| 1612 | $supports_options['excerpt'] = __( "Excerpt" ); |
| 1613 | $supports_options['page-attributes'] = __( "Page attributes" ); |
| 1614 | $supports_options['post-formats'] = __( "Post formats" ); |
| 1615 | $supports_options['revisions'] = __( "Revisions" ); |
| 1616 | $supports_options['thumbnail'] = __( "Thumbnail - featured image" ); |
| 1617 | $supports_options['trackbacks'] = __( "Trackbacks" ); |
| 1618 | $supports_options['title'] = __( "Title" ); |
| 1619 | return( $supports_options ); |
| 1620 | } |
| 1621 | |
| 1622 | /** |
| 1623 | * Implements "post_type_supports" to add any remaining registered ones |
| 1624 | * |
| 1625 | * @param array $supports_options |
| 1626 | * @return array Updated with the 'unknown' values |
| 1627 | */ |
| 1628 | function post_type_supports_unknown_registered( $supports_options ) { |
| 1629 | global $_wp_post_type_features; |
| 1630 | foreach ( $_wp_post_type_features as $post_type => $features ) { |
| 1631 | foreach ( $features as $key => $value ) { |
| 1632 | if ( !isset( $supports_options[ $key ] ) ) { |
| 1633 | $supports_options[ $key ] = $key; |
| 1634 | } |
| 1635 | } |
| 1636 | } |
| 1637 | return( $supports_options ); |
| 1638 | } |
| 1639 | |
| 1640 | /** |