WordPress.org

Ready to get started?Download WordPress

Forums

do_action("before_sidebar") / do_action("after_sidebar") (1 post)

  1. karimzai
    Member
    Posted 4 years ago #

    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 function do_action('before_sidebar');
    and in the end of the function do_action('after_sidebar');

    It would really help developers add functionalities to the sidebars.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic