<?php
if ( ! class_exists( 'Redux' ) ) {
return;
}
// This is your option name where all the Redux data is stored.
$opt_name = "unify";
$theme = wp_get_theme(); // For use with some settings. Not necessary.
$args = array(
'opt_name' => 'unify',
'dev_mode' => false,
'use_cdn' => false,
'admin_bar' => false,
'admin_bar_icon' => 'dashicons-portfolio',
'admin_bar_priority' => 50,
'allow_sub_menu'=> true, // 是否在admin上显示主题设置子菜单
'menu_title'=> '主题设置', // 设置左侧栏主题设置菜单名
'page_title'=> '九刺鱼主题设置', // 设置浏览器和admin工具条上的菜单名
'menu_type' => 'menu',
'page_parent_post_type' => 'your_post_type',
'customizer' => TRUE,
'default_show' => TRUE,
'templates_path' => dirname( __FILE__ ) . '/panel_templates/',
'show_options_object' => false,
'forced_dev_mode_off' => true,
'footer_credit' => ' ',
'allow_tracking' => false,
'default_mark' => '*',
'hints' => array(
'icon' => 'el el-address-book-alt',
'icon_position' => 'right',
'icon_color' => 'lightgray',
'icon_size' => 'normal',
'tip_style' => array(
'color' => 'dark',
),
'tip_position' => array(
'my' => 'top left',
'at' => 'bottom right',
),
'tip_effect' => array(
'show' => array(
'duration' => '500',
'event' => 'mouseover',
),
'hide' => array(
'duration' => '500',
'event' => 'mouseleave unfocus',
),
),
),
'output' => TRUE,
'output_tag' => TRUE,
'settings_api' => TRUE,
'cdn_check_time' => '1440',
'compiler' => TRUE,
'page_permissions' => 'manage_options',
'save_defaults' => TRUE,
'show_import_export' => TRUE,
'database' => 'options',
'transient_time' => '3600',
'network_sites' => TRUE,
);
Redux::setArgs( $opt_name, $args );
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$tabs = array(
array(
'id' => 'redux-help-tab-1',
'title' => __( '主题信息 1', 'redux-framework-demo' ),
'content' => __( '<p>这是选项卡内容,HTML是允许的.</p>', 'redux-framework-demo' )
),
array(
'id' => 'redux-help-tab-2',
'title' => __( '主题信息 2', 'redux-framework-demo' ),
'content' => __( '<p>这是选项卡内容,HTML是允许的.</p>', 'redux-framework-demo' )
)
);
Redux::setHelpTab( $opt_name, $tabs );
// Set the help sidebar
$content = __( '<p>这是侧边栏内容,HTML是允许的.</p>', 'redux-framework-demo' );
Redux::setHelpSidebar( $opt_name, $content );
/*
* <--- END HELP TABS
*/
/*
*
* ---> START SECTIONS
*
*/
Redux::setSection( $opt_name, array(
'title' => __( 'Basic Field', 'redux-framework-demo' ),
'id' => 'basic',
'desc' => __( 'Basic field with no subsections.', 'redux-framework-demo' ),
'icon' => 'el el-home',
'fields' => array(
array(
'id' => 'opt-text',
'type' => 'text',
'title' => __( 'Example Text', 'redux-framework-demo' ),
'desc' => __( 'Example description.', 'redux-framework-demo' ),
'subtitle' => __( 'Example subtitle.', 'redux-framework-demo' ),
)
)
) );
Redux::setSection( $opt_name, array(
'title' => __( 'Basic Fields', 'redux-framework-demo' ),
'id' => 'basic',
'desc' => __( 'Basic fields as subsections.', 'redux-framework-demo' ),
'icon' => 'el el-home'
) );
Redux::setSection( $opt_name, array(
'title' => __( 'Text', 'redux-framework-demo' ),
'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/text/" target="_blank">http://docs.reduxframework.com/core/fields/text/</a>',
'id' => 'opt-text-subsection',
'subsection' => true,
'fields' => array(
array(
'id' => 'text-example',
'type' => 'text',
'title' => __( 'Text Field', 'redux-framework-demo' ),
'subtitle' => __( 'Subtitle', 'redux-framework-demo' ),
'desc' => __( 'Field Description', 'redux-framework-demo' ),
'default' => 'Default Text',
),
)
) );
Redux::setSection( $opt_name, array(
'title' => __( 'Text Area', 'redux-framework-demo' ),
'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
'id' => 'opt-textarea-subsection',
'subsection' => true,
'fields' => array(
array(
'id' => 'textarea-example',
'type' => 'textarea',
'title' => __( 'Text Area Field', 'redux-framework-demo' ),
'subtitle' => __( 'Subtitle', 'redux-framework-demo' ),
'desc' => __( 'Field Description', 'redux-framework-demo' ),
'default' => 'Default Text',
),
)
) );
/*
* <--- END SECTIONS
*/
op
最新推荐文章于 2023-05-23 10:12:07 发布