Need help with creating a premium plugin


Luke helped me a bit over on the advanced forums but I desided to bring this over here since folks have asked how to create their own premium plugins.

Working on a CSS editor as an addon. We have it working but I would like to clean up the code some. Here's the bit I have a question on currently:


//register premium features
premium_register_feature('b6d767d2f8ed5d21a44b0e5886680cb9', 'Custom CSS', 'Replace the themes CSS with your own.  Includes editor. ');

//load premium features
if (premium_active_feature('b6d767d2f8ed5d21a44b0e5886680cb9') == 'active'){
     $premium_custom_css = '1';
} else {
     $premium_custom_css = '0';

function get_my_css() {
  global $premium_custom_css;
  if ( $premium_custom_css == '1' ) {
    $css_link = get_bloginfo('home') . '/css/style.css';
  } else {
    $css_link = bloginfo('stylesheet_url');
  echo $css_link;

Here's my question. When Luke gave his example, he included the $premium_custom_css variable as a blog option. Would it be better to save it as a blog option or should I just say the heck with it and leave it as is? To me, I just feel that this is yet another query that we might not need.

Just trying to code better. :slight_smile: