
-
AuthorPosts
-
May 21, 2025 at 9:03 pm #1484538
I am getting a flood of deprecation warnings in my error_log file and it is slowing down our server’s performance, especially noticeable when editing posts and pages.
It appears the offending functions are:
av_icon_char
av_icon_class
av_icon_stringI cannot find information on what the correct replacements are. Is this something you can help me with?
Here are some samples of how we are currently using these functions.
av_icon_char
$icon = av_icon_char( ‘search’ );av_icon_string
$class = av_icon_class( ‘search’ );Here are some examples from the error_log file:
[21-May-2025 18:26:12 UTC] PHP Deprecated: Function av_icon_char is deprecated since version 7.0! Use No longer used by Enfold instead. in /home/maritimetravel/public_html/wp-includes/functions.php on line 6121
[21-May-2025 18:26:12 UTC] PHP Deprecated: Function av_icon_class is deprecated since version 7.0! Use No longer used by Enfold instead. in /home/maritimetravel/public_html/wp-includes/functions.php on line 6121
[21-May-2025 18:26:12 UTC] PHP Deprecated: Function av_icon_char is deprecated since version 7.0! Use No longer used by Enfold instead. in /home/maritimetravel/public_html/wp-includes/functions.php on line 6121
[21-May-2025 18:26:12 UTC] PHP Deprecated: Function av_icon_class is deprecated since version 7.0! Use No longer used by Enfold instead. in /home/maritimetravel/public_html/wp-includes/functions.php on line 6121Our error_log file grows about 200 MB per day.
Can you please direct me on how we can update our child theme to address these deprecation warnings?
May 22, 2025 at 6:06 am #1484551Hey NicomIT,
Thank you for the inquiry.
You can replace the av_icon_string function with:
avia_font_manager::frontend_icon( $avia_config['font_icons'][ 'search' ]['icon'], $avia_config['font_icons'][ 'search']['font'], 'string', true );
For av_icon_char, simply replace the “string” argument with false and remove the third parameter.
avia_font_manager::frontend_icon( $avia_config['font_icons'][ 'search' ]['icon'], $avia_config['font_icons'][ 'search']['font'], false );
You may also need to set the WP_DEBUG to false.
— https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
Best regards,
IsmaelMay 22, 2025 at 1:46 pm #1484584Thanks, Ismael.
What about the av_icon_class function? What is the replacement for this? As in:
$class = av_icon_class( ‘search’ );
May 23, 2025 at 6:01 am #1484594Hi,
Thank you for the update.
There is no replacement for the av_icon_class, but you can create your own utility function by using this code.
global $avia_config; return 'avia-font-' . $avia_config['font_icons'][ $char ]['font'];
This is the current av_icon_class function for reference.
/** * pass a string that matches one of the key of the global font_icons array to get the font class * * @since ???? * @deprecated since 7.0 * @param string $char * @return string */ function av_icon_class( $char ) { global $avia_config; _deprecated_function( 'av_icon_class', '7.0', 'No longer used by Enfold' ); return 'avia-font-' . $avia_config['font_icons'][ $char ]['font']; }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.