I'll try my best to explain what I'm trying to achieve. I haven't been developing with Wordpress for a while and I've hit a bit of a wall.
I'm looking to get into making Premium Wordpress Themes. Each theme is going to consist of custom post types (e.g. portfolio, slideshow, events). I'm trying to create a SINGLE plugin which holds these custom post types and only includes the custom post types the theme uses.
E.g. a theme may only use the portfolio custom post type. I'm achieving this so far by adding this to the themes function.php file.
add_theme_support( 'custom_portfolio' )
Then, within the plugin, i'm using:
require_if_theme_supports( 'custom_portfolio', PLUGINROOT . '/inc/post-types/portfolio.php' );
I'm trying to make these themes not 'lock' the user in. If they are to change themes, the custom post types are still visible, so they can accesss the data, even if they may not work accordingly. Obviously, the custom post types will fail to load because the theme won't have support for 'custom-portfolio'.
How can I achieve this?
Thanks.