get_contents( get_template_directory() . '/includes/themeton-redux/info-html.html' ); } $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/'; $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/'; $sample_patterns = array(); if ( is_dir( $sample_patterns_path ) ) { if ( $sample_patterns_dir = opendir( $sample_patterns_path ) ) { $sample_patterns = array(); while ( ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) !== false ) { if ( stristr( $sample_patterns_file, '.png' ) !== false || stristr( $sample_patterns_file, '.jpg' ) !== false ) { $name = explode( '.', $sample_patterns_file ); $name = str_replace( '.' . end( $name ), '', $sample_patterns_file ); $sample_patterns[] = array( 'alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file ); } } } } $theme = wp_get_theme(); $args = array( 'opt_name' => $opt_name, 'display_name' => $theme->get( 'Name' ), 'display_version' => $theme->get( 'Version' ), 'menu_type' => 'menu', 'allow_sub_menu' => true, 'menu_title' => esc_html__( 'Ark Options', 'arktheme' ), 'page_title' => esc_html__( 'Ark Options', 'arktheme' ), 'google_api_key' => '', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => false, 'admin_bar_icon' => 'dashicons-portfolio', 'admin_bar_priority' => 50, 'global_variable' => '', 'dev_mode' => false, 'update_notice' => true, 'customizer' => true, 'class' => 'custom_redux_dashboard', 'page_priority' => null, 'compiler' => TRUE, 'page_parent' => 'themes.php', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'cogs', 'page_slug' => '', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'database' => '', 'use_cdn' => true, // HINTS 'hints' => array( 'icon' => 'el el-question-sign', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array( 'color' => 'red', 'shadow' => true, 'rounded' => false, 'style' => '', ), 'tip_position' => array( 'my' => 'top left', 'at' => 'bottom right', ), 'tip_effect' => array( 'show' => array( 'effect' => 'slide', 'duration' => '500', 'event' => 'mouseover', ), 'hide' => array( 'effect' => 'slide', 'duration' => '500', 'event' => 'click mouseleave', ), ), ) ); $args['share_icons'][] = array( 'url' => 'https://www.facebook.com/themeton/', 'title' => 'Like us on Facebook', 'icon' => 'el el-facebook' ); $args['share_icons'][] = array( 'url' => 'https://twitter.com/themeton', 'title' => 'Follow us on Twitter', 'icon' => 'el el-twitter' ); $args['footer_text'] = esc_html__( '
Themeton 2017
', 'arktheme' ); Redux::setArgs( $opt_name, $args ); $tabs = array( array( 'id' => 'redux-help-tab-1', 'title' => esc_html__( 'Theme Information 1', 'arktheme' ), 'content' => esc_html__( 'This is the tab content, HTML is allowed.
', 'arktheme' ) ), array( 'id' => 'redux-help-tab-2', 'title' => esc_html__( 'Theme Information 2', 'arktheme' ), 'content' => esc_html__( 'This is the tab content, HTML is allowed.
', 'arktheme' ) ) ); Redux::setHelpTab( $opt_name, $tabs ); // Set the help sidebar $content = esc_html__( 'This is the sidebar content, HTML is allowed.
', 'arktheme' ); Redux::setHelpSidebar( $opt_name, $content ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Front Page Layout', 'arktheme' ), 'id' => 'front_layout', 'icon' => 'el el-home', 'fields' => array( array( 'id' => 'front_layout_homepage_layout', 'type' => 'sorter', 'title' => 'Layout Manager', 'subtitle' => 'You can add multiple drop areas or columns.', 'options' => array( 'enabled' => array( 'slider' => 'Slider', 'about' => 'About', 'milestone' => 'Milestone', 'service' => 'Service', 'portfolio' => 'Portfolio', 'team' => 'Team', 'partners' => 'Partners', 'cta' => 'Call To Action', ), 'disabled' => array(), ), ), ) ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'General Settings', 'arktheme' ), 'id' => 'general', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-cogs', 'fields' => array( array( 'id' => 'general-html_background', 'type' => 'background', 'output' => array( 'html' ), 'title' => esc_html__( 'Body Background', 'arktheme' ), 'subtitle' => esc_html__( 'Body background with image, color, etc.', 'arktheme' ), 'default' => array( 'background-color' => '#ffffff', ) ), array( 'id' => 'general-link-color', 'type' => 'link_color', 'output' => array('a'), 'title' => esc_html__( 'Links Color Option', 'arktheme' ), 'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'arktheme' ), 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'arktheme' ), 'default' => array( 'regular' => '#999999', 'hover' => '#8e8e8e', 'active' => '#8e8e8e', 'visited' => '#5b1d92', ) ), array( 'id' => 'general_layout', 'type' => 'image_select', 'title' => esc_html__( 'Page Layout', 'arktheme' ), 'options' => array( '1' => array( 'alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png' ), '2' => array( 'alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png' ), '3' => array( 'alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png' ), ), 'default' => '1' ), array( 'id' => 'general-padding-top', 'type' => 'slider', 'title' => esc_html__( 'Page Padding Top', 'arktheme' ), 'default' => 80, 'min' => 0, 'step' => 1, 'max' => 200, 'display_value' => 'text' ), array( 'id' => 'general-padding-bottom', 'type' => 'slider', 'title' => esc_html__( 'Page Padding Bottom', 'arktheme' ), 'default' => 80, 'min' => 0, 'step' => 1, 'max' => 200, 'display_value' => 'text' ), array( 'id' => 'general_copyright_text', 'type' => 'editor', 'title' => esc_html__( 'Copyright Text', 'arktheme' ), 'subtitle' => esc_html__( 'This will display in footer', 'arktheme' ), 'default' => 'Ark Theme.', ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Colors', 'arktheme' ), 'id' => 'colors', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-brush', 'fields' => array( array( 'id' => 'colors-color-rgba', 'type' => 'color_rgba', 'output' => array('#primary-nav > li ul li a:hover'), 'title' => esc_html__( 'General Color', 'arktheme' ), 'default' => array( 'color' => '#67B26F', 'alpha' => '1' ), 'mode' => 'color', ), array( 'id' => 'colors_bg', 'type' => 'background', 'output' => array( 'section .progress-bar','.btn.button' ), 'title' => esc_html__( 'General Background', 'arktheme' ), // 'background-repeat' => false, // 'background-attachment' => false, // 'background-position' => false, // 'background-size' => false, // 'transparent' => false, 'subtitle' => esc_html__( 'This will affect progress bar and button etc.', 'arktheme' ), 'default' => array( 'background-color' => '#56844b', ) ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Header', 'arktheme' ), 'id' => 'header', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-chevron-up', 'fields' => array( array( 'id' => 'header_background', 'type' => 'background', 'output' => array( '.navbar','.top-nav-collapse' ), 'title' => esc_html__( 'Header Background', 'arktheme' ), 'subtitle' => esc_html__( 'Header background with image, color, etc.', 'arktheme' ), ), array( 'id' => 'header_spacing', 'type' => 'spacing', 'output' => array('.navbar'), 'mode' => 'padding', 'left' => false, 'right' => false, 'units' => array('px'), 'units_extended' => 'false', 'title' => esc_html__('Padding Option', 'arktheme'), 'default' => array( 'padding-top' => '40px', 'padding-bottom' => '40px', ), ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Responsive Menu', 'arktheme' ), 'id' => 'offcanvas', 'subsection' => true, 'fields' => array( array( 'id' => 'offcanvas_bg', 'type' => 'background', 'output' => array( '.uk-offcanvas-bar' ), 'title' => esc_html__( 'Background', 'arktheme' ), 'default' => array( 'background-color' => '#252525', ) ), array( 'id' => 'offcanvas_color', 'type' => 'color_rgba', 'output' => array('#primary-offcanvas li a'), 'title' => esc_html__( 'Color', 'arktheme' ), 'default' => array( 'color' => '#c3c3c3', 'alpha' => '1' ), 'mode' => 'color', ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Typography', 'arktheme' ), 'id' => 'typography', 'icon' => 'el el-font', ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Body Typography', 'arktheme' ), 'id' => 'typography-body', 'subsection' => true, 'customizer_width' => '500px', 'fields' => array( array( 'id' => 'typography-main_font', 'type' => 'typography', 'title' => esc_html__( 'Body Typography', 'arktheme' ), 'output' => array('p'), 'compiler' => true, 'google' => true, 'text-align' => false, 'font-backup' => true, 'line-height' => true, 'letter-spacing'=> true, 'preview' => true, 'all_styles' => true, 'units' => 'px', 'subtitle' => esc_html__( 'This will affect p tags.', 'arktheme' ), 'default' => array( 'color' => '#999999', 'font-style' => '400', 'font-family' => 'Open Sans', 'google' => true, 'font-size' => '14px', 'line-height' => '27px' ), ), array( 'id' => 'typography-section-title_font', 'type' => 'typography', 'title' => esc_html__( 'Section Title Typography', 'arktheme' ), 'output' => array('.section-title'), // An array of CSS selectors 'compiler' => true, 'google' => true, 'text-align' => false, 'font-backup' => true, 'line-height' => true, 'letter-spacing'=> true, 'preview' => true, 'all_styles' => true, 'units' => 'px', 'subtitle' => esc_html__( 'This will affect titles.', 'arktheme' ), 'default' => array( 'color' => '#FFFFFF', 'font-weight' => '700', 'font-family' => 'Montserrat', 'google' => true, 'font-size' => '14px', 'line-height' => '14px', 'letter-spacing' => '0.6px' ), ), array( 'id' => 'typography-title_font', 'type' => 'typography', 'title' => esc_html__( 'Title Typography', 'arktheme' ), 'output' => array('.uk-h2', '#milestone span'), 'google' => true, 'text-align' => false, 'font-backup' => true, 'line-height' => true, 'letter-spacing'=> true, 'preview' => true, 'all_styles' => true, 'units' => 'px', 'subtitle' => esc_html__( 'This will affect titles.', 'arktheme' ), 'default' => array( 'color' => '#000000', 'font-weight' => '300', 'font-family' => 'Open Sans', 'google' => true, 'font-size' => '36px', 'line-height' => '48px' ), ), ) ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Header Typography', 'arktheme' ), 'id' => 'typography-header', 'subsection' => true, 'customizer_width' => '500px', 'fields' => array( array( 'id' => 'typography-header_font', 'type' => 'typography', 'title' => esc_html__( 'Header Typography', 'arktheme' ), 'output' => array('#primary-nav > li > a'), 'google' => true, 'text-align' => false, 'font-backup' => true, 'text-transform' => true, 'line-height' => true, 'letter-spacing'=> true, 'preview' => true, 'all_styles' => true, 'units' => 'px', 'subtitle' => esc_html__( 'This will affect header text.', 'arktheme' ), 'default' => array( 'color' => '#ffffff', 'font-style' => '400', 'font-family' => 'Monsterrat', 'google' => true, 'font-size' => '12px', 'line-height' => '12px', 'text-transform' => 'uppercase', ), ), ) ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Footer Typography', 'arktheme' ), 'id' => 'typography-footer', 'subsection' => true, 'customizer_width' => '500px', 'fields' => array( array( 'id' => 'typography-footer_title_font', 'type' => 'typography', 'title' => esc_html__( 'Footer Title Typography', 'arktheme' ), 'output' => array('.uk-h5'), 'google' => true, 'text-align' => false, 'font-backup' => true, 'text-transform' => true, 'line-height' => true, 'letter-spacing'=> true, 'preview' => true, 'all_styles' => true, 'units' => 'px', 'subtitle' => esc_html__( 'This will affect footer title.', 'arktheme' ), 'default' => array( 'color' => '#ffffff', 'font-style' => '700', 'font-family' => 'Montserrat', 'google' => true, 'font-size' => '12px', 'line-height' => '12px', ), ), array( 'id' => 'typography-footer_body_font', 'type' => 'typography', 'title' => esc_html__( 'Footer Body Typography', 'arktheme' ), 'output' => array('.foot p, a'), // An array of CSS selectors //'compiler' => true, // Use if you want to hook in your own CSS compiler 'google' => true, 'text-align' => false, 'font-backup' => true, 'text-transform' => true, 'line-height' => true, //'word-spacing' => true, 'letter-spacing'=> true, //'color' => false, 'preview' => true, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => esc_html__( 'This will affect footer title.', 'arktheme' ), 'default' => array( 'color' => '#555555', 'font-style' => '400', 'font-family' => 'Open Sans', 'google' => true, 'font-size' => '13px', 'line-height' => '24px', ), ), ) ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Footer', 'arktheme' ), 'id' => 'footer_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-chevron-down', 'fields' => array( array( 'id' => 'footer_background', 'type' => 'background', 'output' => array( '.foot' ), 'title' => esc_html__( 'Footer Background', 'arktheme' ), 'subtitle' => esc_html__( 'Footer background with image, color, etc.', 'arktheme' ), 'default' => array( 'background-color' => '#000000', ) ), array( 'id' => 'header-padding-top', 'type' => 'slider', 'title' => esc_html__( 'Padding Top', 'arktheme' ), 'default' => 40, 'min' => 0, 'step' => 1, 'max' => 300, 'display_value' => 'text' ), array( 'id' => 'header-padding-bottom', 'type' => 'slider', 'title' => esc_html__( 'Padding Bottom', 'arktheme' ), 'default' => 40, 'min' => 0, 'step' => 1, 'max' => 300, 'display_value' => 'text' ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Slider', 'arktheme' ), 'id' => 'slider_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-slideshare', 'fields' => array( array( 'id' => 'slider-slides', 'type' => 'slides', 'title' => esc_html__( 'Slides Options', 'arktheme' ), 'subtitle' => esc_html__( 'Unlimited slides with drag and drop sortings.', 'arktheme' ), 'placeholder' => array( 'title' => esc_html__( 'This is a title', 'arktheme' ), 'description' => esc_html__( 'Description Here', 'arktheme' ), 'url' => esc_html__('Link here', 'arktheme'), ), ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'About Section', 'arktheme' ), 'id' => 'about_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-globe-alt', 'fields' => array( array( 'id' => 'about_opt_text', 'type' => 'text', 'title' => esc_html__('Title', 'arktheme'), 'default' => 'ABOUT' ), array( 'id' => 'about-divide', 'type' => 'divide' ), array( 'id' => 'about_heading-text', 'type' => 'text', 'title' => esc_html__('Heading', 'arktheme'), 'default' => 'Something about us' ), array( 'id' => 'about-editor-tiny', 'type' => 'editor', 'title' => esc_html__( 'Content', 'arktheme' ), 'full_width' => true ), array( 'id' => 'abouts-divide', 'type' => 'divide' ), array( 'id' => 'about_required_progress1', 'type' => 'switch', 'title' => 'Disable Progress #1', 'default' => true ), array( 'id' => 'about_title1', 'type' => 'text', 'title' => esc_html__('Title #1', 'arktheme'), 'required' => array( 'about_required_progress1', '=', true ), 'default' => 'BRANDING' ), array( 'id' => 'about_percent1', 'type' => 'text', 'validate' => 'numeric', 'desc' => esc_html__('Only numbers accepted .', 'arktheme'), 'title' => esc_html__('Percent #1', 'arktheme'), 'required' => array( 'about_required_progress1', '=', true ), 'default' => '93' ), array( 'id' => 'about_required_progress2', 'type' => 'switch', 'title' => 'Disable Progress #2', 'default' => true ), array( 'id' => 'about_title2', 'type' => 'text', 'title' => esc_html__('Title #2', 'arktheme'), 'required' => array( 'about_required_progress2', '=', true ), 'default' => 'DEVELOPMENT' ), array( 'id' => 'about_percent2', 'type' => 'text', 'validate' => 'numeric', 'desc' => esc_html__('Only numbers accepted .', 'arktheme'), 'title' => esc_html__('Percent #2', 'arktheme'), 'required' => array( 'about_required_progress2', '=', true ), 'default' => '84' ), array( 'id' => 'about_required_progress3', 'type' => 'switch', 'title' => 'Disable Progress #3', 'default' => true ), array( 'id' => 'about_title3', 'type' => 'text', 'title' => esc_html__('Title #3', 'arktheme'), 'required' => array( 'about_required_progress3', '=', true ), 'default' => 'MARKETING' ), array( 'id' => 'about_percent3', 'type' => 'text', 'validate' => 'numeric', 'desc' => esc_html__('Only numbers accepted .', 'arktheme'), 'title' => esc_html__('Percent #3', 'arktheme'), 'required' => array( 'about_required_progress3', '=', true ), 'default' => '89' ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Milestone Section', 'arktheme' ), 'id' => 'milestone_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-flag', 'fields' => array( array( 'id' => 'milestone_required_progress1', 'type' => 'switch', 'title' => 'Disable Milestone #1', 'default' => true ), array( 'id' => 'milestone_title1', 'type' => 'text', 'title' => esc_html__('Title #1', 'arktheme'), 'required' => array( 'milestone_required_progress1', '=', true ), 'default' => 'DONE PROJECTS' ), array( 'id' => 'milestone_percent1', 'type' => 'text', 'title' => esc_html__('Number #1', 'arktheme'), 'required' => array( 'milestone_required_progress1', '=', true ), 'default' => '537' ), array( 'id' => 'milestone_required_progress2', 'type' => 'switch', 'title' => 'Disable Milestone #2', 'default' => true ), array( 'id' => 'milestone_title2', 'type' => 'text', 'title' => esc_html__('Title #2', 'arktheme'), 'required' => array( 'milestone_required_progress2', '=', true ), 'default' => 'FILES STORED IN CLOUD' ), array( 'id' => 'milestone_percent2', 'type' => 'text', 'title' => esc_html__('Number #2', 'arktheme'), 'required' => array( 'milestone_required_progress2', '=', true ), 'default' => '248TB' ), array( 'id' => 'milestone_required_progress3', 'type' => 'switch', 'title' => 'Disable Milestone #3', 'default' => true ), array( 'id' => 'milestone_title3', 'type' => 'text', 'title' => esc_html__('Title #3', 'arktheme'), 'required' => array( 'milestone_required_progress3', '=', true ), 'default' => 'PERFORMANCE' ), array( 'id' => 'milestone_percent3', 'type' => 'text', 'title' => esc_html__('Number #3', 'arktheme'), 'required' => array( 'milestone_required_progress3', '=', true ), 'default' => '96%' ), array( 'id' => 'milestone_required_progress4', 'type' => 'switch', 'title' => 'Disable Milestone #4', 'default' => true ), array( 'id' => 'milestone_title4', 'type' => 'text', 'title' => esc_html__('Title #4', 'arktheme'), 'required' => array( 'milestone_required_progress4', '=', true ), 'default' => 'SATISFIED USERS' ), array( 'id' => 'milestone_percent4', 'type' => 'text', 'title' => esc_html__('Number #4', 'arktheme'), 'required' => array( 'milestone_required_progress4', '=', true ), 'default' => '406' ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Service Section', 'arktheme' ), 'id' => 'service_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-cloud', 'fields' => array( array( 'id' => 'service_opt_text', 'type' => 'text', 'title' => esc_html__('Title', 'arktheme'), 'default' => 'SERVICE' ), array( 'id' => 'service-divide', 'type' => 'divide' ), array( 'id' => 'service_background', 'type' => 'background', 'output' => array( '.bg' ), 'title' => esc_html__( 'Service Background', 'arktheme' ), 'subtitle' => esc_html__( 'Background with image, color, etc.', 'arktheme' ), ), array( 'id' => 'service_heading', 'type' => 'text', 'title' => esc_html__('Heading', 'arktheme'), 'default' => 'So what you want to do us within develop' ), array( 'id' => 'service_editor_tiny', 'type' => 'editor', 'title' => esc_html__( 'Content', 'arktheme' ), 'args' => array( 'wpautop' => false, 'media_buttons' => false, 'textarea_rows' => 5, //'tabindex' => 1, //'editor_css' => '', 'teeny' => false, //'tinymce' => array(), 'quicktags' => false, ) ), array( 'id' => 'service_editor_full', 'type' => 'editor', 'title' => esc_html__( 'Content 2', 'arktheme' ), 'full_width' => true ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Portfolio Section', 'arktheme' ), 'id' => 'portfolio_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-idea', 'fields' => array( array( 'id' => 'portfolio_opt_text', 'type' => 'text', 'title' => esc_html__('Title', 'arktheme'), 'default' => 'PORTFOLIO' ), array( 'id' => 'about-divide', 'type' => 'divide' ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Team Section', 'arktheme' ), 'id' => 'team_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-group', 'fields' => array( array( 'id' => 'team_opt_text', 'type' => 'text', 'title' => esc_html__('Title', 'arktheme'), 'default' => 'TEAM' ), array( 'id' => 'team_description', 'type' => 'text', 'title' => esc_html__('Description', 'arktheme'), 'default' => 'CEO FOUNDER' ), array( 'id' => 'team_name', 'type' => 'text', 'title' => esc_html__('Name', 'arktheme'), 'default' => 'Micheal Wesley' ), array( 'id' => 'team_editor_tiny', 'type' => 'editor', 'title' => esc_html__( 'Content', 'arktheme' ), 'full_width' => true ), array( 'id' => 'team_gallery', 'type' => 'gallery', 'title' => esc_html__( 'Add/Edit Gallery', 'arktheme' ), 'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'arktheme' ), ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Partners Section', 'arktheme' ), 'id' => 'partners_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-group-alt', 'fields' => array( array( 'id' => 'partners_opt_text', 'type' => 'text', 'title' => esc_html__('Title', 'arktheme'), 'default' => 'PARTNERS' ), array( 'id' => 'partners_editor_tiny', 'type' => 'editor', 'title' => esc_html__( 'Heading', 'arktheme' ), 'default' => 'Envato said something about us', 'args' => array( 'wpautop' => false, 'media_buttons' => false, 'textarea_rows' => 5, //'tabindex' => 1, //'editor_css' => '', 'teeny' => false, //'tinymce' => array(), 'quicktags' => false, ) ), array( 'id' => 'partners_description', 'type' => 'text', 'title' => esc_html__('Description', 'arktheme'), 'default' => 'Ark is the best theme I have ever seen in my life. I know a lot of themes but I cant choose from them but Ark is the best way. It incredibly fits my needs' ), array( 'id' => 'partners_editor', 'type' => 'editor', 'title' => esc_html__( 'Content', 'arktheme' ), ), ), ) ); Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Call To Action Section', 'arktheme' ), 'id' => 'cta_section', 'desc' => esc_html__( '', 'arktheme' ), 'icon' => 'el el-info-circle', 'fields' => array( array( 'id' => 'cta_opt_text', 'type' => 'text', 'title' => esc_html__('Title', 'arktheme'), 'default' => 'arktheme' ), array( 'id' => 'cta_background', 'type' => 'background', 'output' => array( '.bg-footer' ), 'title' => esc_html__( 'Footer Background', 'arktheme' ), 'subtitle' => esc_html__( 'Footer background with image, color, etc.', 'arktheme' ), ), array( 'id' => 'cta_description', 'type' => 'text', 'title' => esc_html__('Description', 'arktheme'), 'default' => 'is the best design which can look professionally' ), array( 'id' => 'cta_required', 'type' => 'switch', 'title' => 'Disable Button', 'default' => true ), array( 'id' => 'cta_button_text', 'type' => 'text', 'title' => esc_html__('Button Text', 'arktheme'), 'required' => array( 'cta_required', '=', true ), 'default' => 'Learn More' ), array( 'id' => 'cta_button_link', 'type' => 'text', 'title' => esc_html__('Button Link', 'arktheme'), 'required' => array( 'cta_required', '=', true ), 'default' => '#' ), ), ) ); add_action( 'redux/loaded', 'remove_demo' ); add_filter('redux/options/' . $opt_name . '/compiler', 'compiler_action', 10, 3); add_filter('redux/options/' . $opt_name . '/args', 'change_arguments' ); add_filter('redux/options/' . $opt_name . '/defaults', 'change_defaults' ); function compiler_action($options, $css, $changed_values) { global $wp_filesystem; $filename = get_template_directory() . '/includes/themeton-redux/style.css'; if( empty( $wp_filesystem ) ) { require_once( ABSPATH .'/wp-admin/includes/file.php' ); WP_Filesystem(); } if( $wp_filesystem ) { $wp_filesystem->put_contents( $filename, $css, FS_CHMOD_FILE ); } } if ( ! function_exists( 'redux_validate_callback_function' ) ) { function redux_validate_callback_function( $field, $value, $existing_value ) { $error = false; $warning = false; //do your validation if ( $value == 1 ) { $error = true; $value = $existing_value; } elseif ( $value == 2 ) { $warning = true; $value = $existing_value; } $return['value'] = $value; if ( $error == true ) { $field['msg'] = 'your custom error message'; $return['error'] = $field; } if ( $warning == true ) { $field['msg'] = 'your custom warning message'; $return['warning'] = $field; } return $return; } } if ( ! function_exists( 'redux_my_custom_field' ) ) { function redux_my_custom_field( $field, $value ) { print_r( $field ); echo 'This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.
', 'arktheme' ), 'icon' => 'el el-paper-clip', 'fields' => array() ); return $sections; } } if ( ! function_exists( 'change_arguments' ) ) { function change_arguments( $args ) { //$args['dev_mode'] = true; return $args; } } if ( ! function_exists( 'change_defaults' ) ) { function change_defaults( $defaults ) { $defaults['str_replace'] = 'Testing filter hook!'; return $defaults; } } if ( ! function_exists( 'remove_demo' ) ) { function remove_demo() { if ( class_exists( 'ReduxFrameworkPlugin' ) ) { remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::instance(), 'plugin_metalinks' ), null, 2 ); remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) ); } } }