Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu...
File: global-styles-and-settings.php
if ( false === $metadata ) {
[500] Fix | Delete
$metadata = WP_Theme_JSON_Resolver::get_theme_data( array(), array( 'with_supports' => false ) )->get_template_parts();
[501] Fix | Delete
if ( $can_use_cached ) {
[502] Fix | Delete
wp_cache_set( $cache_key, $metadata, $cache_group );
[503] Fix | Delete
}
[504] Fix | Delete
}
[505] Fix | Delete
[506] Fix | Delete
return $metadata;
[507] Fix | Delete
}
[508] Fix | Delete
[509] Fix | Delete
/**
[510] Fix | Delete
* Determines the CSS selector for the block type and property provided,
[511] Fix | Delete
* returning it if available.
[512] Fix | Delete
*
[513] Fix | Delete
* @since 6.3.0
[514] Fix | Delete
*
[515] Fix | Delete
* @param WP_Block_Type $block_type The block's type.
[516] Fix | Delete
* @param string|array $target The desired selector's target, `root` or array path.
[517] Fix | Delete
* @param boolean $fallback Whether to fall back to broader selector.
[518] Fix | Delete
*
[519] Fix | Delete
* @return string|null CSS selector or `null` if no selector available.
[520] Fix | Delete
*/
[521] Fix | Delete
function wp_get_block_css_selector( $block_type, $target = 'root', $fallback = false ) {
[522] Fix | Delete
if ( empty( $target ) ) {
[523] Fix | Delete
return null;
[524] Fix | Delete
}
[525] Fix | Delete
[526] Fix | Delete
$has_selectors = ! empty( $block_type->selectors );
[527] Fix | Delete
[528] Fix | Delete
// Root Selector.
[529] Fix | Delete
[530] Fix | Delete
// Calculated before returning as it can be used as fallback for
[531] Fix | Delete
// feature selectors later on.
[532] Fix | Delete
$root_selector = null;
[533] Fix | Delete
[534] Fix | Delete
if ( $has_selectors && isset( $block_type->selectors['root'] ) ) {
[535] Fix | Delete
// Use the selectors API if available.
[536] Fix | Delete
$root_selector = $block_type->selectors['root'];
[537] Fix | Delete
} elseif ( isset( $block_type->supports['__experimentalSelector'] ) && is_string( $block_type->supports['__experimentalSelector'] ) ) {
[538] Fix | Delete
// Use the old experimental selector supports property if set.
[539] Fix | Delete
$root_selector = $block_type->supports['__experimentalSelector'];
[540] Fix | Delete
} else {
[541] Fix | Delete
// If no root selector found, generate default block class selector.
[542] Fix | Delete
$block_name = str_replace( '/', '-', str_replace( 'core/', '', $block_type->name ) );
[543] Fix | Delete
$root_selector = ".wp-block-{$block_name}";
[544] Fix | Delete
}
[545] Fix | Delete
[546] Fix | Delete
// Return selector if it's the root target we are looking for.
[547] Fix | Delete
if ( 'root' === $target ) {
[548] Fix | Delete
return $root_selector;
[549] Fix | Delete
}
[550] Fix | Delete
[551] Fix | Delete
// If target is not `root` we have a feature or subfeature as the target.
[552] Fix | Delete
// If the target is a string convert to an array.
[553] Fix | Delete
if ( is_string( $target ) ) {
[554] Fix | Delete
$target = explode( '.', $target );
[555] Fix | Delete
}
[556] Fix | Delete
[557] Fix | Delete
// Feature Selectors ( May fallback to root selector ).
[558] Fix | Delete
if ( 1 === count( $target ) ) {
[559] Fix | Delete
$fallback_selector = $fallback ? $root_selector : null;
[560] Fix | Delete
[561] Fix | Delete
// Prefer the selectors API if available.
[562] Fix | Delete
if ( $has_selectors ) {
[563] Fix | Delete
// Look for selector under `feature.root`.
[564] Fix | Delete
$path = array( current( $target ), 'root' );
[565] Fix | Delete
$feature_selector = _wp_array_get( $block_type->selectors, $path, null );
[566] Fix | Delete
[567] Fix | Delete
if ( $feature_selector ) {
[568] Fix | Delete
return $feature_selector;
[569] Fix | Delete
}
[570] Fix | Delete
[571] Fix | Delete
// Check if feature selector is set via shorthand.
[572] Fix | Delete
$feature_selector = _wp_array_get( $block_type->selectors, $target, null );
[573] Fix | Delete
[574] Fix | Delete
return is_string( $feature_selector ) ? $feature_selector : $fallback_selector;
[575] Fix | Delete
}
[576] Fix | Delete
[577] Fix | Delete
// Try getting old experimental supports selector value.
[578] Fix | Delete
$path = array( current( $target ), '__experimentalSelector' );
[579] Fix | Delete
$feature_selector = _wp_array_get( $block_type->supports, $path, null );
[580] Fix | Delete
[581] Fix | Delete
// Nothing to work with, provide fallback or null.
[582] Fix | Delete
if ( null === $feature_selector ) {
[583] Fix | Delete
return $fallback_selector;
[584] Fix | Delete
}
[585] Fix | Delete
[586] Fix | Delete
// Scope the feature selector by the block's root selector.
[587] Fix | Delete
return WP_Theme_JSON::scope_selector( $root_selector, $feature_selector );
[588] Fix | Delete
}
[589] Fix | Delete
[590] Fix | Delete
// Subfeature selector
[591] Fix | Delete
// This may fallback either to parent feature or root selector.
[592] Fix | Delete
$subfeature_selector = null;
[593] Fix | Delete
[594] Fix | Delete
// Use selectors API if available.
[595] Fix | Delete
if ( $has_selectors ) {
[596] Fix | Delete
$subfeature_selector = _wp_array_get( $block_type->selectors, $target, null );
[597] Fix | Delete
}
[598] Fix | Delete
[599] Fix | Delete
// Only return if we have a subfeature selector.
[600] Fix | Delete
if ( $subfeature_selector ) {
[601] Fix | Delete
return $subfeature_selector;
[602] Fix | Delete
}
[603] Fix | Delete
[604] Fix | Delete
// To this point we don't have a subfeature selector. If a fallback
[605] Fix | Delete
// has been requested, remove subfeature from target path and return
[606] Fix | Delete
// results of a call for the parent feature's selector.
[607] Fix | Delete
if ( $fallback ) {
[608] Fix | Delete
return wp_get_block_css_selector( $block_type, $target[0], $fallback );
[609] Fix | Delete
}
[610] Fix | Delete
[611] Fix | Delete
return null;
[612] Fix | Delete
}
[613] Fix | Delete
[614] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function