• Resolved Norbert

    (@norbusan)


    Dear devs,

    thanks for the great plugin which is very useful. I would like to suggest only one thing for now: Please make the widget title translatable. This can be easily achieved by adding one line and changing one in SL_links_main.php. Instead of echoing out the title as is, we use apply the widget_title filter to them, like several other plugins do:

    //Add the title
    
    if( ! empty( $instance[ 'title' ] ) ){
      $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']);
      $output .= $before_title . $title . $after_title;
    }

    With this simple change, titles of the widget become translatable.

    Thanks a lot for your understanding

    Norbert

    https://www.ads-software.com/plugins/simple-links/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mat Lipe

    (@mat-lipe)

    Hi Norbert,

    While there is already a ‘simple_links_widget_args’ filter to changes these types of things, I see some value in having a commonly used filter for the title specifically.

    This code will be in the next release

    if( ! empty( $instance[ 'title' ] ) ){
    			$instance[ 'title' ] = apply_filters( 'widget_title', $instance[ 'title' ], $instance, $args );
    			$output .= $before_title . $instance[ 'title' ] . $after_title;
    		}
    Thread Starter Norbert

    (@norbusan)

    Great, thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please allow for translation of widget title’ is closed to new replies.