芝麻web文件管理V1.00
编辑当前文件:/home/projzpbv/www/wp-content/themes/cleanora/theme-framework/theme-style/theme-functions.php
$cmsmasters_option['cleanora' . '_default_link'] ); wp_localize_script('cleanora-theme-script', 'cmsmasters_theme_script', $cmsmasters_localize_array); } add_action('wp_enqueue_scripts', 'cleanora_register_theme_js_scripts'); /* Scripts for Admin */ function cleanora_theme_admin_scripts() { $cmsmasters_option = cleanora_get_global_options(); wp_enqueue_script('cmsmasters-theme-settings-toggle', get_template_directory_uri() . '/theme-framework/theme-style' . CMSMASTERS_THEME_STYLE . '/admin/js/theme-settings-toggle.js', array('jquery'), '1.0.0', true); wp_localize_script('cmsmasters-theme-settings-toggle', 'cmsmasters_theme_settings', array( 'shortname' => 'cleanora', 'header_style' => $cmsmasters_option['cleanora' . '_header_styles'] )); } add_action('admin_enqueue_scripts', 'cleanora_theme_admin_scripts'); /* Register Theme Navigations */ register_nav_menus(array( 'primary' => esc_html__('Primary Navigation', 'cleanora'), 'footer' => esc_html__('Footer Navigation', 'cleanora'), 'top_line' => esc_html__('Top Line Navigation', 'cleanora') )); /* Register Showing Home Page on Default WordPress Pages Menu */ function cmsmasters_custom_mega_menu_item_output($args) { $shcd_args = $args['args']; $shcd_attrs = $args['attrs']; $shcd_depth = $args['depth']; $shcd_item = $args['item']; $shcd_cols_count = $args['cols_count']; $item_output = ''; if (!empty($shcd_item->color)) { $shcd_attrs .= ' data-color="color:' . $shcd_item->color . ';"'; } $item_output .= $shcd_args->before . '
'; $item_output .= $shcd_args->link_before; if ( ($shcd_depth <= 1 && empty($shcd_item->hide_text)) || ($shcd_depth == 0 && !empty($shcd_item->hide_text) && !empty($shcd_item->icon)) || ($shcd_depth == 1 && $shcd_cols_count == NULL && !empty($shcd_item->hide_text)) || ($shcd_depth == 1 && $shcd_cols_count != NULL && !empty($shcd_item->hide_text) && !empty($shcd_item->icon)) || ($shcd_depth > 1) ) { $item_output .= '
'; if (empty($shcd_item->hide_text)) { $item_output .= apply_filters('the_title', $shcd_item->title, $shcd_item->ID); } $item_output .= '
'; if (!empty($shcd_item->tag)) { $item_output .= '
' . esc_attr($shcd_item->tag) . '
'; } if ( ($shcd_depth == 0 && !empty($shcd_item->subtitle)) || ($shcd_depth == 1 && $shcd_cols_count != NULL && !empty($shcd_item->subtitle)) ) { $item_output .= '
' . $shcd_item->subtitle . '
'; } } $item_output .= $shcd_args->link_after . '
' . $shcd_args->after; return $item_output; } add_filter('cmsmasters_mega_item_output', 'cmsmasters_custom_mega_menu_item_output'); /* Register wp_nav_menu() Fallback Function */ function cleanora_fallback_menu($args) { $cmsmasters_option = cleanora_get_global_options(); echo '
' . "\n" . '
' . "\n"; wp_list_pages(array( 'title_li' => '', 'link_before' => '
', 'link_after' => '
' )); echo '
' . "\r" . '
' . "\n"; } /* Pagination Prev Text */ function cleanora_pagination_prev_text() { return esc_html__('Previous', 'cleanora'); } add_filter('cleanora_pagination_prev_text_filter', 'cleanora_pagination_prev_text'); /* Pagination Next Text */ function cleanora_pagination_next_text() { return esc_html__('Next', 'cleanora'); } add_filter('cleanora_pagination_next_text_filter', 'cleanora_pagination_next_text'); /* Single Project and Profile Layout */ function cleanora_single_project_layout($cmsmasters_layout) { if ( is_singular('project') || is_singular('profile') ) { $cmsmasters_layout = 'fullwidth'; } return $cmsmasters_layout; } add_filter('cmsmasters_theme_page_layout_filter', 'cleanora_single_project_layout'); /* Search Form */ function cleanora_search_form($form) { $form = "
"; return $form; } add_filter('get_search_form', 'cleanora_search_form');