Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24208

    Hi again,

    I’m having this error now :

    PHP Notice: Undefined variable: time_format in /home/dpmderek/public_html/wp-content/themes/abundance/framework/php/class-framework-widgets.php on line 991

    Thanks a lot.

    #122735

    Hi ganjou,

    What does line 991 say in that file?

    Regards,

    Devin

    #122736
    function avia_get_comment_list($avia_new_query)
    {
    global $avia_config;

    $comments = get_comments($avia_new_query);

    if(!empty($comments)) :
    echo '<ul class="news-wrap">';
    foreach($comments as $comment)
    {

    echo '<li class="news-content">';
    echo "<a>comment_post_ID)."' href='".get_comment_link($comment)."'>";
    echo "<span class='news-thumb'>";
    echo get_avatar($comment,'48');
    echo "</span>";
    echo "<strong class='news-headline'>".avia_backend_truncate($comment->comment_content, 55," ");
    echo "<span class='news-time'>".get_the_time($time_format, $comment->comment_post_ID)." by ".$comment->comment_author."</span>";
    echo "";
    echo "</a>";

    echo '';

    }
    echo "";
    wp_reset_postdata();
    endif;
    }
    }

    #122737

    Unless you have modified that function or its a version other than 1.9, that function should be:

    if (!function_exists('avia_get_comment_list'))
    {

    function avia_get_comment_list($avia_new_query)
    {
    $time_format = apply_filters( 'avia_widget_time' , get_option('date_format')." - ".get_option('time_format') );

    global $avia_config;

    $comments = get_comments($avia_new_query);

    if(!empty($comments)) :
    echo '<ul class="news-wrap">';
    foreach($comments as $comment)
    {

    echo '<li class="news-content">';
    echo "<a class='news-link' title='".get_the_title($comment->comment_post_ID)."' href='".get_comment_link($comment)."'>";
    echo "<span class='news-thumb'>";
    echo get_avatar($comment,'48');
    echo "</span>";
    echo "<strong class='news-headline'>".avia_backend_truncate($comment->comment_content, 55," ");
    echo "<span class='news-time'>".get_the_time($time_format, $comment->comment_post_ID)." by ".$comment->comment_author."</span>";
    echo "</strong>";
    echo "</a>";

    echo '</li>';

    }
    echo "</ul>";
    wp_reset_postdata();
    endif;
    }
    }

    #122738

    Ok, thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Time format error’ is closed to new replies.