get_patterns example



/** * Returns the current theme's wanted patterns (slugs) to be * registered from Pattern Directory. * * @since 6.3.0 * * @return string[] */
function wp_get_theme_directory_pattern_slugs() {
    return WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_patterns();
}

/** * Determines the CSS selector for the block type and property provided, * returning it if available. * * @since 6.3.0 * * @param WP_Block_Type $block_type The block's type. * @param string|array $target The desired selector's target, `root` or array path. * @param boolean $fallback Whether to fall back to broader selector. * * @return string|null CSS selector or `null` if no selector available. */
Home | Imprint | This part of the site doesn't use cookies.