晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/rainic/public_html/setupTZh/betheme/functions/ |
Upload File : |
<?php
/**
* Menu functions.
*
* @package Betheme
* @author Muffin group
* @link http://muffingroup.com
*/
/**
* Registers a menu location to use with navigation menus.
*/
register_nav_menu( 'main-menu', __( 'Main Menu | depth 5 (Overlay | depth 1)', 'mfn-opts' ) );
register_nav_menu( 'secondary-menu', __( 'Secondary Menu | depth 2 (Split | depth 5)', 'mfn-opts' ) );
register_nav_menu( 'lang-menu', __( 'Languages Menu | depth 1', 'mfn-opts' ) );
register_nav_menu( 'social-menu', __( 'Social Menu Top | depth 1', 'mfn-opts' ) );
register_nav_menu( 'social-menu-bottom', __( 'Social Menu Bottom | depth 1', 'mfn-opts' ) );
register_nav_menu( 'skip-links-menu', __( 'Accessibility Skip Links Menu | depth 1', 'mfn-opts' ) );
/**
* Main Menu
*/
if( ! function_exists( 'mfn_wp_nav_menu' ) )
{
function mfn_wp_nav_menu()
{
$args = array(
'container' => false,
'menu_class' => 'menu menu-main',
'link_before' => '<span>',
'link_after' => '</span>',
'depth' => 5,
'mega_menu' => true,
'fallback_cb' => 'mfn_wp_page_menu',
);
if ( !empty($_GET['visual']) || ( isset($attr['vb']) && $attr['vb'] ) ){
unset($args['mega_menu']);
}
// split menu
if( in_array(mfn_header_style(), array( 'header-split', 'header-shop', 'header-split header-semi', 'header-below header-split' )) ){
mfn_wp_split_menu();
return true;
}
// mega menu | custom walker
$theme_disable = mfn_opts_get( 'theme-disable' );
if( ! isset( $theme_disable[ 'mega-menu' ] ) ){
$args['walker'] = new Walker_Nav_Menu_Mfn;
}
// custom menu
if( mfn_ID() && is_single() && get_post_type() == 'post' && $custom_menu = mfn_opts_get( 'blog-single-menu' ) ){
// theme options | single posts
$args['menu'] = $custom_menu;
} elseif( mfn_ID() && is_single() && get_post_type() == 'portfolio' && $custom_menu = mfn_opts_get( 'portfolio-single-menu' ) ){
// theme options | single portfolio
$args['menu'] = $custom_menu;
} elseif( $custom_menu = get_post_meta( mfn_ID(), 'mfn-post-menu', true ) ){
// page options | page
$args['menu'] = $custom_menu;
} else {
// default
$args['theme_location'] = 'main-menu';
}
echo '<nav id="menu" role="navigation" aria-expanded="false" aria-label="'. __('Main menu', 'betheme') .'">';
// main menu
wp_nav_menu( $args );
// custom mobile menu
mfn_wp_mobile_menu();
echo '</nav>';
}
}
if( ! function_exists( 'mfn_wp_page_menu' ) )
{
function mfn_wp_page_menu()
{
$args = array(
'title_li' => false,
'sort_column' => 'menu_order',
'depth' => 5,
);
echo '<ul class="menu page-menu" role="navigation" aria-expanded="false" aria-label="'. __('Main menu', 'betheme') .'">';
wp_list_pages( $args );
echo '</ul>';
}
}
/**
* Mobile Menu
*/
if( ! function_exists( 'mfn_wp_mobile_menu' ) )
{
function mfn_wp_mobile_menu()
{
if( $menu_ID = mfn_opts_get( 'mobile-menu' ) ){
$args = array(
'container' => false,
'menu_class' => 'menu menu-mobile',
'link_before' => '<span>',
'link_after' => '</span>',
'depth' => 5,
'menu' => intval( $menu_ID ),
);
wp_nav_menu( $args );
}
}
}
/**
* Split Menu
*/
if( ! function_exists( 'mfn_wp_split_menu' ) )
{
function mfn_wp_split_menu()
{
echo '<nav id="menu" role="navigation" aria-expanded="false" aria-label="'. __('Split Main menu', 'betheme') .'">';
// main menu left
$args = array(
'container' => false,
'menu_class' => 'menu menu-main menu_left',
'link_before' => '<span>',
'link_after' => '</span>',
'theme_location' => 'main-menu',
'depth' => 5,
'fallback_cb' => false,
'container_aria_label' => 'Split Menu Left Container',
);
// custom walker for mega menu
$theme_disable = mfn_opts_get( 'theme-disable' );
if( ! isset( $theme_disable[ 'mega-menu' ] ) ){
$args['walker'] = new Walker_Nav_Menu_Mfn;
}
wp_nav_menu( $args );
// main menu right
$args = array(
'container' => false,
'menu_class' => 'menu menu-main menu_right',
'link_before' => '<span>',
'link_after' => '</span>',
'theme_location' => 'secondary-menu',
'depth' => 5,
'fallback_cb' => false,
'container_aria_label' => 'Split Menu Right Container',
);
// custom walker for mega menu
$theme_disable = mfn_opts_get( 'theme-disable' );
if( ! isset( $theme_disable[ 'mega-menu' ] ) ){
$args['walker'] = new Walker_Nav_Menu_Mfn;
}
wp_nav_menu( $args );
// custom mobile menu
mfn_wp_mobile_menu();
echo '</nav>';
}
}
/**
* Overlay menu
*/
if( ! function_exists( 'mfn_wp_overlay_menu' ) )
{
function mfn_wp_overlay_menu()
{
$args = array(
'container' => false,
'menu_class' => 'menu overlay-menu',
'theme_location' => 'main-menu',
'depth' => 1,
'fallback_cb' => false,
);
// custom menu
if( mfn_ID() && is_single() && get_post_type() == 'post' && $custom_menu = mfn_opts_get( 'blog-single-menu' ) ){
// theme options | single posts
$args['menu'] = $custom_menu;
} elseif( mfn_ID() && is_single() && get_post_type() == 'portfolio' && $custom_menu = mfn_opts_get( 'portfolio-single-menu' ) ){
// theme options | single portfolio
$args['menu'] = $custom_menu;
} elseif( $custom_menu = get_post_meta( mfn_ID(), 'mfn-post-menu', true ) ){
// page options | page
$args['menu'] = $custom_menu;
} else {
// default
$args['theme_location'] = 'main-menu';
}
echo '<nav id="overlay-menu" role="navigation" aria-expanded="false" aria-label="'. __('Overlay Main menu', 'betheme') .'">';
// main menu
wp_nav_menu( $args );
// custom mobile menu
mfn_wp_mobile_menu();
echo '</nav>';
}
}
/**
* Secondary menu
*/
if( ! function_exists( 'mfn_wp_secondary_menu' ) )
{
function mfn_wp_secondary_menu()
{
$args = array(
'container' => 'nav',
'container_id' => 'secondary-menu',
'menu_class' => 'secondary-menu',
'theme_location' => 'secondary-menu',
'depth' => 2,
'fallback_cb' => false,
);
// split menu
if( in_array(mfn_header_style(), array( 'header-split', 'header-split header-semi', 'header-below header-split' )) ){
return false;
}
wp_nav_menu( $args );
}
}
/**
* Languages menu
*/
if( ! function_exists( 'mfn_wp_lang_menu' ) )
{
function mfn_wp_lang_menu()
{
$args = array(
'container' => false,
'fallback_cb' => false,
'menu_class' => 'wpml-lang-dropdown',
'theme_location' => 'lang-menu',
'depth' => 1,
);
wp_nav_menu( $args );
}
}
/**
* Social menu
*/
if( ! function_exists( 'mfn_wp_social_menu' ) )
{
function mfn_wp_social_menu()
{
$args = array(
'container' => 'nav',
'container_id' => 'social-menu',
'menu_class' => 'social-menu',
'theme_location' => 'social-menu',
'depth' => 1,
'fallback_cb' => false,
);
wp_nav_menu( $args );
}
}
if( ! function_exists( 'mfn_wp_social_menu_bottom' ) )
{
function mfn_wp_social_menu_bottom()
{
$args = array(
'container' => 'nav',
'container_id' => 'social-menu',
'menu_class' => 'social-menu',
'theme_location' => 'social-menu-bottom',
'depth' => 1,
'fallback_cb' => false,
);
wp_nav_menu( $args );
}
}
/**
* Accessibility
* Skip Links menu
*/
if( ! function_exists( 'mfn_wp_accessibility_skip_links' ) )
{
function mfn_wp_accessibility_skip_links()
{
$args = array(
'theme_location' => 'skip-links-menu',
'depth' => 1,
'fallback_cb' => false,
);
echo '<nav id="skip-links-menu" role="navigation" aria-label="'. __('Skip Links Menu', 'betheme') .'">';
wp_nav_menu( $args );
echo '</nav>';
}
}