• I’m attempting to use the mark_as_read_single_forum_link() function to put the link in a diffrent location in loop-topics.php.

    However, I’m getting an undefined error. It’s odd, because on the same page, I have the standard mark as read link, via the standard hook.

    <?php if ( is_user_logged_in() ) {
    echo '<a href="#new-post" class="btn">New Topic</a>'; } ?>
    <?php mark_as_read_single_forum_link(); ?>
    <?php fx_bbp_user_subscribe_link( array( 'before' => '' ) ); ?>
    PHP Fatal error:  Call to undefined function mark_as_read_single_forum_link()

    Any suggestions? Thanks for any insights….

    https://ww.wp.xz.cn/plugins/bbpress-pencil-unread/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter johnmontfx

    (@johnmontfx)

    Figured it out…

    bbP_Pencil_Unread::mark_as_read_single_forum_link();

    Thread Starter johnmontfx

    (@johnmontfx)

    Though following up on this, what is the correct syntax for removing this action?

    //mark as read
     add_action('bbp_template_after_pagination_loop', array(&$this,"mark_as_read_single_forum_link"));
    Thread Starter johnmontfx

    (@johnmontfx)

    Tried this but it doesn’t seem to work. I’m sure I’m doing something wrong as I’m learning about classes inside plugins today…

    //Remove Pencil Mark as Unread Action
    $fxtmp = bbP_Pencil_Unread::instance();
    remove_action('bbp_template_after_pagination_loop', array($fxtmp,"mark_as_read_single_forum_link"));
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘mark_as_read_single_forum_link function issue’ is closed to new replies.