Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
ganix33
tagDiv Member

Hi,

The proposed solution you gave me by email (using WPML String Translation) works for me at the moment but in my opinion it’s a workaround for a problem that should be fixed.

Thank you very much for your interest.

Regards.

ganix33
tagDiv Member

Hi,

Yes, this widget is a WP native element, but displayed content is filtered by a hook by TagDiv. This is the code at line #2919 in wp-content/plugins/td-composer/legacy/common/wp_booster/td_wp_booster_functions.php:

/**
* Filter sets the global block template to the wp widgets
* @see 'widget_display_callback' hook on 'class-wp-widget.php'
*/
add_filter('widget_display_callback', 'on_widget_display_callback', 10, 3);
function on_widget_display_callback($currentWidgetInstanceSettings, $currentWidgetInstance, $widgetArgs) {

if( isset($widgetArgs['widget_id']) && strpos($widgetArgs['widget_id'], 'td_block') !== 0 ) {
// var_dump($widgetArgs);
// var_dump($currentWidgetInstance);
$global_block_template_id = td_options::get('tds_global_block_template', 'td_block_template_1');
$widgetArgs['before_widget'] = str_replace(' class="', " class=\"$global_block_template_id ", $widgetArgs['before_widget']);

$block_title_class = 'td-block-title';
if ($global_block_template_id === 'td_block_template_1') {
$block_title_class = 'block-title';
}
$widgetArgs['before_title'] = '<h4 class="' . $block_title_class . '"><span>';
$widgetArgs['after_title'] = '</span></h4>';

call_user_func_array(array($currentWidgetInstance, 'widget'), array($widgetArgs, $currentWidgetInstanceSettings));

// Returning false will effectively short-circuit display of the widget.
return false;
}

// Returning $currentWidgetInstanceSettings, as the apply_filters of this hook require
return $currentWidgetInstanceSettings;
}

If you comment “add_filter” line all works fine. The problem is that the instruction

call_user_func_array(array($currentWidgetInstance, 'widget'), array($widgetArgs, $currentWidgetInstanceSettings));

sends false as second parameter but called function expects an array.

Anyway I tried PHP 8.0 as you suggested but error persists. If you want to check it out I can send you URL and credentials.

Regards.

ganix33
tagDiv Member

Hi!

All works fine now.
Thanks!

ganix33
tagDiv Member

Hi!

No news from you since two days ago. Did you receive credentials you requested?

Regards.

Viewing 4 posts - 1 through 4 (of 4 total)