Changeset 47224 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 02/09/2020 08:52:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r47219 r47224 1572 1572 return $memo; 1573 1573 } 1574 1575 /** 1576 * Parses the "_embed" parameter into the list of resources to embed. 1577 * 1578 * @since 5.4.0 1579 * 1580 * @param string|array $embed Raw "_embed" parameter value. 1581 * @return true|string[] Either true to embed all embeds, or a list of relations to embed. 1582 */ 1583 function rest_parse_embed_param( $embed ) { 1584 if ( ! $embed || 'true' === $embed || '1' === $embed ) { 1585 return true; 1586 } 1587 1588 $rels = wp_parse_list( $embed ); 1589 1590 if ( ! $rels ) { 1591 return true; 1592 } 1593 1594 return $rels; 1595 }
Note: See TracChangeset
for help on using the changeset viewer.