public function __construct(array $meta) { parent::__construct($meta); // reset version to prior to upgrades update_option('bwp_plugin_version', '1.0.0'); $this->build_properties('BWP_Plugin', array(), __FILE__, 'http://betterwp.net', false); }
public function __construct(array $meta, BWP_WP_Bridge $bridge = null, BWP_Cache $cache = null) { parent::__construct($meta, $bridge, $cache); // basic version checking if (!$this->check_required_versions()) { return; } // default options $options = array('enable_cache' => '', 'enable_cache_auto_gen' => 'yes', 'enable_gzip' => '', 'enable_xslt' => '', 'enable_sitemap_date' => '', 'enable_sitemap_taxonomy' => 'yes', 'enable_sitemap_external' => '', 'enable_sitemap_split_post' => 'yes', 'enable_sitemap_author' => '', 'enable_sitemap_site' => 'yes', 'enable_stats' => 'yes', 'enable_credit' => 'yes', 'enable_ping' => 'yes', 'enable_ping_google' => 'yes', 'enable_ping_bing' => 'yes', 'enable_log' => 'yes', 'enable_debug' => '', 'enable_debug_extra' => '', 'enable_robots' => 'yes', 'enable_global_robots' => '', 'enable_gmt' => 'yes', 'enable_exclude_posts_by_terms' => '', 'enable_image_sitemap' => '', 'input_image_post_types' => '', 'enable_news_sitemap' => '', 'enable_news_keywords' => '', 'enable_news_ping' => '', 'enable_news_multicat' => '', 'select_news_lang' => 'en', 'select_news_post_type' => 'post', 'select_news_taxonomy' => 'category', 'select_news_keyword_type' => 'cat', 'select_news_keyword_source' => '', 'select_news_cat_action' => 'inc', 'select_news_cats' => '', 'input_news_name' => '', 'input_news_age' => 2, 'input_news_genres' => array(), 'input_exclude_post_type' => '', 'input_exclude_post_type_ping' => '', 'input_exclude_taxonomy' => 'post_tag', 'input_cache_age' => 1, 'input_item_limit' => 5000, 'input_split_limit_post' => 0, 'input_alt_module_dir' => '', 'input_oldest' => 7, 'input_sql_limit' => 1000, 'input_custom_xslt' => '', 'input_ping_limit' => 100, 'select_output_type' => 'concise', 'select_time_type' => 3600, 'select_oldest_type' => 16400, 'select_default_freq' => 'daily', 'select_default_pri' => 1.0, 'select_min_pri' => 0.1, 'input_cache_dir' => ''); // super admin only options $this->site_options = array('enable_global_robots', 'enable_log', 'enable_debug', 'enable_debug_extra', 'enable_gzip', 'enable_cache', 'enable_cache_auto_gen', 'input_cache_age', 'input_alt_module_dir', 'input_sql_limit', 'input_cache_dir', 'select_time_type'); $this->add_option_key('BWP_GXS_GENERATOR', 'bwp_gxs_generator', $this->bridge->t('XML Sitemaps', $this->domain)); $this->add_option_key('BWP_GXS_EXTENSIONS', 'bwp_gxs_extensions', $this->bridge->t('Extensions', $this->domain)); // @since 1.4.0 backward compat for google news option key if (!defined('BWP_GXS_GOOGLE_NEWS')) { define('BWP_GXS_GOOGLE_NEWS', 'bwp_gxs_google_news'); } $this->add_extra_option_key('BWP_GXS_GENERATOR_ADVANCED', 'bwp_gxs_generator_advanced', $this->bridge->t('Advanced Options', $this->domain)); $this->add_option_key('BWP_GXS_STATS', 'bwp_gxs_stats', $this->bridge->t('Sitemap Log', $this->domain)); if (!defined('BWP_GXS_LOG')) { define('BWP_GXS_LOG', 'bwp_gxs_log'); define('BWP_GXS_PING', 'bwp_gxs_ping_data'); // @since 1.4.0 allow excluding posts/terms via admin page define('BWP_GXS_EXCLUDED_POSTS', 'bwp_gxs_excluded_posts'); define('BWP_GXS_EXCLUDED_TERMS', 'bwp_gxs_excluded_terms'); // @since 1.4.0 allow adding external pages via admin page define('BWP_GXS_EXTERNAL_PAGES', 'bwp_gxs_external_pages'); // @deprecated 1.4.0 use BWP_GXS_GENERATOR instead define('BWP_GXS_OPTION_GENERATOR', 'bwp_gxs_generator'); } $this->build_properties('BWP_GXS', $options, dirname(dirname(__FILE__)) . '/bwp-gxs.php', 'http://betterwp.net/wordpress-plugins/google-xml-sitemaps/', false); }
/** * Constructor */ public function __construct(array $meta, BWP_WP_Bridge $bridge = null) { parent::__construct($meta, $bridge); // basic version checking if (!$this->check_required_versions()) { return; } // default options $options = array('input_api_key' => '', 'input_update_time' => 12, 'select_time_type' => 3600, 'enable_ssl' => '', 'enable_auto_update' => 'yes', 'last_updated' => '', 'last_update_code' => '', 'input_usercode' => ''); $this->add_option_key('BWP_POLLDADDY_OPTION_GENERAL', 'bwp_polldaddy_general', __('Better WordPress Polldaddy Polls Settings', $this->domain)); if (!defined('BWP_POLLDADDY_POLLS')) { define('BWP_POLLDADDY_POLLS', 'bwp_polldaddy_polls'); } $this->build_properties('BWP_POLLDADDY', $options, dirname(dirname(__FILE__)) . '/bwp-polldaddy.php', 'http://betterwp.net/wordpress-plugins/bwp-polldaddy/', false); }