overriding code in theme
Ok, so I have written and got working my first plugin, I am adding some user info to the reply display in bbpress.
It has the following lines in one of its php files (loop-single-reply)
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?> <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true) ); ?> [...other lines of code here] <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
I worked out how to get a plugin to put some other stuff I need before ‘bbp_theme_after_reply_author_details’ so it’s working fine
BUT I want to change the line
<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true) ); ?>to
<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => false) ); ?>
I think I do this with a “remove action” in my plugin, and then add the code line as I want it back into my plugin – in effect deleting the line between “do actions” and replacing this with what I want.
But I cannot fathom from the codex and other googles quite how you do this
1) is my understanding correct?
2) what would the code line be in my plugin?
- The topic ‘overriding code in theme’ is closed to new replies.