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-conte.../plugins/wpforms-.../src/Forms
File: IconChoices.php
'install_error_content' => wp_kses(
[500] Fix | Delete
sprintf( /* translators: %s - WPForms Support URL. */
[501] Fix | Delete
__( 'There was an error installing the icon library. Please try again later or <a href="%s" target="_blank" rel="noreferrer noopener">contact support</a> if the issue persists.', 'wpforms-lite' ),
[502] Fix | Delete
esc_url(
[503] Fix | Delete
wpforms_utm_link(
[504] Fix | Delete
'https://wpforms.com/account/support/',
[505] Fix | Delete
'builder-modal',
[506] Fix | Delete
'Icon Library Install Failure'
[507] Fix | Delete
)
[508] Fix | Delete
)
[509] Fix | Delete
),
[510] Fix | Delete
[
[511] Fix | Delete
'a' => [
[512] Fix | Delete
'href' => true,
[513] Fix | Delete
'target' => true,
[514] Fix | Delete
'rel' => true,
[515] Fix | Delete
],
[516] Fix | Delete
]
[517] Fix | Delete
),
[518] Fix | Delete
'reinstall_prompt_content' => esc_html__( 'The icon library appears to be missing or damaged. It will now be reinstalled.', 'wpforms-lite' ),
[519] Fix | Delete
'icon_picker_title' => esc_html__( 'Icon Picker', 'wpforms-lite' ),
[520] Fix | Delete
'icon_picker_description' => esc_html__( 'Browse or search for the perfect icon.', 'wpforms-lite' ),
[521] Fix | Delete
'icon_picker_search_placeholder' => esc_html__( 'Search 2000+ icons...', 'wpforms-lite' ),
[522] Fix | Delete
'icon_picker_not_found' => esc_html__( 'Sorry, we didn\'t find any matching icons.', 'wpforms-lite' ),
[523] Fix | Delete
],
[524] Fix | Delete
];
[525] Fix | Delete
[526] Fix | Delete
if ( ! $this->is_installed() ) {
[527] Fix | Delete
return $strings;
[528] Fix | Delete
}
[529] Fix | Delete
[530] Fix | Delete
$strings['icon_choices']['is_installed'] = true;
[531] Fix | Delete
$strings['icon_choices']['icons'] = $this->get_icons();
[532] Fix | Delete
[533] Fix | Delete
return $strings;
[534] Fix | Delete
}
[535] Fix | Delete
[536] Fix | Delete
/**
[537] Fix | Delete
* Get an SVG icon code from a file for inline output in HTML.
[538] Fix | Delete
*
[539] Fix | Delete
* Note: the output does not need escaping.
[540] Fix | Delete
*
[541] Fix | Delete
* @since 1.7.9
[542] Fix | Delete
*
[543] Fix | Delete
* @param string $icon Font Awesome icon name.
[544] Fix | Delete
* @param string $style Font Awesome style (solid, brands).
[545] Fix | Delete
* @param int $size Icon display size.
[546] Fix | Delete
*
[547] Fix | Delete
* @return string
[548] Fix | Delete
*/
[549] Fix | Delete
private function get_icon( $icon, $style, $size ) {
[550] Fix | Delete
[551] Fix | Delete
$icon_sizes = $this->get_icon_sizes();
[552] Fix | Delete
$filename = realpath( "{$this->cache_base_path}/svgs/{$style}/{$icon}.svg" );
[553] Fix | Delete
[554] Fix | Delete
if ( ! $filename || ! is_file( $filename ) || ! is_readable( $filename ) ) {
[555] Fix | Delete
return '';
[556] Fix | Delete
}
[557] Fix | Delete
[558] Fix | Delete
$svg = file_get_contents( $filename );
[559] Fix | Delete
[560] Fix | Delete
if ( ! $svg ) {
[561] Fix | Delete
return '';
[562] Fix | Delete
}
[563] Fix | Delete
[564] Fix | Delete
$height = ! empty( $icon_sizes[ $size ]['size'] ) ? $icon_sizes[ $size ]['size'] : $icon_sizes['large']['size'];
[565] Fix | Delete
$width = $height * 1.25; // Icon width is equal or 25% larger/smaller than height. We force the largest value for all icons.
[566] Fix | Delete
[567] Fix | Delete
return str_replace( 'viewBox=', 'width="' . $width . '" height="' . $height . 'px" viewBox=', $svg );
[568] Fix | Delete
}
[569] Fix | Delete
[570] Fix | Delete
/**
[571] Fix | Delete
* Get all available icons from the metadata file.
[572] Fix | Delete
*
[573] Fix | Delete
* @since 1.7.9
[574] Fix | Delete
*
[575] Fix | Delete
* @return array
[576] Fix | Delete
*/
[577] Fix | Delete
private function get_icons() {
[578] Fix | Delete
[579] Fix | Delete
if ( ! is_file( $this->icons_data_file ) || ! is_readable( $this->icons_data_file ) ) {
[580] Fix | Delete
return [];
[581] Fix | Delete
}
[582] Fix | Delete
[583] Fix | Delete
$icons = file_get_contents( $this->icons_data_file );
[584] Fix | Delete
[585] Fix | Delete
if ( ! $icons ) {
[586] Fix | Delete
return [];
[587] Fix | Delete
}
[588] Fix | Delete
[589] Fix | Delete
return (array) json_decode( $icons, false );
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
/**
[593] Fix | Delete
* Get default accent color.
[594] Fix | Delete
*
[595] Fix | Delete
* @since 1.8.1
[596] Fix | Delete
*
[597] Fix | Delete
* @return string
[598] Fix | Delete
*/
[599] Fix | Delete
public static function get_default_color() {
[600] Fix | Delete
[601] Fix | Delete
$render_engine = wpforms_get_render_engine();
[602] Fix | Delete
[603] Fix | Delete
return array_key_exists( $render_engine, self::DEFAULT_COLOR ) ? self::DEFAULT_COLOR[ $render_engine ] : self::DEFAULT_COLOR['modern'];
[604] Fix | Delete
}
[605] Fix | Delete
}
[606] Fix | Delete
[607] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function