[wp-hackers] Add Theme support with specified post type
24-7 at gmx.net
Fri May 11 10:37:26 UTC 2012
I'm trying to hold my plugins and themes mostly options free, as this saves
me a lot of time (no need for activate/deactivate/uninstall + testing) and
helps my users living with a slim database.
So here's what I tried: `add_theme_support( 'plugin_name', array( 'post',
'custom_post_type' ) );`. That allows me to check the global, show/hide
And here's the problem: That "feature" is not (yet) implemented .
So here's my idea for a workaround: Check the `global $post_type` (if set)
or `$pagenow, $typenow, $hook_suffix` or something from the `
current_screen_object()` against `$_wp_theme_features['plugin_name']`.
Q: Anyone got a better idea than doing it via a global?
More information about the wp-hackers