godaddy-wordpress / primer

Primer is a powerful theme that brings clarity to your content in a fresh design. This is the parent for all themes in the GoDaddy Primer theme family.
https://wordpress.org/themes/primer/
GNU General Public License v2.0
134 stars 36 forks source link

Introduce priorities to theme functions #91

Closed EvanHerman closed 7 years ago

EvanHerman commented 8 years ago

The functions hooking into theme actions should include some sort of priority, and should be documented in a doc block above the action it is hooked into. This would help theme developers extend our theme, and know exactly what function is hooked where - and in what order.

Example: WooCommerce hook and priority docs

This would also allow theme developers to add additional elements into the theme, in locations that are currently not reachable, such as in-between the navigation and the page header/title.

frankiejarrett commented 8 years ago

@EvanHerman Great. I like the reasoning here. Would you agree that these should only be added for action hooks in templates and partials?

EvanHerman commented 8 years ago

@fjarrett Yea, I would agree that would be the best location for them. The functions hooking into the templates and partials would benefit from them.

EvanHerman commented 7 years ago

This is addressed inside of https://github.com/godaddy/wp-primer-theme/pull/134/commits/3b4dd865542d1db7c65b8ff4108c5a2b676598d1 on the woocomerce-compat branch.

frankiejarrett commented 7 years ago

Done in #146