Hooks

From StartBox Documentation

Jump to: navigation, search

Below is a list of the hooks included with StartBox broken down by where they appear in each template. At the bottom is a list of default actions being hooked.

Learn how to tap into these hooks with add_action().

For a visual record of where these hooks fire, check out the Annotated Markup


Contents

Default Hooks

Located in header.php

sb_title
Location: The site title
sb_before
Location: the very first thing inside <body>
sb_before_header
Location: inside div#wrap, before div#header
sb_header
Location: inside div#header, before any content
sb_after_header
Location: inside div#wrap, after div#header
sb_before_container
Location: inside div#container_wrap, before div#container

Located in front-page.php

sb_before_featured
Location: Located just after sb_before_content
sb_featured
Location: Located just after sb_before_featured
sb_after_featured
Location: Located just after sb_featured
sb_no_featured_widgets
Location: Fires if no widgets are hooked into Home Featured.
sb_home
Location: Located just after sb_after_featured

Located in most Templates

Specifically, these hooks are located in: 404.php, archive.php, attachment.php, author.php, index.php, page.php and all other page templates, search.php, single.php

sb_before_content
Location: Just before the content
sb_page_title
Location: The Page Title, appears immediately after sb_before_content
sb_after_content
Location: Just after the content

Located in loop.php

sb_before_post
Location: Just before the post
sb_after_post
Location: Just after the post
sb_before_first_post
Location: Just before the first post
sb_after_first_post
Location: Just after the first post

Located in loop.php and single.php

sb_before_post_content
Location: Inside div.post, after .entry-header, before .entry-content
sb_post_header
Location: Inside div.entry-meta
sb_post_footer
Location: Inside div.entry-footer
sb_after_post_content
Location: Inside div.post, after .entry-content, before .entry-footer

Located in 404.php

sb_404
Location: Inside div.post, only on 404 page

Located in sidebar.php

sb_before_primary_widgets
Location: Inside div#container, after div#content before div#primary
sb_primary_widgets
Location: The #primary widget area
sb_no_primary_widgets
Location: Fires when there are no widgets is the Primary widget area
sb_between_primary_and_secondary_widgets
Location: After div#primary, before div#secondary
sb_secondary_widgets
Location: The #secoandary widet area
sb_no_secondary_widgets
Location: Fires when there are no widgets is the Secondary widget area
sb_after_secondary_widgets
Location: Inside div#container, after div#secondary
sb_no_widgets
Location: This is hooked into all sb_no_*_widget hooks

Located in sidebar-tertiary.php

sb_before_tertiary_widgets
Location: Inside div#container, after div#content, before div#tertiary
sb_after_tertiary_widgets
Location: Inside div#container, after div#tertiary
sb_no_tertiary_widgets
Location: Fires when there are no widgets is the Tertiary widget area.

Located in sidebar-footer.php

sb_before_footer_widgets
Location: inside div#footer, before div#footer_sidebar
sb_between_footer_widgets
Location: inside div#footer_sidebar, between each div.aside
sb_after_footer_widgets
Location: inside div#footer, after div#footer_sidebar
sb_no_footer_aside_widgets
Location: Fires when there are no widgets in Footer Column 1.
sb_no_footer_aside_2_widgets
Location: Fires when there are no widgets in Footer Column 2.
sb_no_footer_aside_3_widgets
Location: Fires when there are no widgets in Footer Column 3.
sb_no_footer_aside_4_widgets
Location: Fires when there are no widgets in Footer Column 4.

Located in footer.php

sb_after_container
Location: inside div#container_wrap, after div#container
sb_between_content_and_footer
Location: after div#wrap, before div#footer_wrap
sb_before_footer
Location: inside div#footer_wrap, before div#footer
sb_footer
Location: inside div#footer after div#footer_sidebar
sb_footer_left
Location: inside div#footer
sb_footer_right
Location: inside div#footer
sb_after_footer
Location: inside dive#footer_wrap, after div#footer
sb_after
Location: the very last thing before </body>

Located in startbox.php

sb_init
Location: Included hook for other things to do during initialization.
sb_install
Location: Included hook for other things to do during installation.
sb_upgrade
Location: Included hook for other things to do during upgrade.
sb_child_install
Location: Included hook for other things to do during child theme installation.
sb_uninstall
Location: Included hook for other things to do during uninstall.

Located in slideshows.php

sb_slideshow_enqueue
Location: Allows default enqueued scripts for slideshow to be replaced.
sb_slideshow_wp_head
Location: Hooks into wp_head

Default Actions

Below is everything that is being hooked in throughout StartBox, listed alphabetically by file, and then again by hook.

Note: To remove or reposition actions hooked in via option panels, wrap sb_remove_action() and sb_add_action() into a function hooked into init within your child theme.

Hooked in via /includes/functions/startbox.php

Hooked in via /includes/functions/hooks.php

Hooked in via Header Settings

Hooked in via Content Settings

Hooked in via Footer Settings

Hooked in via Feedburner Settings

Hooked in via Analytics Settings

Hooked in via Save the Web Settings

Hooked in via SEO Settings

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox