-
AuthorPosts
-
November 24, 2022 at 7:38 pm #1373810
Hello Support,
the following error comes up after updating to PHP 8.1
System Information:
WordPress-Version 6.1.1
Aktives Theme: Theme Urologie (Version 1.0)
PHP-Version 8.1.12
ENFOLD: 5.2.1 with Child ThemeError Details
==============
Ein Fehler vom Typ E_ERROR wurde in der Zeile 21 der Datei /html/wordpress_website_urologie/wp-content/themes/enfold-child/functions.php verursacht. Fehlermeldung: Uncaught Error: Undefined constant “‘script_loader_src’” in /html/wordpress_website_urologie/wp-content/themes/enfold-child/functions.php:21
Stack trace:
#0 /html/wordpress_website_urologie/wp-settings.php(585): include()
#1 /html/wordpress_website_urologie/wp-config.php(126): require_once(‘…’)
#2 /html/wordpress_website_urologie/wp-load.php(50): require_once(‘…’)
#3 /html/wordpress_website_urologie/wp-admin/admin-ajax.php(22): require_once(‘…’)
#4 {main}
thrown=====================================
funtions.php:<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/
/*Wordpress Security / mdillschneider 22-06-2020*/
/* Hide WP version strings from scripts and styles
* @return {string} $src
* @filter script_loader_src
* @filter style_loader_src
*/
function fjarrett_remove_wp_version_strings( $src ) {
global $wp_version;
parse_str(parse_url($src, PHP_URL_QUERY), $query);
if ( !empty($query[‘ver’]) && $query[‘ver’] === $wp_version ) {
$src = remove_query_arg(‘ver’, $src);
}
return $src;
}
add_filter( ‘script_loader_src’, ‘fjarrett_remove_wp_version_strings’ );
add_filter( ‘style_loader_src’, ‘fjarrett_remove_wp_version_strings’ );
/* Hide WP version strings from generator meta tag */
function wpmudev_remove_version() {
return ”;
}
add_filter(‘the_generator’, ‘wpmudev_remove_version’);/*Breadcrumb als Shortcode anlegen um Ihn in die Topbar über dem Logo packen zu können*/
function av_breadcrumbs_shortcode( $atts ) {
return avia_breadcrumbs(array(‘separator’ => ‘/’, ‘richsnippet’ => true));
}
add_shortcode( ‘av_breadcrumbs’, ‘av_breadcrumbs_shortcode’ );// Enfold-Avia-Editor “Advanced-Editor …”/”Erweiterter Layout Editor” in Seitenübersicht verstecken
add_filter(‘display_post_states’,’remove_ALB_post_state’,999,2);
function remove_ALB_post_state( $post_states, $post ) {
if(“! has_blocks( $post->ID )”) {
unset($post_states[‘wp_editor’]);
}
if(“!= Avia_Builder()->get_alb_builder_status($post->ID)”) {
unset($post_states[‘avia_alb’]);
}
return $post_states;
}?>
November 24, 2022 at 8:17 pm #1373813Hey dillionline,
Please check line 21 in functions.php in your child theme.
Best regards,
RikardNovember 25, 2022 at 10:26 pm #1373916fixed. Thank you!
November 25, 2022 at 11:27 pm #1373924 -
AuthorPosts
- You must be logged in to reply to this topic.