/** * put more in general setting tab at general section */ public function _hw_bcn_settings_general($opts) { $inst = HW_Breadcrumb_Setting::getInstance(); $skin_tag_atts = array('class' => 'widefat', 'name' => 'bcn_options[hw_skin]', 'style' => 'width:auto;', 'id' => 'bcn_options_hw_skin'); //enable skin toggle $enable_skin = isset($opts['hw_active_skin']) && $opts['hw_active_skin'] ? true : false; //skin config ->old version /*if(empty($opts['hw_skin_config']) ) { $skin_config_value = $inst->skin->get_config(true); //get skin config } else $skin_config_value = $opts['hw_skin_config'];*/ //skin data $skin_values = isset($opts['hw_skin']) ? $opts['hw_skin'] : array(); $hash_skin = isset($skin_values['hash_skin']) ? $skin_values['hash_skin'] : ''; //allow item trail $allow_trail_link = isset($opts['hw_allow_trail_link']) && $opts['hw_allow_trail_link'] ? true : false; //display reverse $display_reverse = isset($opts['hw_bcn_reverse']) && $opts['hw_bcn_reverse'] ? true : false; /* echo '<table class="form-table">'; //create checkobox field $this->input_check(__('Link Current Item', 'breadcrumb-navxt'), 'bcurrent_item_linked', __('Yes', 'breadcrumb-navxt')); //input text $this->input_text(__('Paged Template', 'breadcrumb-navxt'), 'Hpaged_template', 'large-text', false, __('The template for paged breadcrumbs.', 'breadcrumb-navxt')); //radio $this->input_radio('Spost_post_taxonomy_type', 'category', __('Categories')); $this->input_radio('Spost_post_taxonomy_type', 'date', __('Dates', 'breadcrumb-navxt')); echo '</table>'; */ //get skin setting in which define override bcn options if (!empty($hash_skin) && !empty($this->skin)) { $file = $this->skin->get_skin_file($hash_skin); if (file_exists($file)) { $setting = $this->skin->get_file_skin_setting(); //get theme setting from main skin file or setting file if (!empty($setting)) { include $setting; } else { include $file; } if (isset($theme['bcn_options']) && is_array($theme['bcn_options'])) { $override_bcn_options = base64_encode(serialize($theme['bcn_options'])); } } } ?> <tr> <th scope="row"> <label for="bcn_options_hw_active_skin"><strong><?php _e('Kích hoạt giao diện', 'breadcrumb-navxt'); ?> </strong></label> </th> <td><input type="checkbox" name="bcn_options[hw_active_skin]" id="bcn_options_hw_active_skin" <?php checked($enable_skin); ?> /> <span>Có</span></td> </tr> <tr valign="top"> <th scope="row"> <label for="bcn_options_hw_skin"><strong><?php _e('Giao diện', 'breadcrumb-navxt'); ?> </strong></label> </th> <td> <?php #echo $inst->skin->get_skins_select_tag(null,$hash_skin,$skin_tag_atts,false); ?> <!-- <input type="hidden" name="bcn_options[hw_skin_config]" id="bcn_options_hw_skin_config" value="<?php #echo $skin_config_value ?> "/> --> <?php echo $inst->skin->create_total_skin_selector('bcn_options[hw_skin]', $skin_values, array(), array('show_main_skin' => 1, 'show_config_field' => 1, 'show_condition_field' => 1, 'show_skin_options' => 1)); ?> <?php if (isset($override_bcn_options)) { ?> <input type="hidden" name="bcn_options[hw_override_bcn_options]" value="<?php echo esc_attr($override_bcn_options); ?> "/> <p>Chú ý: tìm thấy trong skin này có thay thế các cài đặt breadcrumb với thể hiện viền mầu đỏ: <code><em><?php echo implode(',', array_keys($theme['bcn_options'])); ?> </em></code><br/> Các giá trị này được sửa đổi bởi skin , tuy nhiên bạn có thể sửa đổi trên giao diện cài đặt này. </p> <script> jQuery(function($){ __hw_breadcrumb.highlight_bcn_options(<?php echo json_encode($theme['bcn_options']); ?> ); }); </script> <?php } ?> </td> </tr> <tr> <td> <label for="bcn_options_hw_enable_item_link"><strong><?php _e('Hiển thị liên kết', 'breadcrumb-navxt'); ?> </strong></label> </td> <td><input type="checkbox" name="bcn_options[hw_allow_trail_link]" id="bcn_options_hw_enable_item_link" <?php checked($allow_trail_link); ?> /> <span>Có (khuyến cáo nên chọn Có)</span></td> </tr> <tr> <td> <label for="bcn_options_hw_bcn_reverse"><strong><?php _e('Hiển thị đảo ngược', 'breadcrumb-navxt'); ?> </strong></label> </td> <td><input type="checkbox" name="bcn_options[hw_bcn_reverse]" id="bcn_options_hw_bcn_reverse" <?php checked($display_reverse); ?> /> <span>Có</span></td> </tr> <?php }
Description: hoangweb breacrumb NavXT Author: Hoangweb.com Version: 1.0 Text Domain: breadcrumb-navxt Domain Path: /languages */ // exit if accessed directly if (!defined('ABSPATH')) { exit; } //define path define('HW_BREADCRUMB_URL', plugins_url('', __FILE__)); define('HW_BREADCRUMB_PATH', plugin_dir_path(__FILE__)); define('HW_BREADCRUMB_PLUGIN_FILE', __FILE__); include_once 'includes/functions.php'; /** * breadcrumb settings */ include_once 'includes/hw_breadcrumb_setting.php'; //admin /** * //design use in frontend */ include_once 'includes/hw_breadcrumb.php'; /** * settings */ include_once 'includes/settings.php'; if (is_admin()) { HW_Breadcrumb_Setting::getInstance(); }