public function __construct($settings) { // Get parent constructor parent::__construct($settings); $this->option_key = $settings['option_key']; $this->init_options(); }
public function __construct($settings) { parent::__construct($settings); $this->interval = $settings['interval']; $this->option_key = $settings['option_key']; $this->url_update_fw = 'http://update.runwaywp.com/index.php'; $this->url_update_exts = 'http://runwaywp.com/sites/main'; // $this->url_update_fw = 'http://wptest.loc/upd/index.php'; // $this->url_update_exts = 'http://wptest.loc'; $this->theme_updater_options = get_option($this->option_key); $this->loaded = false; // register the custom stylesheet header add_filter('upgrader_source_selection', array($this, 'upgrader_source_selection_filter'), 10, 3); add_filter('upgrader_pre_download', array($this, 'upgrader_extension_pre_download_filter'), 10, 3); add_action('http_request_args', array($this, 'no_ssl_http_request_args'), 10, 2); add_filter('site_transient_update_themes', array($this, 'check_theme_update')); add_filter('enable_framework_updates', array($this, 'need_framework_updates'), 10, 3); add_action('admin_notices', array($this, 'show_theme_update_notise')); add_action('upgrader_process_complete', array($this, 'upgrader_process_complete_fs'), 10, 2); add_action('upgrader_process_complete', array($this, 'upgrader_process_complete_extensions'), 20, 2); add_action('save_last_request', array($this, 'save_options')); add_action('update-core-custom_do-runway-extension-upgrade', array($this, 'upgrader_custom_extension_function')); add_action('update-custom_do-extension-custom-upgrade', array($this, 'do_extension_custom_upgrade')); add_action('core_upgrade_preamble', array($this, 'update_extensions_block')); }
public function __construct($settings) { // Get parent constructor parent::__construct($settings); $this->option_key = $settings['option_key']; $this->layouts_manager_options = get_option($this->option_key); $this->layouts_path = get_stylesheet_directory() . '/data/layouts/'; add_action('wp_ajax_get_layout_data', array($this, 'ajax_get_layout_data')); add_action('wp_ajax_save_layout', array($this, 'ajax_save_layout')); add_action('wp_ajax_get_content_elements', array($this, 'ajax_get_content_elements')); add_action('wp_ajax_update_header', array($this, 'ajax_update_header')); add_action('wp_ajax_get_headers', array($this, 'ajax_get_headers')); add_action('wp_ajax_update_footer', array($this, 'ajax_update_footer')); add_action('wp_ajax_get_footers', array($this, 'ajax_get_footers')); add_action('wp_ajax_save_options_headers', array($this, 'save_options_headers')); add_action('wp_ajax_save_options_footers', array($this, 'save_options_footers')); add_action('wp_ajax_save_options_other_options', array($this, 'save_options_other_options')); add_action('wp_ajax_get_header_settings_form', array($this, 'get_header_settings_form')); add_action('wp_ajax_get_footer_settings_form', array($this, 'get_footer_settings_form')); add_action('wp_ajax_sanitize_title', array($this, 'sanitize_title')); add_action('wp_ajax_get_optional_labels', array($this, 'ajax_get_optional_labels')); add_action('wp_ajax_save_optional_labels', array($this, 'ajax_save_optional_labels')); add_action('after_setup_theme', array($this, 'backward_compatibility'), 99); $this->init_options(); }
function __construct($settings) { parent::__construct($settings); $this->extensions_dir = get_template_directory() . '/framework/extensions/'; $this->themes_path = $this->build_themes_path(); $this->themes_url = home_url() . '/wp-content/themes'; $this->default_theme_package_path = get_template_directory() . '/framework/themes/default.zip'; }
function __construct($settings) { parent::__construct($settings); $this->pages_dir = get_stylesheet_directory() . '/data/pages/'; $this->data_dir = get_stylesheet_directory() . '/data/'; add_action('wp_ajax_save_option_page', array($this, 'save_option_page')); add_action('wp_ajax_check_is_options_page_alias_unique', array($this, 'check_is_options_page_alias_unique_ajax')); }
public function __construct($settings) { parent::__construct($settings); add_action('admin_init', array($this, 'cfpf_init')); add_action('add_meta_boxes', array($this, 'cfpf_add_meta_boxes')); add_action('wp_ajax_cfpf_gallery_preview', array($this, 'cfpf_gallery_preview')); add_filter('pre_ping', array($this, 'cfpf_pre_ping_post_links'), 10, 3); add_filter('social_broadcast_format', array($this, 'cfpf_social_broadcast_format'), 10, 2); }
function __construct($settings) { parent::__construct($settings); $this->option_key = $settings['option_key']; $this->reports = get_option($this->option_key); if (empty($this->reports)) { $this->reports = array(); } add_action('init', array($this, 'init')); add_action('admin_notices', array($this, 'site_admin_notice')); }
public function __construct($settings) { parent::__construct($settings); $this->runwaywp_url = 'http://runwaywp.com/sites/main'; // get settings $options = get_option($this->option_key); if ($options) { $this->auth = true; $this->token = $options; } else { $this->auth = false; } add_action('init', array($this, 'remove_old_options')); }
function __construct($settings) { parent::__construct($settings); $this->option_key = $settings['option_key']; $theme = wp_get_theme(); $this->theme_name = sanitize_title($theme->get('Name')); // Backup options $this->backup_option_key = sanitize_title(THEME_NAME) . '_backup_log'; $this->backup_options = get_option($this->backup_option_key); $this->backup_index = 'starterkit_backup'; // Get the backups $this->backupLog = $this->get_backup_log(); // Load actions $this->add_actions(); }
function __construct($settings) { parent::__construct($settings); // global $settings; $this->option_key = $settings['option_key']; $this->core_extensions = get_template_directory() . '/framework/includes/'; $this->data_dir = get_stylesheet_directory() . '/data'; $this->ext_manager_load_file = get_template_directory() . '/framework/includes/extensions-manager/load.php'; $this->extensions_dir = get_template_directory() . '/extensions/'; $this->theme_name = get_stylesheet(); $this->admin_settings = get_option($this->option_key); $this->themes_path = explode('/', get_template_directory()); unset($this->themes_path[count($this->themes_path) - 1]); $this->themes_path = implode('/', $this->themes_path); $this->extensions_List = $this->get_extensions_list($this->extensions_dir); }
public function __construct($settings) { parent::__construct($settings); $this->option_key = $settings['option_key']; $this->sidebars_options = get_option($this->option_key); }