WordPress.org

Forums

Advanced Most Recent Posts Mod
Bug report and fix (1 post)

  1. davidnde
    Member
    Posted 4 years ago #

    There is a bug with the widget when using qTranslate Plugin since it modifies the title content. The Output will be something like

    <a title="<!--:de-->POSTTITLE IN GERMAN<!--:-->" href="http://..."><!--:de-->POSTTITLE IN GERMAN<!--:--></a>

    Affects at least Plugin-Version 1.6.2 and below. It might also effect other plugins than qTranslate that hook the post title.

    Fix
    In advanced-most-recent-posts-mod/adv-most-recent.php replace

    $post_title = stripslashes($post->post_title);

    with

    $post_title = get_the_title($post->ID);

    This will make the hooks work right.

    ------------

    You should also use esc_attr for the title attribute in the link tag:
    <a href="' . get_permalink($post->ID) . '" title="'. esc_attr($post_title) .'" >

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Most Recent Posts Mod
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic