- Timestamp:
- 12/20/2016 12:55:04 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r39595 r39620 1924 1924 case 'post-formats': 1925 1925 $supports_formats = get_theme_support( 'post-formats' ); 1926 1927 // Force to an array. Supports formats can return true even if empty in some cases. 1928 $supports_formats = is_array( $supports_formats ) ? array_values( $supports_formats[0] ) : array(); 1929 1930 $supported_formats = array_merge( array( 'standard' ), $supports_formats ); 1931 1926 1932 $schema['properties']['format'] = array( 1927 1933 'description' => __( 'The format for the object.' ), 1928 1934 'type' => 'string', 1929 'enum' => array_merge( array( 'standard' ), $supports_formats ? array_values( $supports_formats[0] ) : array() ),1935 'enum' => $supported_formats, 1930 1936 'context' => array( 'view', 'edit' ), 1931 1937 );
Note: See TracChangeset
for help on using the changeset viewer.