예제 #1
0
 /**
  * Constructor.
  * Loads options to private static variable.
  */
 public function __construct()
 {
     self::$options = get_site_option('github_updater', array());
     self::$options_remote = get_site_option('github_updater_remote_management', array());
     $this->add_headers();
     /*
      * Calls in init hook for user capabilities.
      */
     add_action('init', array(&$this, 'init'));
     add_action('init', array(&$this, 'background_update'));
     add_action('init', array(&$this, 'token_distribution'));
     add_filter('http_request_args', array('Fragen\\GitHub_Updater\\API', 'http_request_args'), 10, 2);
 }
예제 #2
0
파일: Base.php 프로젝트: vinhvv75/tutannet
 /**
  * Constructor.
  * Loads options to private static variable.
  */
 public function __construct()
 {
     self::$options = get_site_option('github_updater', array());
     self::$options_remote = get_site_option('github_updater_remote_management', array());
     $this->add_headers();
     /*
      * Calls in init hook for user capabilities.
      */
     add_action('init', array(&$this, 'init'));
     add_action('init', array(&$this, 'background_update'));
 }
예제 #3
0
 /**
  * Constructor.
  * Loads options to private static variable.
  */
 public function __construct()
 {
     $this->ensure_api_key_is_set();
     self::$options = get_site_option('github_updater', array());
     self::$options_remote = get_site_option('github_updater_remote_management', array());
     /*
      * Calls in init hook for user capabilities.
      */
     add_action('init', array(&$this, 'init'));
     add_action('init', array(&$this, 'background_update'));
     add_action('init', array(&$this, 'token_distribution'));
     add_action('wp_ajax_github-updater-update', array(&$this, 'ajax_update'));
     add_action('wp_ajax_nopriv_github-updater-update', array(&$this, 'ajax_update'));
     add_filter('extra_theme_headers', array(&$this, 'add_headers'));
     add_filter('extra_plugin_headers', array(&$this, 'add_headers'));
     add_filter('http_request_args', array('Fragen\\GitHub_Updater\\API', 'http_request_args'), 10, 2);
     add_filter('http_request_args', array('Fragen\\GitHub_Updater\\Bitbucket_API', 'ajax_maybe_authenticate_http'), 15, 2);
     add_filter('upgrader_source_selection', array(&$this, 'upgrader_source_selection'), 10, 4);
 }
예제 #4
0
 /**
  * Load site options.
  */
 protected function load_options()
 {
     self::$options = get_site_option('github_updater', array());
     self::$options_remote = get_site_option('github_updater_remote_management', array());
 }