protected function step() { if ($post_id = current($this->data['posts'])) { $this->transport->importPost($post_id); ++$this->data['current']; array_shift($this->data['posts']); } $this->getStorage()->close(); return !empty($this->data['posts']); }
public function setup($runtime_settings = array()) { parent::setup($runtime_settings); $this->lastsync = date('Y-m-d H:i:s', 0); $this->post_model = new blogPostModel(); $this->get_challenge(); }
public function setup($runtime_settings = array()) { parent::setup($runtime_settings); $options = $this->xmlrpc("wp.getOptions ", 1, $this->option('login'), $this->option('password'), 'software_version'); if ($options && isset($options['software_version'])) { $this->version = $options['software_version']['value']; $this->log("WordPress version:\t{$this->version}", self::LOG_INFO); } }
public function setup($runtime_settings = array()) { if (!extension_loaded('curl')) { throw new waException(_wp('PHP extension curl required')); } parent::setup($runtime_settings); $url = $this->setUrl($this->option('url', $this->xmlrpc_url), $this->xmlrpc_path); $this->log("Begin import from {$url['host']}", self::LOG_INFO); }