• Resolved afonsofn

    (@afonsofn)


    I’m using a simple widget_title filter to return an empty string if the widget title starts with !, but it’s not working with Advanced_Ads_Widget.

    Method Advanced_Ads_Widget->widget applies the filters, then overrides them in line 41 of widget.php, preventing the use of an empty string as title:

    $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    
    extract( $args );
    $item_id = empty($instance['item_id']) ? '' : $instance['item_id'];
    $title = empty($instance['title']) ? '' : $instance['title']; // line 41

    Thanks!

    https://ww.wp.xz.cn/plugins/advanced-ads/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Widget overrides widget_title filter’ is closed to new replies.