array( // 'short_slug' => 'std' , // 'long_slug' => 'standard' , // 'short_title' => 'Std' , // 'long_title' => 'Standard' , // 'support_orphaned_records' => FALSE // ) , // // 'pro' => array( // 'short_slug' => 'pro' , // 'long_slug' => 'pro' , // 'short_title' => 'Pro' , // 'long_title' => 'Pro' , // 'support_orphaned_records' => TRUE // ) , // // ) // // ------------------------------------------------------------------------- return array( 'local' => array( 'short_slug' => 'local' , 'long_slug' => 'local_site_manager' , 'short_title' => 'Local' , 'long_title' => 'Local Site Manager' , 'support_orphaned_records' => FALSE ) // 'pro' => array( // 'short_slug' => 'pro' , // 'long_slug' => 'pro' , // 'short_title' => 'Pro' , // 'long_title' => 'Pro' , // 'support_orphaned_records' => TRUE // ) ) ; // ------------------------------------------------------------------------- } // ============================================================================= // get_version_name() // ============================================================================= function get_version_name() { // ------------------------------------------------------------------------- // \greatKiwi_byFernTec_adSwapper_local_v0x1x211_pluginMaker\ // get_version_name() // - - - - - - - - - // Returns the "short" version name/slug - for this version of the plugin. // // RETURNS // $short_version_name STRING // Eg:- // o "local" // o "std" // o "pro" // ------------------------------------------------------------------------- return 'local' ; // ------------------------------------------------------------------------- } // ============================================================================= // is_version_name() // ============================================================================= function is_version_name( $candidate_short_version_name , $question_strict = FALSE ) { // ------------------------------------------------------------------------- // \greatKiwi_byFernTec_adSwapper_local_v0x1x211_pluginMaker\ // is_version_name( // $candidate_short_version_name , // $question_strict = FALSE // ) // - - - - - - - - - - - - - - - - - - - - - - - - // $candidate_short_version_name should be (eg):- // o "std" // o "pro" // // If $question_strict is TRUE, we also check that the:- // $candidate_short_version_name // // is one of the keys of the array returned by:- // get_all_version_names() // // RETURNS // TRUE or FALSE // ------------------------------------------------------------------------- if ( $candidate_short_version_name !== get_version_name() ) { return FALSE ; } // ------------------------------------------------------------------------- if ( $question_strict === TRUE && ! array_key_exists( $candidate_short_version_name , get_all_version_names() ) ) { return FALSE ; } // ------------------------------------------------------------------------- return TRUE ; // ------------------------------------------------------------------------- } // ============================================================================= // That's that! // =============================================================================