コード例 #1
0
 /**
  * @return ActionScheduler_Versions
  * @codeCoverageIgnore
  */
 public static function instance()
 {
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 public function test_latest_version()
 {
     $versions = new ActionScheduler_Versions();
     $this->assertEquals('__return_null', $versions->latest_version_callback());
     $versions->register('1.2', 'callback_1_dot_2');
     $versions->register('1.3', 'callback_1_dot_3');
     $versions->register('1.0', 'callback_1_dot_0');
     $this->assertEquals('1.3', $versions->latest_version());
     $this->assertEquals('callback_1_dot_3', $versions->latest_version_callback());
 }
コード例 #3
0
ファイル: action-scheduler.php プロジェクト: bself/nuimage-wp
 function action_scheduler_register_1_dot_4_dev()
 {
     $versions = ActionScheduler_Versions::instance();
     $versions->register('1.4-dev', 'action_scheduler_initialize_1_dot_4_dev');
 }