function __construct() { // start the clock $this->_importer_started = time(); $this->_max_execution_time = 30; // default to 30 seconds of time on the clock parent::__construct(); // add the importer schedule add_filter('cron_schedules', array($this, 'importer_schedule')); // add the importer hook add_action('wp_cron_importer_hook', array($this, 'importer_callback')); //load the variables $options = get_option(get_class($this)); if (is_array($options)) { foreach ($options as $key => $value) { $this->{$key} = $value; } } }
/** * __construct * */ public function __construct() { parent::__construct(); add_action('importer_meta_field_update', array($this, 'update_post_meta'), 10, 3); }
/** * Constructor * * @since 3.0.0 */ public function __construct() { parent::__construct(); $this->i18n = array('count' => esc_html__('%s items'), 'count_inserted' => esc_html__('%s items inserted'), 'count_merged' => esc_html__('%s items merged'), 'count_skipped' => esc_html__('%s items skipped'), 'count_failed' => esc_html__('%s items failed')); }