Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update themes.md #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fabioquarantini
Copy link

Status value is "active" and not "1". See "class-wp-rest-themes-controller.php" (Ln 91):

if ( isset( $registered['status'], $request['status'] ) && in_array( 'active', $request['status'], true ) ) {
$active_theme = wp_get_theme();
$active_theme = $this->prepare_item_for_response( $active_theme, $request );
$themes[] = $this->prepare_response_for_collection( $active_theme );
}

Status value is "active" and not "1". See "class-wp-rest-themes-controller.php" (Ln 91):

if ( isset( $registered['status'], $request['status'] ) && in_array( 'active', $request['status'], true ) ) {
	$active_theme = wp_get_theme();
	$active_theme = $this->prepare_item_for_response( $active_theme, $request );
	$themes[]     = $this->prepare_response_for_collection( $active_theme );
}
@kadamwhite
Copy link
Contributor

Thanks for this PR. The /reference/ folder is auto-generated from the schema, so we'll need to look at why the value came through this way, rather than simply correcting the generated file -- otherwise this will be wiped out the next time the reference documentation is updated.

@kadamwhite kadamwhite added the /reference/ An issue with the schema-derived /reference/ documentation label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
/reference/ An issue with the schema-derived /reference/ documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants