WordPress.org

Ready to get started?Download WordPress

Forums

Display Widgets
[resolved] Please use filters for displaying content like titles (2 posts)

  1. nbspjr
    Member
    Posted 1 year ago #

    Hi, sswells.

    I just installed your plugin and noticed that it doesn't work well with qTranslate because you display raw content (like page titles in widget settings). The problem is that I see titles for all languages instead of just the current one. Something like this can be done as a hotfix:

    display-widgets.php:140
    replace
    <label for="<?php echo $widget->get_field_id('page-'. $page->ID); ?>"><?php echo $page->post_title ?></label></p>

    with
    <label for="<?php echo $widget->get_field_id('page-'. $page->ID); ?>"><?php echo apply_filters('the_title', $page->post_title, $page->ID); ?></label></p>

    Or you can use the WP loop instead of foreach, so all the filters will be added automatically.

    http://wordpress.org/extend/plugins/display-widgets/

  2. sswells
    Member
    Plugin Author

    Posted 6 months ago #

    This has been added in v2.0. Thanks for the feedback.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic