mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards. See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments. Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192]. Props costdev, audrasjb. See #58459. git-svn-id: https://develop.svn.wordpress.org/trunk@56193 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -576,8 +576,10 @@ abstract class WP_REST_Controller {
|
||||
$additional_fields = $this->get_additional_fields();
|
||||
|
||||
foreach ( $additional_fields as $field_name => $field_options ) {
|
||||
// For back-compat, include any field with an empty schema
|
||||
// because it won't be present in $this->get_item_schema().
|
||||
/*
|
||||
* For back-compat, include any field with an empty schema
|
||||
* because it won't be present in $this->get_item_schema().
|
||||
*/
|
||||
if ( is_null( $field_options['schema'] ) ) {
|
||||
$properties[ $field_name ] = $field_options;
|
||||
}
|
||||
@@ -630,8 +632,10 @@ abstract class WP_REST_Controller {
|
||||
}
|
||||
// Check for nested fields if $field is not a direct match.
|
||||
$nested_fields = explode( '.', $field );
|
||||
// A nested field is included so long as its top-level property
|
||||
// is present in the schema.
|
||||
/*
|
||||
* A nested field is included so long as its top-level property
|
||||
* is present in the schema.
|
||||
*/
|
||||
if ( in_array( $nested_fields[0], $fields, true ) ) {
|
||||
$response_fields[] = $field;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user