- Timestamp:
- 02/24/2017 11:29:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r40108 r40120 1990 1990 1991 1991 case 'post-formats': 1992 $supports_formats = get_theme_support( 'post-formats' ); 1993 1994 // Force to an array. Supports formats can return true even if empty in some cases. 1995 $supports_formats = is_array( $supports_formats ) ? array_values( $supports_formats[0] ) : array(); 1996 1997 $supported_formats = array_merge( array( 'standard' ), $supports_formats ); 1992 // Get the native post formats and remove the array keys. 1993 $formats = array_values( get_post_format_slugs() ); 1998 1994 1999 1995 $schema['properties']['format'] = array( 2000 1996 'description' => __( 'The format for the object.' ), 2001 1997 'type' => 'string', 2002 'enum' => $ supported_formats,1998 'enum' => $formats, 2003 1999 'context' => array( 'view', 'edit' ), 2004 2000 );
Note: See TracChangeset
for help on using the changeset viewer.