/** * uninstall breadcrumb navxt admin plugin * * @return bool */ private function uninstall_options() { if (version_compare(phpversion(), '5.3.0', '<')) { return $this->uninstall_legacy(); } //Grab our global breadcrumb_navxt object global $breadcrumb_navxt; //Load dependencies if applicable if (!class_exists('breadcrumb_navxt')) { require_once $this->_get_plugin_path(); } //Initalize $breadcrumb_navxt so we can use it $bcn_breadcrumb_trail = new bcn_breadcrumb_trail(); //Let's make an instance of our object takes care of everything $breadcrumb_navxt = new breadcrumb_navxt($bcn_breadcrumb_trail); //Uninstall return $breadcrumb_navxt->uninstall(); }
function opts_update_prebk(&$opts) { //Add custom post types breadcrumb_navxt::find_posttypes($this->opt); //Add custom taxonomy types breadcrumb_navxt::find_taxonomies($this->opt); //Let others hook into our settings $this->opt = apply_filters($this->unique_prefix . '_settings_init', $this->opt); }
/** * Sets up the extended options for any CPTs, taxonomies or extensions * * @param array $opt The options array, passed by reference */ public static function setup_options(&$opt) { //Add custom post types breadcrumb_navxt::find_posttypes($opt); //Add custom taxonomy types breadcrumb_navxt::find_taxonomies($opt); //Let others hook into our settings $opt = apply_filters('bcn_settings_init', $opt); }
function opts_update_prebk(&$opts) { //Add custom post types breadcrumb_navxt::find_posttypes($this->opt); //Add custom taxonomy types breadcrumb_navxt::find_taxonomies($this->opt); }
function opts_update_prebk(&$opts) { //This may no longer be needed breadcrumb_navxt::setup_options($opts); $opts = apply_filters('bcn_opts_update_prebk', $opts); }
/** * uninstall breadcrumb navxt admin plugin * * @return bool */ private function _uninstallAdmin() { //Grab our global breadcrumb_navxt object global $breadcrumb_navxt; //Load dependencies if applicable if (!class_exists('breadcrumb_navxt')) { require_once $this->_getPluginPath(); } //Initalize $breadcrumb_navxt so we can use it $bcn_breadcrumb_trail = new bcn_breadcrumb_trail(); //Let's make an instance of our object takes care of everything $breadcrumb_navxt = new breadcrumb_navxt($bcn_breadcrumb_trail); //Uninstall $breadcrumb_navxt->uninstall(); }
function opts_update_prebk(&$opts) { //Add any new custom post types, or taxonomies breadcrumb_navxt::setup_options($opts); $opts = apply_filters('bcn_opts_update_prebk', $opts); }
/** * output breadcrumb navxt */ public function display() { //get bcn settings $setting = $this->get_settings(); $display = 'normal'; $linked = isset($setting['hw_allow_trail_link']) && $setting['hw_allow_trail_link'] ? true : false; $reverse = isset($setting['hw_bcn_reverse']) && $setting['hw_bcn_reverse'] ? true : false; if (isset($setting['hw_active_skin']) && $setting['hw_active_skin'] && class_exists('HW_SKIN') && isset($setting['hw_skin']) && isset($setting['hw_skin']['hwskin_config'])) { #$skin = HW_SKIN::resume_skin($setting['hw_skin']['hwskin_config']); $skin = HW_SKIN::resume_hwskin_instance($setting['hw_skin']); if (!empty($skin)) { $file = $skin->instance->get_skin_file($setting['hw_skin']['hash_skin']); $content = $skin->instance->render_skin_template(0, false); if ($content !== false) { echo $content; } //if(file_exists($file)) { //get theme setting from setting file or skin file $setting = $skin->instance->get_file_skin_setting(); if (file_exists($setting)) { include $setting; } else { include $file; } if (isset($theme['display']) && $theme['display'] == 'list') { $display = 'list'; } //how to output breadcrumb $opt = array('hseparator' => '>>'); breadcrumb_navxt::setup_options($opt); //valid setting if (empty($theme['styles'])) { $theme['styles'] = array(); } if (empty($theme['scripts'])) { $theme['scripts'] = array(); } if (!empty($theme['filters'])) { //do filters & actions that defined in skin $skin->instance->do_filters($theme['filters'], $theme); } /*if(count($theme['styles']) || count($theme['scripts'])) { //enqueue stuff from theme $skin->enqueue_files_from_skin($theme['styles'], $theme['scripts']); }*/ //enqueue stuff from skin using new way HW_SKIN::enqueue_skin_assets(array_merge(array('skin_file' => $file, 'theme_settings' => $theme), (array) $skin)); //} } } //how to ouput breadcrumb function if ($display == 'list') { $output = bcn_display_list(true, $linked, $reverse); } else { $output = bcn_display(true, $linked, $reverse); } echo '<div class="hw-breadcrumb">'; echo apply_filters('hw_breadcrumb_output', $output, $this); echo '</div>'; }