WP_Theme_JSON::get_name_from_defaults( string $slug, array $base_path ): string|null

In this article

Gets a default‘s preset name by a provided slug.

Parameters

$slugstringrequired
The slug we want to find a match from default presets.
$base_patharrayrequired
The path to inspect. It’s 'settings' by default.

Return

string|null

Source


	return $slugs;
}

/**
 * Gets a `default`'s preset name by a provided slug.
 *
 * @since 5.9.0
 *
 * @param string $slug The slug we want to find a match from default presets.
 * @param array  $base_path The path to inspect. It's 'settings' by default.
 * @return string|null
 */
protected function get_name_from_defaults( $slug, $base_path ) {

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.