do_action(“before_sidebar”) / do_action(“after_sidebar”)
-
We need to fire some actions before a sidebar is displayed or after a sidebar is displayed.
It is important for:
1. Filtering HTML generated by all the widgets in a sidebar.
2. Outputting custom HTML in the beginning and the end of a sidebar.
3. Detecting if a specific piece of HTML was generated by a sidebar or not.The function
dynamic_sidebar()
In the file wp-includes/widgets.php should have these lines:
In the beginning of the functiondo_action('before_sidebar');
and in the end of the functiondo_action('after_sidebar');
It would really help developers add functionalities to the sidebars.
Thanks
- The topic ‘do_action(“before_sidebar”) / do_action(“after_sidebar”)’ is closed to new replies.