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.../blocks
File: search.php
*
[500] Fix | Delete
* @return string A string of typography CSS declarations.
[501] Fix | Delete
*/
[502] Fix | Delete
function get_typography_styles_for_block_core_search( $attributes ) {
[503] Fix | Delete
$typography_styles = array();
[504] Fix | Delete
[505] Fix | Delete
// Add typography styles.
[506] Fix | Delete
if ( ! empty( $attributes['style']['typography']['fontSize'] ) ) {
[507] Fix | Delete
$typography_styles[] = sprintf(
[508] Fix | Delete
'font-size: %s;',
[509] Fix | Delete
wp_get_typography_font_size_value(
[510] Fix | Delete
array(
[511] Fix | Delete
'size' => $attributes['style']['typography']['fontSize'],
[512] Fix | Delete
)
[513] Fix | Delete
)
[514] Fix | Delete
);
[515] Fix | Delete
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
if ( ! empty( $attributes['style']['typography']['fontFamily'] ) ) {
[519] Fix | Delete
$typography_styles[] = sprintf( 'font-family: %s;', $attributes['style']['typography']['fontFamily'] );
[520] Fix | Delete
}
[521] Fix | Delete
[522] Fix | Delete
if ( ! empty( $attributes['style']['typography']['letterSpacing'] ) ) {
[523] Fix | Delete
$typography_styles[] = sprintf( 'letter-spacing: %s;', $attributes['style']['typography']['letterSpacing'] );
[524] Fix | Delete
}
[525] Fix | Delete
[526] Fix | Delete
if ( ! empty( $attributes['style']['typography']['fontWeight'] ) ) {
[527] Fix | Delete
$typography_styles[] = sprintf( 'font-weight: %s;', $attributes['style']['typography']['fontWeight'] );
[528] Fix | Delete
}
[529] Fix | Delete
[530] Fix | Delete
if ( ! empty( $attributes['style']['typography']['fontStyle'] ) ) {
[531] Fix | Delete
$typography_styles[] = sprintf( 'font-style: %s;', $attributes['style']['typography']['fontStyle'] );
[532] Fix | Delete
}
[533] Fix | Delete
[534] Fix | Delete
if ( ! empty( $attributes['style']['typography']['lineHeight'] ) ) {
[535] Fix | Delete
$typography_styles[] = sprintf( 'line-height: %s;', $attributes['style']['typography']['lineHeight'] );
[536] Fix | Delete
}
[537] Fix | Delete
[538] Fix | Delete
if ( ! empty( $attributes['style']['typography']['textTransform'] ) ) {
[539] Fix | Delete
$typography_styles[] = sprintf( 'text-transform: %s;', $attributes['style']['typography']['textTransform'] );
[540] Fix | Delete
}
[541] Fix | Delete
[542] Fix | Delete
return implode( '', $typography_styles );
[543] Fix | Delete
}
[544] Fix | Delete
[545] Fix | Delete
/**
[546] Fix | Delete
* Returns border color classnames depending on whether there are named or custom border colors.
[547] Fix | Delete
*
[548] Fix | Delete
* @since 5.9.0
[549] Fix | Delete
*
[550] Fix | Delete
* @param array $attributes The block attributes.
[551] Fix | Delete
*
[552] Fix | Delete
* @return string The border color classnames to be applied to the block elements.
[553] Fix | Delete
*/
[554] Fix | Delete
function get_border_color_classes_for_block_core_search( $attributes ) {
[555] Fix | Delete
$border_color_classes = array();
[556] Fix | Delete
$has_custom_border_color = ! empty( $attributes['style']['border']['color'] );
[557] Fix | Delete
$has_named_border_color = ! empty( $attributes['borderColor'] );
[558] Fix | Delete
[559] Fix | Delete
if ( $has_custom_border_color || $has_named_border_color ) {
[560] Fix | Delete
$border_color_classes[] = 'has-border-color';
[561] Fix | Delete
}
[562] Fix | Delete
[563] Fix | Delete
if ( $has_named_border_color ) {
[564] Fix | Delete
$border_color_classes[] = sprintf( 'has-%s-border-color', esc_attr( $attributes['borderColor'] ) );
[565] Fix | Delete
}
[566] Fix | Delete
[567] Fix | Delete
return implode( ' ', $border_color_classes );
[568] Fix | Delete
}
[569] Fix | Delete
[570] Fix | Delete
/**
[571] Fix | Delete
* Returns color classnames depending on whether there are named or custom text and background colors.
[572] Fix | Delete
*
[573] Fix | Delete
* @since 5.9.0
[574] Fix | Delete
*
[575] Fix | Delete
* @param array $attributes The block attributes.
[576] Fix | Delete
*
[577] Fix | Delete
* @return string The color classnames to be applied to the block elements.
[578] Fix | Delete
*/
[579] Fix | Delete
function get_color_classes_for_block_core_search( $attributes ) {
[580] Fix | Delete
$classnames = array();
[581] Fix | Delete
[582] Fix | Delete
// Text color.
[583] Fix | Delete
$has_named_text_color = ! empty( $attributes['textColor'] );
[584] Fix | Delete
$has_custom_text_color = ! empty( $attributes['style']['color']['text'] );
[585] Fix | Delete
if ( $has_named_text_color ) {
[586] Fix | Delete
$classnames[] = sprintf( 'has-text-color has-%s-color', $attributes['textColor'] );
[587] Fix | Delete
} elseif ( $has_custom_text_color ) {
[588] Fix | Delete
// If a custom 'textColor' was selected instead of a preset, still add the generic `has-text-color` class.
[589] Fix | Delete
$classnames[] = 'has-text-color';
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
// Background color.
[593] Fix | Delete
$has_named_background_color = ! empty( $attributes['backgroundColor'] );
[594] Fix | Delete
$has_custom_background_color = ! empty( $attributes['style']['color']['background'] );
[595] Fix | Delete
$has_named_gradient = ! empty( $attributes['gradient'] );
[596] Fix | Delete
$has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] );
[597] Fix | Delete
if (
[598] Fix | Delete
$has_named_background_color ||
[599] Fix | Delete
$has_custom_background_color ||
[600] Fix | Delete
$has_named_gradient ||
[601] Fix | Delete
$has_custom_gradient
[602] Fix | Delete
) {
[603] Fix | Delete
$classnames[] = 'has-background';
[604] Fix | Delete
}
[605] Fix | Delete
if ( $has_named_background_color ) {
[606] Fix | Delete
$classnames[] = sprintf( 'has-%s-background-color', $attributes['backgroundColor'] );
[607] Fix | Delete
}
[608] Fix | Delete
if ( $has_named_gradient ) {
[609] Fix | Delete
$classnames[] = sprintf( 'has-%s-gradient-background', $attributes['gradient'] );
[610] Fix | Delete
}
[611] Fix | Delete
[612] Fix | Delete
return implode( ' ', $classnames );
[613] Fix | Delete
}
[614] Fix | Delete
[615] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function