• Why can’t I catch a breakpoint on a standard widget meta. Other filters work. What’s wrong ?

    I try:

    add_filter('widget_meta', 'change_widget_title');
    function change_widget_title(){
    	$sto = 100;
    } 
    • This topic was modified 3 years, 10 months ago by Yui.
    • This topic was modified 3 years, 10 months ago by lex0013.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lex0013

    (@lex0013)

    I removed unneeded links directly from the file, but there may be a filter or a hook
    \wp-includes\widgets\class-wp-widget-meta.php

    <li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e( 'Entries feed' ); ?></a></li>
    <li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e( 'Comments feed' ); ?></a></li>
    • This reply was modified 3 years, 10 months ago by lex0013.

    All filter functions must return a value.
    Your filter function doesn’t even take in a value, much less return one.

    Thread Starter lex0013

    (@lex0013)

    I think there is no such filter for the meta widget.
    Since for a filter “widget_title”, the breakpoint works fine during debugging.

    add_filter('widget_title', 'change_widget_title');

    • This reply was modified 3 years, 10 months ago by lex0013.
    Moderator bcworkz

    (@bcworkz)

    I think there is no such filter for the meta widget.

    That’s my finding as well, as it pertains to core code. No telling what themes or plugins might do.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Why can’t I catch a breakpoint on a standard widget meta?’ is closed to new replies.