AdminPageFramework_Registry::getVersion PHP Метод

getVersion() публичный статический Метод

public static getVersion ( )
        public static function getVersion()
        {
            if (!isset(self::$sAutoLoaderPath)) {
                trigger_error(self::NAME . ': ' . ' : ' . sprintf(__('The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework'), __METHOD__, 'setUp()'), E_USER_WARNING);
                return self::VERSION;
            }
            $_aMinifiedVesionSuffix = array(0 => '', 1 => '.min');
            $_aDevelopmentVersionSuffix = array(0 => '', 1 => '.dev');
            return self::VERSION . $_aMinifiedVesionSuffix[(int) self::$bIsMinifiedVersion] . $_aDevelopmentVersionSuffix[(int) self::$bIsDevelopmentVersion];
        }

Usage Example

 /**
  * Triggered when the tab is loaded.
  */
 public function replyToLoadTab($oAdminPage)
 {
     new GitHubCustomFieldType('admin_page_framework');
     $oAdminPage->addSettingSections($this->sPageSlug, array('section_id' => $this->sSectionID, 'tab_slug' => $this->sTabSlug));
     $oAdminPage->addSettingFields($this->sSectionID, array('field_id' => 'github_star', 'type' => 'github', 'user_name' => 'michaeluno', 'button_type' => 'star', 'count' => false, 'repository' => 'admin-page-framework', 'size' => 'mega', 'attributes' => array('data-text' => ' ' . AdminPageFramework_Registry::NAME . ' ' . AdminPageFramework_Registry::getVersion() . ' '), 'description' => __('Star the repository and get Involved!', 'admin-page-framework-demo'), 'show_title_column' => false));
     add_action('do_form_' . $this->sPageSlug . '_' . $this->sTabSlug, array($this, 'replyToDoTabBeforeForm'));
 }
All Usage Examples Of AdminPageFramework_Registry::getVersion