Conversation
supportI’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://wordpress.org/plugins/bbpress-pencil-unread/
Figured it out… bbP_Pencil_Unread::mark_as_read_single_forum_link();
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"));
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"));
Figured it out… bbP_Pencil_Unread::mark_as_read_single_forum_link();
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"));
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"));