Changeset 40137 for branches/4.7/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
- Timestamp:
- 02/27/2017 08:02:43 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
- Property svn:mergeinfo changed
/trunk merged: 40120-40121
- Property svn:mergeinfo changed
-
branches/4.7/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r40136 r40137 1984 1984 1985 1985 case 'post-formats': 1986 $supports_formats = get_theme_support( 'post-formats' ); 1987 1988 // Force to an array. Supports formats can return true even if empty in some cases. 1989 $supports_formats = is_array( $supports_formats ) ? array_values( $supports_formats[0] ) : array(); 1990 1991 $supported_formats = array_merge( array( 'standard' ), $supports_formats ); 1986 // Get the native post formats and remove the array keys. 1987 $formats = array_values( get_post_format_slugs() ); 1992 1988 1993 1989 $schema['properties']['format'] = array( 1994 1990 'description' => __( 'The format for the object.' ), 1995 1991 'type' => 'string', 1996 'enum' => $ supported_formats,1992 'enum' => $formats, 1997 1993 'context' => array( 'view', 'edit' ), 1998 1994 );
Note: See TracChangeset
for help on using the changeset viewer.