/** * Build base properties */ protected function build_properties($key, array $options, $plugin_file = '', $plugin_url = '', $need_media_filters = true) { $this->plugin_key = strtolower($key); $this->plugin_ckey = strtoupper($key); $this->plugin_url = $plugin_url; // @since rev 151 we add another property called plugin_full_key that // defaults to plugin_key (with underscores replaced with hyphens) but // can be used to construct other urls to plugin $this->plugin_full_key = str_replace('_', '-', $this->plugin_key); // @since rev 146 we allow filtering the default options when the // plugin is init $this->options_default = array_merge($options, $this->bridge->apply_filters($this->plugin_key . '_default_options', array())); $this->need_media_filters = (bool) $need_media_filters; $this->plugin_file = $plugin_file; $this->plugin_folder = basename(dirname($plugin_file)); $this->pre_init_actions(); $this->init_actions(); // Load locale $this->bridge->load_plugin_textdomain($this->domain, false, $this->plugin_folder . '/languages'); }