Suggestion for the documentation: Hooks and Filters
In my settings, there's a checkbox that registers a new post type when it's checked. This custom post type was supposed to have a rewritten URL, but it didn't work. Until I found this in WordPress Codex ( http://codex.wordpress.org/Function_Reference/register_post_type ):
Note: If registering a post type inside of a plugin, call flush_rewrite_rules() in your
activation and deactivation hook (see Flushing Rewrite on Activation below).
If flush_rewrite_rules() is not used, then you will have to manually go to
Settings > Permalinks and refresh your permalink structure before your custom
post type will show the correct structure.
So I looked for a hook that is called right after saving data, and I found 'tf_admin_options_saved_{namespace}' I added this line of code:
add_action('tf_admin_options_saved_mythemename', 'flush_rewrite_rules');
Aaaand it's fixed! The hook was really helpful. I was thinking, maybe other developers face the same issue, and having this somewhere inside the documentation could help them out. Maybe we should have a documentation section for hooks and filters.
Yea we need docs to list all the hooks and how to use them.
Might be a good idea to add more hooks which might be helpful
Just waiting for the titanframework.net site to stabilize, then I'll proceed to get this done pronto.
All right, created the category for hooks. the documentation site www.titanframework.net will be further updated.
Just started working with Titan. Nice stuff! But I found documentation lacking as well, especially around hooks. I am happy to contribute as I work with it. Let me know if that is possible and how to get involved!
FWIW, if you follow the WP core inline documentation standards for PHP, you can use the official phpdoc-parser plugin to parse your hook docs into a WordPress site.
Welp, I'm not sure how I unassigned @oherman since I'm not a collaborator here ... but, whoops!