-
Search Results
-
I have a custom shortcode:
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly if ( ! class_exists( 'avia_sc_portfolio_kacheln' ) ) { class avia_sc_portfolio_kacheln extends aviaShortcodeTemplate { /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['version'] = '1.0'; $this->config['self_closing'] = 'no'; $this->config['base_element'] = 'yes'; $this->config['name'] = 'Portfolio Kachel'; $this->config['tab'] = 'wuk Elements'; $this->config['icon'] = AviaBuilder::$path['imagesURL'] . 'sc-image.png'; $this->config['order'] = 1; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'av_portfoliokachel'; // $this->config['modal_data'] = array( 'modal_class' => 'mediumscreen' ); $this->config['tooltip'] = __( 'Inserts an image of your choice', 'avia_framework' ); $this->config['preview'] = 1; $this->config['disabling_allowed'] = true; $this->config['id_name'] = 'id'; $this->config['id_show'] = 'yes'; } function popup_elements() { $template_url = get_stylesheet_directory_uri(); $this->elements = array( array( 'type' => 'tab_container', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Kachel', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'toggle_container', 'nodescription' => true ), array( "name" => __("Choose Image",'avia_framework' ), "desc" => __("Either upload a new, or choose an existing image from your media library",'avia_framework' ), "id" => "bild", "type" => "image", "title" => __("Insert Image",'avia_framework' ), "button" => __("Insert",'avia_framework' ), "std" => "", ), array( "name" => __("Title", 'avia_framework' ), "id" => "title", "std" => "", "type" => "input" ), array( "name" => __("Text", 'avia_framework' ), "id" => "text", "std" => "", "type" => "textarea" ), array( "name" => __("Button Text", 'avia_framework' ), "id" => "button_text", "std" => "", "type" => "input" ), array( 'name' => __( 'Image Link?', 'avia_framework' ), 'desc' => __( 'Where should your image link to?', 'avia_framework' ), 'id' => 'link', 'type' => 'linkpicker', 'fetchTMPL' => true, 'std' => '', 'lockable' => true, 'subtype' => array( __( 'No Link', 'avia_framework' ) => '', __( 'Lightbox', 'avia_framework' ) => 'lightbox', __( 'Set Manually', 'avia_framework' ) => 'manually', __( 'Single Entry', 'avia_framework' ) => 'single', __( 'Taxonomy Overview Page', 'avia_framework' ) => 'taxonomy', ) ), array( 'name' => __( 'Open new tab/window', 'avia_framework' ), 'desc' => __( 'Do you want to open the link url in a new tab/window?', 'avia_framework' ), 'id' => 'target', 'type' => 'select', 'std' => '', 'lockable' => true, 'required' => array( 'link', 'not_empty_and', 'lightbox' ), 'subtype' => AviaHtmlHelper::linking_options() ), array( 'type' => 'toggle_container_close', 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Advanced', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'toggle_container', 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'screen_options_toggle', 'lockable' => true ), array( 'type' => 'template', 'template_id' => 'developer_options_toggle', 'args' => array( 'sc' => $this ) ), array( 'type' => 'toggle_container_close', 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'element_template_selection_tab', 'args' => array( 'sc' => $this ) ), array( 'type' => 'tab_container_close', 'nodescription' => true ), array( 'id' => 'av_element_hidden_in_editor', 'type' => 'hidden', 'std' => '0' ) ); } /** * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className * * * @param array $params this array holds the default values for $content and $args. * @return $params the return array usually holds an innerHtml key that holds item specific markup. */ function editor_element( $params ) { extract( $params['args'] ); global $KACHELINDEX; $KACHELINDEX++; if (strstr($link,"manually,")) { $url = str_replace("manually,","",$link); } elseif (strstr($link,",")) { $tmp = explode(",",$link); $url = get_the_permalink($tmp[1]); } $out = '<div class="portfolio_kacheln sameheight"'.((empty($button_text) && !empty($link)) ? ' onclick="location.href='.$url.'"' : '').'> <div class="bg2">'.str_pad($KACHELINDEX, 2, "0", STR_PAD_LEFT).'</div> <div class="pic" style="">'. '<img src="'.$bild.'" />'. '<h3>'.$title.'</h3>'. '</div>'. (!empty($text) ? '<p>'.$text.'</p>' : ''). ((!empty($link) && !empty($button_text)) ? '<p class="action"><a href="'.$url.'" class="button">'.$button_text.'</a></p>' : ''). '</div>'; $params['innerHtml'] = $out; return $params; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ function shortcode_handler( $atts, $content = '', $shortcodename = '', $meta = '' ) { extract( $atts ); global $KACHELINDEX; $KACHELINDEX++; if (strstr($link,"manually,")) { $url = str_replace("manually,","",$link); } elseif (strstr($link,",")) { $tmp = explode(",",$link); $url = get_the_permalink($tmp[1]); } $out = '<div class="portfolio_kacheln sameheight"'.((empty($button_text) && !empty($link)) ? ' onclick="'.($target == '' ? 'location.href='.$url.'"' : 'window.open(\''.$url.'\', \'_blank\');') : '').'> <div class="bg2">'.str_pad($KACHELINDEX, 2, "0", STR_PAD_LEFT).'</div> <div class="pic" style="">'. '<img src="'.$bild.'" />'. '<h3>'.$title.'</h3>'. '</div>'. (!empty($text) ? '<p>'.$text.'</p>' : ''). ((!empty($link) && !empty($button_text)) ? '<p class="action"><a'.($target != '' ? ' target="'.$target.'"' : '').' href="'.$url.'" class="button">'.$button_text.'</a></p>' : ''). '</div>'; return $out; } } }taht generates a shortcode like:
[av_portfoliokachel bild='https://xexadeti.cyon.site/wp-content/uploads/2025/08/sta-schweisstechnische-ausbildung-mag-schweissen.jpg' attachment='277' attachment_size='full' title='MAG' text='(135 - Metall-Aktivgas-Schweissen) Unverändert: [av_portfoliokachel bild='https://xexadeti.cyon.site/wp-content/uploads/2025/08/sta-schweisstechnische-ausbildung-mag-schweissen.jpg' attachment='277' attachment_size='full' title='MAG' text='(135 - Metall-Aktivgas-Schweissen) Gelöscht: MAG – das Arbeitstier unter den Schweissverfahren! Wir zeigen dir, wie’s richtig geht!' button_text='Infos zu MAG' link='portfolio_entries,5' target='' id='' custom_class='' template_class='' av_element_hidden_in_editor='0' av_uid='av-mebf8h83' sc_version='1.0' admin_preview_bg=''][/av_portfoliokachel]everything working fine, except oine thing, the ‘ Character.
array( "name" => __("Text", 'avia_framework' ), "id" => "text", "std" => "", "type" => "textarea" ),If I enter a ‘ char in this “Text” field, it doesnt get escaped as it should
as example: text=’test’s’ will be the endresult and not text=’test\’s’. Is there a hook or filter where I can “correctly apply escaping to a field?Strangly, I did setup the page and that did work. I did update to latest enfold version and now, that is not working anymore. Is that a new bug that the encoding is not correctly working?
It dows work, when changing the field name from “text” to “content”. But what, if I want more than 1 “content” field?
Normal textarea should equallless its name escaped correctly in enfold…Thanks for aour advice or fix.
Topic: Site Error after php update
Hi,
Our webhost is telling us that the latest version of php must not be compatable with Enfold because it crashed the site, and we can’t seem to get it back. Can you please advise? Here is the error code. Thanks!Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the avia_framework domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/arvidson/public_html/christmasdecor.arvidsons.com/wp-includes/functions.php on line 6121
Fatal error: Unparenthesized
a ? b : c ? d : eis not supported. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /home2/arvidson/public_html/christmasdecor.arvidsons.com/wp-content/themes/enfold/functions-enfold.php on line 265There has been a critical error on this website. https://christmasdecor.arvidsons.com/
Topic: Upgrading to PHP 8.x error
Hi support.
I have noticed this error over a few of my sites in that I am unable to proceed further onto PHP 8.x – I am upgrading from v 7.4
In the last attempt, the site is completely up to date (theme, plugins etc. ) with the usual error returned:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Please check that the mysqli PHP extension is installed and enabled.
If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.
Could you tell me how I am to proceed to rectify this? Is this something my host needs to look at or is it something in the WordPress Core or Enfold theme?
Cheers
JohnTopic: Version: 4.0.7
Für unsere Homepage (WP 6.8.2, strahlenhterapie-augsburg.de) hat vor vielen Jahren “fizzy mint” ein Theme auf Basis von Enfold Version: 4.0.7 erstellt.
Die alte Enfold Version verhindert leider ein Update auf PHP 8.
Kann ich davon ausgehen, dass die neue Enfold Version abwärtskompatibel ist und mit dem alten „child-Theme“ funktioniert?
Eine „Regular License“ dürfte genügen, oder?
Gerne kann ich Ihnen das Child Theme zusenden.Topic: hamburger menu not appearing
I’ve added the following to quick CSS:
.header_color .av-hamburger-inner, .header_color .av-hamburger-inner::after, .header_color .av-hamburger-inner::before {
background-color: #22467f !important;
}
Recently updated the PHP version and had many issues with images. Had to re upload most of them to get them to appear. However, the hamburger menu is stubborn.Topic: Footer error
I get this:
Warning: Undefined array key “footer_option” in /var/www/viborgvaskerimaskiner.dk/public_html/wp-content/themes/enfold/footer.php on line 35Warning: Undefined array key “footer_behavior” in /var/www/viborgvaskerimaskiner.dk/public_html/wp-content/themes/enfold/footer.php on line 37
Any suggestions?
Dear All,
since the update to Enfold 7.1.2 posts which are scheduled for a future publish date get published, but the read more link / link on the image / heading is linking to the blog page and not to the detail view of the corresponding post.
Enfold 7.1.2
php 8.2
I’m using a child themeI’ve deactivated all other plugins, didn’t solve the problem. I also cleared the old css / js files via Theme Settings / Performance. I also installed a cache plugin WP Super Cache and deleted the Cache, the link on the scheduled post is still not working. Timezone WordPress installation and Server is synchronized. I also updated the permalink structure, but the issue remains.
The link to the post detail view gets corrected if an editor is opening the post and save it again (which is a workaround but not a solution for scheduled posts).
I am very evidently not good with javascript, but was hoping to follow “recipe” on
to Show/Hide a section.
I was trying to create what’s entitled
- Toggle a Section when a button is clicked.
At end of functioning functions.php, I inserted the following code and got the error indicated in the subject line above.
The debug indicates an [18-Sep-2025 01:04:06 UTC] EXCEPTION: Unclosed ‘{‘ on line 1367 in functions.php on line 1393 — that appears to be right on the line prior to the add_action. If I put in } (to close it?), I still get the error.
Please, could somebody steer me right on this thing? I’m befuddled!
Thanks for any help from an expert!
======================================================================================//——————————-
// Toggle section
//——————————-function toggle_on_click(){
?>
<script>
jQuery(window).on(‘load’, function(){// Button onClick event
jQuery(“.toggle-button a”).on(“click”, function(e) {
// Add your button events here
console.log(” toggle section”);
jQuery(“#toggle-section”).toggleClass(“hide-me”);
console.log(” Prevent default “);
e.preventDefault();
});
});
</script>
<!–?php<br /–> }add_action(‘wp_footer’, ‘toggle_on_click’);
I am using Enfold 7.1.2 with PHP 8.4 with WooCommerce as a shop.
When a customer order the “processing email” it leaves a blank space between address 1 and the city, ST ZIP, such as the following:
Joe Bloe
1 Street AddressLos Angeles, CA 90029
It should be:
Joe Bloe
1 Street Address
Los Angeles, CA 90029How do I update the PHP code to remove the blank space on the email if there is no copy in Address 2 field?
I see this in WooCommerce:
To override and edit this email template copy woocommerce/templates/emails/customer-processing-order.php to your theme folder: enfold-child/woocommerce/emails/customer-processing-order.php.
I could use some help how and waht to change from the following:
<?php
/**
* Customer processing order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 9.9.0
*/use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}$email_improvements_enabled = FeaturesUtil::feature_is_enabled( ’email_improvements’ );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( ‘woocommerce_email_header’, $email_heading, $email ); ?><?php echo $email_improvements_enabled ? ‘<div class=”email-introduction”>’ : ”; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( ‘Hi %s,’, ‘woocommerce’ ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( ‘Hi,’, ‘woocommerce’ ) );
}
?>
</p>
<?php if ( $email_improvements_enabled ) : ?>
<p><?php esc_html_e( ‘Just to let you know — we’ve received your order, and it is now being processed.’, ‘woocommerce’ ); ?></p>
<p><?php esc_html_e( ‘Here’s a reminder of what you’ve ordered:’, ‘woocommerce’ ); ?></p>
<?php else : ?>
<?php /* translators: %s: Order number */ ?>
<p><?php printf( esc_html__( ‘Just to let you know — we\’ve received your order #%s, and it is now being processed:’, ‘woocommerce’ ), esc_html( $order->get_order_number() ) ); ?></p>
<?php endif; ?>
<?php echo $email_improvements_enabled ? ‘</div>’ : ”; ?><?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( ‘woocommerce_email_order_details’, $order, $sent_to_admin, $plain_text, $email );/*
* @hooked WC_Emails::order_meta() Shows order meta data.
*/
do_action( ‘woocommerce_email_order_meta’, $order, $sent_to_admin, $plain_text, $email );/*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
*/
do_action( ‘woocommerce_email_customer_details’, $order, $sent_to_admin, $plain_text, $email );/**
* Show user-defined additional content – this is set in each email’s settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? ‘<table border=”0″ cellpadding=”0″ cellspacing=”0″ width=”100%”><tr><td class=”email-additional-content”>’ : ”;
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? ‘</td></tr></table>’ : ”;
}/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( ‘woocommerce_email_footer’, $email );Topic: Widget page inactive
Hello,
The widget page is completely inactive; none of the buttons are working. In debug mode, I get the following error message:
Une erreur de type E_ERROR a été causée dans la ligne 153 du fichier /homepages/21/d858425693/htdocs/wp-content/themes/enfold/framework/php/widgets/widget-classes/class-avia-mailchimp.php. Message d’erreur : Uncaught TypeError: strip_tags(): Argument #1 ($string) must be of type string, array given in /homepages/21/d858425693/htdocs/wp-content/themes/enfold/framework/php/widgets/widget-classes/class-avia-mailchimp.php:153
Stack trace:
#0 /homepages/21/d858425693/htdocs/wp-content/themes/enfold/framework/php/widgets/widget-classes/class-avia-mailchimp.php(153): strip_tags()
#1 /homepages/21/d858425693/htdocs/wp-includes/class-wp-widget.php(535): aviaFramework\widgets\avia_mailchimp_widget->form()
#2 /homepages/21/d858425693/htdocs/wp-admin/includes/widgets.php(276): WP_Widget->form_callback()
#3 /homepages/21/d858425693/htdocs/wp-includes/widgets.php(845): wp_widget_control()
#4 /homepages/21/d858425693/htdocs/wp-admin/includes/widgets.php(119): dynamic_sidebar()
#5 /homepages/21/d858425693/htdocs/wp-admin/widgets-form.php(552): wp_list_widget_controls()
#6 /homepages/21/d858425693/htdocs/wp-admin/widgets.php(34): require(‘/homepages/21/d…’)
#7 {main}
thrown
Thank you for your helpTopic: Theme Update
I have one of your wordpress themes called “5 Arrows” that is at version 4.2. It says you are the author. I believe that it was purchased when I had a renovation done on my website. Currently I don’t have a way to get it updated, and now I am running into an issue with updating PHP beyond 7.4 due to compatability issues. Can someone help me out on this?




