This commit is contained in:
Hanson.xyz Dev
2026-01-04 17:50:08 -06:00
parent 7e45ce0756
commit acc8ac87a0
4131 changed files with 232562 additions and 250244 deletions
+19 -5
View File
@@ -1002,7 +1002,20 @@ function validate_theme_requirements( $stylesheet ) {
);
}
return true;
/**
* Filters the theme requirement validation response.
*
* If a theme fails due to a Core-provided validation (incompatible WP, PHP versions), this
* filter will not fire. A WP_Error response will already be returned.
*
* This filter is intended to add additional validation steps by site administrators.
*
* @since 6.9.0
*
* @param bool|WP_Error $met_requirements True if the theme meets requirements, WP_Error if not.
* @param string $stylesheet Directory name for the theme.
*/
return apply_filters( 'validate_theme_requirements', true, $stylesheet );
}
/**
@@ -1500,7 +1513,6 @@ function header_image() {
function get_uploaded_header_images() {
$header_images = array();
// @todo Caching.
$headers = get_posts(
array(
'post_type' => 'attachment',
@@ -3748,7 +3760,7 @@ function _wp_customize_loader_settings() {
),
);
$script = 'var _wpCustomizeLoaderSettings = ' . wp_json_encode( $settings ) . ';';
$script = 'var _wpCustomizeLoaderSettings = ' . wp_json_encode( $settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ';';
$wp_scripts = wp_scripts();
$data = $wp_scripts->get_data( 'customize-loader', 'data' );
@@ -3771,7 +3783,7 @@ function _wp_customize_loader_settings() {
function wp_customize_url( $stylesheet = '' ) {
$url = admin_url( 'customize.php' );
if ( $stylesheet ) {
$url .= '?theme=' . urlencode( $stylesheet );
$url = add_query_arg( 'theme', urlencode( $stylesheet ), $url );
}
return esc_url( $url );
}
@@ -3815,7 +3827,7 @@ function wp_customize_support_script() {
}());
</script>
<?php
wp_print_inline_script_tag( wp_remove_surrounding_empty_script_tags( ob_get_clean() ) );
wp_print_inline_script_tag( wp_remove_surrounding_empty_script_tags( ob_get_clean() ) . "\n//# sourceURL=" . rawurlencode( __FUNCTION__ ) );
}
/**
@@ -4349,6 +4361,8 @@ function create_initial_theme_features() {
*
* @since 5.9.0
*
* @global string[] $wp_theme_directories
*
* @return bool Whether the active theme is a block-based theme or not.
*/
function wp_is_block_theme() {