Ah! I figured it out, thanks to Dr. Mike's assistance:
The following is DrMike's words, not mine, just edited to make the premium selection work with this plugin.
- Open up wp-admin/upgrade-schema.php for editing.
- Go down until you hit the function populate_options.
- See all those add_option lines? What we need to do is add in our own with a default. For example, we'll add in the following line:
add_option('premium_blog', 0);
This way when a new blog is created, it will already have the flag set in there to be negative.
But what to do with blogs already created? We're going to have to fake an upgrade.
- Open up wp-includes/version.php for editing.
- See that line that lists the current database version number? Add '1' to it. For example if it's currently 3845, edit it to show as 3846. Be sure to save the file afterwards. (The software checks against the version numbers. If they match, it assumes it's already been done.)
- Open up wp-admin/upgrade-functions.php for editing and go about a third of the way down. You should see a bit like the following:
if ( $wp_current_db_version < 3308 )
upgrade_160();
What we need to do is add our own in there. Since in this case we're just adding in a single add_option we're just take care of it right there and not worry about any other functions.
if ( $wp_current_db_version < 4000 )
add_option( "premium_blog", 0 );
Save it afterwards.
- Run the upgrade from the Site Admin menu.
All your blogs should now have this flag set as default.
How to activate this flag? When you get a user who has paid their ten bucks or whatever, just go into Dashboard -> Site Admin -> Blogs -> Find their blog and edit it. Using thte example above, your should now have a field with 'Premium Blog' in front of it. Change it to 1 and save.
End Dr Mike and insert me.
When you have this selected, and certain plugins designated as "Premium" under the Premium Menu option, all the plugins will show. The ones that are designated as Premium will not show for those who are not designated as premium.
Now, I want to do this with themes as well. Unfortunately, I am not a coder--I just experimented with DrMike's advice. (If I knew how to put together the entire plugin I would).
If someone could point me in the right direction, or explain how I could do the same thing for themes--I would appreciate the help. If I could do that, I think I would accomplish everything I need with this plugin.