Info
- 6 posts
- 2 voices
- Started 8 months ago by Jaja..
- Latest reply from Jaja..
- This topic is not resolved
do_action bbp template notices ?
-
- Posted 8 months ago #
I think i'm starting to understand how to build your own forum themes,
But i have a question,
What does<?php do_action( 'bbp_template_notices' ); ?>do for my theme?I'm not very good at PHP and i have search but there is none template_notice.php file also i can't find any filter of function called like this inside a template file, so i was just asking myself what it would do for my theme?
-
- Posted 8 months ago #
I found something..
http://codex.wordpress.org/Function_Reference/add_action
Only trying to find where those functions are.. they aren't in my functions.php
??So they call a function by the plugin DO_ACTION PHP code but i can't find the template that lists all those actions-/functions.
-
- Posted 8 months ago #
It allows for plugins to run a function at certain places during the page generation.
So if someone has a plugin that may generate some notices to the user, then they will add a function to the bbp_template_notices action. This allows them to hook into the action and their function is run each time the do_action('bbp_template_notices'); is called in the theme, or rest of WP/bbp.
-
- Posted 8 months ago #
Adding an action is add_action('bbp_template_notices', 'funciton_name');
I used this bbp_template_notices action hook to print my post toolbar in earlier versions of the plugin. This is because I noticed that the do_action('bbp_template_notices'); was (in bbp-twentyten) near the post form, so each time the post form is displayed, the template notices action is run and the post toolbar is displayed.
-
- Posted 8 months ago #
Also, add_action and do_action are in wp-includes/plugin.php.
-
- Posted 8 months ago #
Thank you...
So it's a hook for WordPress and other plugins to work into this bbPress form..
-
You must log in to post.