theme = wp_get_theme(); $this->sections = $this->buildSections( array('general', 'preloader', 'sitelogo', 'appearance', 'header', 'footer', 'blog', 'pages', '404') ); $this->args = $this->setArgs(); if( !isset($this->args['opt_name']) ) return; $this->ReduxFramework = new ReduxFramework($this->sections, $this->args); } /** * Sets an option value programmatically. * * @param string $name - the option name * @param mixed $value - value of the option * @access public * @return void */ public function setOption($name, $value) { $this->setted_settings[$name] = $value; } /** * Returns the ReduxFramework instance. * * @access public * @return ReduxFramework */ public function getReduxInstance() { return $this->ReduxFramework; } /** * Packs all sections of the theme options panel to dedicated array. * * @param array $sections * @access protected * @return array */ protected function buildSections( $sections = array() ) { $sections_ready = array(); foreach($sections as $section) { if(method_exists($this, 'section' . ucwords($section))) { $sections_ready = array_merge($sections_ready, call_user_func(array($this, 'section'.ucwords($section)))); } } return $sections_ready; } /** * Describes the 'Preloader' tab of the theme options. * * @access protected * @return array */ protected function sectionPreloader() { return array( array( 'icon' => 'el-icon-dashboard', 'icon_class' => 'icon', 'title' => esc_html__('Preloader', 'apola'), 'fields' => array( array( 'id' => 'page-loader-state', 'type' => 'switch', 'title' => esc_html__( 'State', 'apola' ), 'default' => true, 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), 'desc' => esc_html__('Choose the "Show" option if you want to show preloader while a page is loading.', 'apola') ), array( 'id' => 'page-loader-logo', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Logo', 'apola'), 'required' => array( 'page-loader-state', 'equals', true), 'default' => array( 'url' => APOLA_TEMPLATE_DIRECTORY_URI . '/assets/images/logo-vertical-dark.png' ) ) ) ) ); } /** * Describes the 'Preloader' tab of the theme options. * * @access protected * @return array */ protected function sectionSitelogo() { return array( array( 'icon' => 'el-icon-picture', 'icon_class' => 'icon', 'title' => esc_html__('Site logo', 'apola'), 'fields' => array( array( 'id' => 'apola-logo-vertical-dark', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Vertical (dark)', 'apola'), 'default' => array( 'url' => APOLA_TEMPLATE_DIRECTORY_URI . '/assets/images/logo-vertical-dark.png' ), 'desc' => esc_html__('Will be displayed in vertical light side header.', 'apola') ), array( 'id' => 'apola-logo-vertical-light', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Vertical (light)', 'apola'), 'default' => array( 'url' => APOLA_TEMPLATE_DIRECTORY_URI . '/assets/images/logo-vertical-light.png' ), 'desc' => esc_html__('Will be displayed in vertical dark side header.', 'apola') ), array( 'id' => 'apola-logo-horizontal-dark', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Horizontal (dark)', 'apola'), 'default' => array( 'url' => APOLA_TEMPLATE_DIRECTORY_URI . '/assets/images/logo-vertical-dark.png' ), 'desc' => esc_html__('Will be displayed in horizontal light side header.', 'apola') ), array( 'id' => 'apola-logo-horizontal-light', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Horizontal (light)', 'apola'), 'default' => array( 'url' => APOLA_TEMPLATE_DIRECTORY_URI . '/assets/images/logo-horizontal-light.png' ), 'desc' => esc_html__('Will be displayed in horizontal dark side header.', 'apola') ) ) ), array( 'subsection' => true, 'title' => esc_html__('Favicon', 'apola'), 'fields' => array( array( 'id' => 'apola-favicon', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Favicon', 'apola'), 'desc' => esc_html__('Will be displayed in the site tab.', 'apola') ), array( 'id' => 'apola-favicon-divider', 'type' => 'divider' ), array( 'id' => 'apola-apple-touch-icon-info', 'type' => 'info', 'title' => esc_html__('Apple touch icon will be displayed at the desktop of an apple device in case user add the site to the desktop.', 'apola'), 'notice' => false ), array( 'id' => 'apola-apple-touch-icon', 'type' => 'media', 'url'=> true, 'readonly' => false, 'title' => esc_html__('Apple touch icon', 'apola') ), array( 'id' => 'apola-apple-touch-icon-57x57', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 57, 'height' => 57, 'title' => esc_html__('Apple touch icon (57x57)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-72x72', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 72, 'height' => 72, 'title' => esc_html__('Apple touch icon (72x72)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-76x76', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 76, 'height' => 76, 'title' => esc_html__('Apple touch icon (76x76)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-114x114', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 114, 'height' => 114, 'title' => esc_html__('Apple touch icon (114x114)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-120x120', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 120, 'height' => 120, 'title' => esc_html__('Apple touch icon (120x120)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-144x144', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 144, 'height' => 144, 'title' => esc_html__('Apple touch icon (144x144)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-152x152', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 152, 'height' => 152, 'title' => esc_html__('Apple touch icon (152x152)', 'apola') ), array( 'id' => 'apola-apple-touch-icon-180x180', 'type' => 'media', 'url'=> true, 'readonly' => false, 'width' => 180, 'height' => 180, 'title' => esc_html__('Apple touch icon (180x180)', 'apola') ) ) ) ); } /** * Describes the 'General' tab of the theme options. * * @access protected * @return array */ protected function sectionGeneral() { return array( array( 'icon' => 'el-icon-wrench', 'icon_class' => 'icon', 'title' => esc_html__('General', 'apola'), 'fields' => array( array( 'id' => 'apola-social-links-facebook', 'type' => 'text', 'title' => esc_html__('Facebook profile', 'apola'), 'desc' => esc_html__('Paste the Facebook profile link.', 'apola'), 'default' => '#' ), array( 'id' => 'apola-social-links-twitter', 'type' => 'text', 'title' => esc_html__('Twitter profile', 'apola'), 'desc' => esc_html__('Paste the Twitter profile link.', 'apola'), 'default' => '#' ), array( 'id' => 'apola-social-links-instagram', 'type' => 'text', 'title' => esc_html__('Instagram profile', 'apola'), 'desc' => esc_html__('Paste the Instagram profile link.', 'apola'), 'default' => '#' ), array( 'id' => 'apola-social-links-youtube', 'type' => 'text', 'title' => esc_html__('YouTube chanel', 'apola'), 'desc' => esc_html__('Paste the YouTube chanel link.', 'apola'), 'default' => null ), array( 'id' => 'apola-social-links-flickr', 'type' => 'text', 'title' => esc_html__('Flickr profile', 'apola'), 'desc' => esc_html__('Paste the Flickr profile link.', 'apola'), 'default' => null ) ) ) ); } /** * Describes the 'Apperance' tab of the theme options. * * @access protected * @return array */ protected function sectionAppearance() { return array( array( 'icon' => 'el-icon-broom', 'icon_class' => 'icon', 'title' => esc_html__('Appearance', 'apola') ), array( 'icon_class' => 'icon', 'icon' => 'el-icon-font', 'subsection' => true, 'title' => esc_html__('Typography', 'apola'), 'fields' => array( array( 'id' => 'apola-google-charsets-state', 'type' => 'switch', 'title' => esc_html__('Select Google Font character sets', 'apola'), 'default' => false, 'on' => esc_html__('Yes', 'apola'), 'off' => esc_html__('No', 'apola'), ), array( 'id' => 'apola-google-charsets', 'type' => 'button_set', 'title' => esc_html__('Google Font character sets', 'apola'), 'multi' => true, 'required' => array('apola-google-charsets-state', 'equals', true), 'options'=> array( 'cyrillic' => 'Cyrrilic', 'cyrillic-ext' => 'Cyrrilic Extended', 'greek' => 'Greek', 'greek-ext' => 'Greek Extended', 'khmer' => 'Khmer', 'latin' => 'Latin', 'latin-ext' => 'Latin Extneded', 'vietnamese' => 'Vietnamese' ), 'default' => array('latin','latin-ext') ), array( 'id' => 'body-font', 'type' => 'typography', 'title' => esc_html__('Body font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '300', 'font-family' => 'Poppins', 'font-style' => 'normal', 'font-size' => '16px', 'line-height' => '30px' ) ), array( 'id' => 'firt-accented-font-info', 'type' => 'info', 'title' => esc_html__('Footer widget title, Post title (style 5), Photostream section title, etc.', 'apola'), 'notice' => false ), array( 'id' => 'first-accented-font', 'type' => 'typography', 'title' => esc_html__('First accented font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'font-weight' => false, 'font-size' => false, 'line-height' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-family' => 'Abril Fatface' ) ), array( 'id' => 'second-accented-font-info', 'type' => 'info', 'title' => esc_html__('Blockquotes, Main navigation, Page title, Counter title, Icon box title, Post title, etc.', 'apola'), 'notice' => false ), array( 'id' => 'second-accented-font', 'type' => 'typography', 'title' => esc_html__('Second accented font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'font-weight' => false, 'font-size' => false, 'line-height' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-family' => 'Unna' ) ), array( 'id' => 'h1-font', 'type' => 'typography', 'title' => esc_html__('Heading 1 font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '400', 'font-family' => 'Abril Fatface', 'font-style' => 'normal', 'font-size' => '48px', 'line-height' => '48px' ) ), array( 'id' => 'h2-font', 'type' => 'typography', 'title' => esc_html__('Heading 2 font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '400', 'font-family' => 'Abril Fatface', 'font-style' => 'normal', 'font-size' => '36px', 'line-height' => '36px' ) ), array( 'id' => 'h3-font', 'type' => 'typography', 'title' => esc_html__('Heading 3 font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '400', 'font-family' => 'Abril Fatface', 'font-style' => 'normal', 'font-size' => '30px', 'line-height' => '30px' ) ), array( 'id' => 'h4-font', 'type' => 'typography', 'title' => esc_html__('Heading 4 font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '400', 'font-family' => 'Abril Fatface', 'font-style' => 'normal', 'font-size' => '24px', 'line-height' => '24px' ) ), array( 'id' => 'h5-font', 'type' => 'typography', 'title' => esc_html__('Heading 5 font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '400', 'font-family' => 'Abril Fatface', 'font-style' => 'normal', 'font-size' => '18px', 'line-height' => '18px' ) ), array( 'id' => 'h6-font', 'type' => 'typography', 'title' => esc_html__('Heading 6 font', 'apola'), 'google' => true, 'subsets' => false, 'font-style' => false, 'text-align' => false, 'color' => false, 'default'=> array( 'google' => true, 'font-weight' => '400', 'font-family' => 'Abril Fatface', 'font-style' => 'normal', 'font-size' => '16px', 'line-height' => '16px' ) ) ) ), array( 'icon_class' => 'icon', 'icon' => 'el-icon-brush', 'subsection' => true, 'title' => esc_html__('Skin', 'apola'), 'fields' => array( array( 'id' => 'apola-page-skin', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Select the site skin', 'apola' ), 'options' => array( 'apo-page-light-skin' => esc_html__('Light', 'apola'), 'apo-page-dark-skin' => esc_html__('Dark', 'apola') ), 'default' => 'apo-page-light-skin' ) ) ) ); } /** * Describes the 'Header' tab of the theme options. * * @access protected * @return array */ protected function sectionHeader() { return array( array( 'icon' => 'el-icon-website', 'icon_class' => 'icon', 'title' => esc_html__('Header', 'apola'), 'fields' => array( array( 'id' => 'apola-header-type', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__('Type', 'apola'), 'options' => array( 'apola-header-side' => esc_html__('Vertical', 'apola'), 'apola-header-top' => esc_html__('Horizontal', 'apola') ), 'default' => 'apola-header-side' ), array( 'id' => 'apola-header-side-position', 'type' => 'button_set', 'multi' => false, 'required' => array('apola-header-type', 'equals', 'apola-header-side'), 'title' => esc_html__('Position', 'apola'), 'options' => array( 'apo-header-vertical-left' => esc_html__('Left', 'apola'), 'apo-header-vertical-right' => esc_html__('Right', 'apola') ), 'default' => 'apo-header-vertical-left' ), array( 'id' => 'apola-header-side-color-scheme', 'type' => 'button_set', 'multi' => false, 'required' => array('apola-header-type', 'equals', 'apola-header-side'), 'title' => esc_html__('Color scheme', 'apola'), 'options' => array( 'apo-header-light' => esc_html__('Light', 'apola'), 'apo-header-dark' => esc_html__('Dark', 'apola') ), 'default' => 'apo-header-light' ), array( 'id' => 'apola-header-side-show-logo', 'type' => 'switch', 'required' => array('apola-header-type', 'equals', 'apola-header-side'), 'title' => esc_html__('Show logo', 'apola'), 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), 'default' => true ), array( 'id' => 'apola-header-side-show-social-icons', 'type' => 'switch', 'required' => array('apola-header-type', 'equals', 'apola-header-side'), 'title' => esc_html__('Show social icons', 'apola'), 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), 'default' => true ), array( 'id' => 'apola-header-side-show-site-title', 'type' => 'switch', 'required' => array('apola-header-type', 'equals', 'apola-header-side'), 'title' => esc_html__('Show site title', 'apola'), 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), 'default' => true ), array( 'id' => 'apola-header-side-show-search', 'type' => 'switch', 'required' => array('apola-header-type', 'equals', 'apola-header-side'), 'title' => esc_html__('Show search', 'apola'), 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), 'default' => true ), array( 'id' => 'apola-header-top-color-scheme', 'type' => 'button_set', 'multi' => false, 'required' => array('apola-header-type', 'equals', 'apola-header-top'), 'title' => esc_html__('Color scheme', 'apola'), 'options' => array( 'apo-header-light' => esc_html__('Light', 'apola'), 'apo-header-dark' => esc_html__('Dark', 'apola'), 'apo-header-transparent-light' => esc_html__('Transparent (light)', 'apola'), 'apo-header-transparent-dark' => esc_html__('Transparent (dark)', 'apola') ), 'default' => 'apo-header-light' ), array( 'id' => 'apola-header-top-sticky', 'type' => 'switch', 'required' => array('apola-header-type', 'equals', 'apola-header-top'), 'title' => esc_html__('Sticky', 'apola'), 'on' => esc_html__('On', 'apola'), 'off' => esc_html__('Off', 'apola'), 'default' => false ), array( 'id' => 'apola-header-top-left-column-elements', 'type' => 'select', 'multi' => true, 'required' => array('apola-header-type', 'equals', 'apola-header-top'), 'title' => esc_html__("Left column's elements", 'apola'), 'options' => array( 'apola-logo' => esc_html__('Logo', 'apola'), 'apola-nav-button' => esc_html__('Navigation button', 'apola'), 'apola-navigation' => esc_html__('Primary navigation', 'apola'), 'apola-search-form' => esc_html__('Search form', 'apola'), 'apola-social-links' => esc_html__('Social icons', 'apola') ), 'default' => array('apola-logo') ), array( 'id' => 'apola-header-top-middle-column-elements', 'type' => 'select', 'multi' => true, 'required' => array('apola-header-type', 'equals', 'apola-header-top'), 'title' => esc_html__("Middle column's elements", 'apola'), 'options' => array( 'apola-logo' => esc_html__('Logo', 'apola'), 'apola-nav-button' => esc_html__('Navigation button', 'apola'), 'apola-navigation' => esc_html__('Primary navigation', 'apola'), 'apola-search-form' => esc_html__('Search form', 'apola'), 'apola-social-links' => esc_html__('Social icons', 'apola') ), 'default' => array('apola-navigation') ), array( 'id' => 'apola-header-top-right-column-elements', 'type' => 'select', 'multi' => true, 'required' => array('apola-header-type', 'equals', 'apola-header-top'), 'title' => esc_html__("Right column's elements", 'apola'), 'options' => array( 'apola-logo' => esc_html__('Logo', 'apola'), 'apola-navigation' => esc_html__('Primary navigation', 'apola'), 'apola-search-form' => esc_html__('Search form', 'apola'), 'apola-nav-button' => esc_html__('Navigation button', 'apola'), 'apola-social-links' => esc_html__('Social icons', 'apola') ), 'default' => array('apola-search-form', 'apola-nav-button') ) ) ) ); } /** * Describes the 'Footer' tab of the theme options. * * @access protected * @return array */ protected function sectionFooter() { return array( array( 'icon' => 'el-icon-th-large', 'icon_class' => 'icon', 'title' => esc_html__('Footer', 'apola'), 'fields' => array( array( 'id' => 'apola-footer-style', 'type' => 'button_set', 'title' => esc_html__( 'Style', 'apola' ), 'multi' => false, 'options' => array( 'apola-footer-widget-area' => esc_html__('Widgets area', 'apola'), 'apola-footer-simple' => esc_html__('Simple', 'apola'), 'apola-none' => esc_html__('None', 'apola') ), 'default' => 'apola-footer-widget-area' ), array( 'id' => 'apola-footer-widget-area', 'type' => 'select', 'title' => esc_html__('Select the widgets area', 'apola'), 'required' => array( 'apola-footer-style','equals', array('apola-footer-widget-area') ), 'data' => 'sidebars', 'default' => 'footer-widget-area' ), array( 'id' => 'apola-footer-widget-area-columns', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__('Widgets area columns', 'apola'), 'required' => array( 'apola-footer-style','equals', array('apola-footer-widget-area') ), 'options' => array( 'apo-cols-2' => esc_html__('2 Columns', 'apola'), 'apo-cols-3' => esc_html__('3 Columns', 'apola'), 'apo-cols-4' => esc_html__('4 Columns', 'apola') ), 'default' => 'apo-cols-4' ), array( 'id' => 'apola-footer-copyright-text', 'type' => 'text', 'title' => esc_html__('Copyright text', 'apola'), 'required' => array( 'apola-footer-style','equals', array('apola-footer-simple') ), 'default' => sprintf(esc_html__('Copyright %s %s Apola.', 'apola'), '©', date('Y')) ), array( 'id' => 'apola-footer-show-social-icons', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__('Show social icons', 'apola'), 'required' => array( 'apola-footer-style','equals', array('apola-footer-simple') ), 'options' => array( 'apola-show' => esc_html__('Show', 'apola'), 'apola-hide' => esc_html__('Hide', 'apola') ), 'default' => 'apola-show' ), array( 'id' => 'apola-footer-skin', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__('Skin', 'apola'), 'options' => array( 'apo-footer-dark-skin' => esc_html__('Dark', 'apola'), 'apo-footer-light-skin' => esc_html__('Light', 'apola') ), 'default' => 'apo-footer-dark-skin' ), array( 'id' => 'apola-footer-background', 'type' => 'background', 'title' => esc_html__('Background image', 'apola'), 'background-clip' => false, 'background-origin' => false, 'background-color' => false, 'required' => array( 'apola-footer-style','equals', array('apola-footer-widget-area', 'apola-footer-simple') ), 'default' => array( 'background-repeat' => 'no-repeat', 'background-attachment' => 'scroll', 'background-position' => 'center center', 'background-image' => APOLA_TEMPLATE_DIRECTORY_URI . '/assets/images/footer_bg.png', 'background-size' => 'cover' ) ), array( 'id' => 'apola-footer-widget-area-widgets-geometry-info', 'type' => 'info', 'title' => esc_html__('Please note that the values set in this field are available only on devices which have screen width greater than 1200px.', 'apola'), 'notice' => false ), array( 'id' => 'apola-footer-widget-area-widgets-geometry', 'type' => 'widgets_geometry', 'title' => esc_html__('Widgets geometry', 'apola'), 'required' => array( 'apola-footer-style','equals', array('apola-footer-widget-area') ), 'description' => esc_html__('Each cell in this table corresponds to each widget in the footer on the page.', 'apola'), 'options' => array( 'redux-widgets-geometry-columns-4-row-0' => array( 'column-0' => array( 'width' => 25, 'padding-top' => '0px', 'padding-bottom' => '0px' ), 'column-1' => array( 'width' => 25, 'padding-top' => '0px', 'padding-bottom' => '0px' ), 'column-2' => array( 'width' => 25, 'padding-top' => '0px', 'padding-bottom' => '0px' ), 'column-3' => array( 'width' => 25, 'padding-top' => '0px', 'padding-bottom' => '0px' ) ) ) ) ) ) ); } /** * Describes the 'Blog' tab of the theme options. * * @access protected * @return array */ protected function sectionBlog() { return array( array( 'icon' => 'el-icon-pencil', 'icon_class' => 'icon', 'title' => esc_html__('Blog', 'apola') ), array( 'icon_class' => 'icon', 'icon' => 'el-icon-th', 'subsection' => true, 'title' => esc_html__('Post Archive', 'apola'), 'fields' => array( array( 'id' => 'blog-default-style', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Default display style', 'apola' ), 'options' => array( 'apo-style-3' => esc_html__('V1', 'apola'), 'apo-style-1' => esc_html__('V2', 'apola'), 'apo-style-2' => esc_html__('V3', 'apola'), 'apo-style-4' => esc_html__('V4', 'apola'), 'apo-style-5' => esc_html__('V5', 'apola') ), 'default' => 'apo-style-3' ), array( 'id' => 'blog-isotope-layout-type', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Container layout', 'apola' ), 'options' => array( 'grid' => esc_html__('Grid', 'apola'), 'masonry' => esc_html__('Masonry', 'apola') ), 'default' => 'grid' ), array( 'id' => 'blog-default-columns-info', 'type' => 'info', 'title' => esc_html__('Pay attention the theme could set columns automatically in case where selected value cannot be set in selected layout.', 'apola'), 'notice' => false ), array( 'id' => 'blog-default-columns', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Columns', 'apola' ), 'options' => array( 'apo-cols-1' => esc_html__('1 Column', 'apola'), 'apo-cols-2' => esc_html__('2 Columns', 'apola'), 'apo-cols-3' => esc_html__('3 Columns', 'apola'), 'apo-cols-4' => esc_html__('4 Columns', 'apola') ), 'default' => 'apo-cols-1' ), array( 'id' => 'post-archive-layout', 'type' => 'image_select', 'title' => esc_html__('Page layout', 'apola'), 'options' => array( 'apo-left-sidebar' => array( 'alt' => esc_html__('Left Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-left.jpg' ), 'apo-no-sidebar' => array( 'alt' => esc_html__('Without Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-full.jpg' ), 'apo-right-sidebar' => array( 'alt' => esc_html__('Right Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-right.jpg' ), 'apo-full-width' => array( 'alt' => esc_html__('Full Width', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/page-layout-fullwidth.png' ) ), 'default' => 'apo-no-sidebar' ), array( 'id' => 'post-archive-sidebar', 'type' => 'select', 'title' => esc_html__('Select sidebar', 'apola'), 'required' => array( 'post-archive-layout','equals', array('apo-left-sidebar', 'apo-right-sidebar') ), 'data' => 'sidebars', 'default' => 'general-widget-area' ), array( 'id' => 'post-archive-vertical-padding', 'type' => 'spacing', 'left' => false, 'right' => false, 'mode' => 'padding', 'units' => '', 'units_extended' => 'false', 'title' => esc_html__( 'Page vertical padding', 'apola' ), 'default' => array( 'padding-top' => 85, 'padding-bottom' => 85, 'units' => '' ) ), array( 'id' => 'post-archive-isotope-slide-effect', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Slide effect of items appearance', 'apola' ), 'required' => array( 'blog-default-style', 'equals', array('apo-style-1', 'apo-style-2', 'apo-style-3') ), 'options' => array( '1' => esc_html__('Enable', 'apola'), '0' => esc_html__('Disbale', 'apola') ), 'default' => '1' ), ) ), array( 'icon_class' => 'icon', 'icon' => 'el-icon-file-edit', 'subsection' => true, 'title' => esc_html__('Single Post', 'apola'), 'fields' => array( array( 'id' => 'post-single-layout', 'type' => 'image_select', 'title' => esc_html__('Page layout', 'apola'), 'options' => array( 'apo-left-sidebar' => array( 'alt' => esc_html__('Left Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-left.jpg' ), 'apo-no-sidebar' => array( 'alt' => esc_html__('Without Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-full.jpg' ), 'apo-right-sidebar' => array( 'alt' => esc_html__('Right Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-right.jpg' ) ), 'default' => 'apo-right-sidebar' ), array( 'id' => 'post-single-sidebar', 'type' => 'select', 'title' => esc_html__('Select sidebar', 'apola'), 'required' => array( 'post-single-layout','equals', array('apo-left-sidebar', 'apo-right-sidebar') ), 'data' => 'sidebars', 'default' => 'general-widget-area' ), array( 'id' => 'post-single-show-tags', 'type' => 'switch', 'title' => esc_html__( 'Tags', 'apola' ), 'default' => true, 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), ), array( 'id' => 'post-single-show-social-links', 'type' => 'switch', 'title' => esc_html__( 'Share buttons', 'apola' ), 'default' => false, 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), ), array( 'id' => 'post-single-show-comments', 'type' => 'switch', 'title' => esc_html__( 'Comments', 'apola' ), 'default' => true, 'on' => esc_html__('Show', 'apola'), 'off' => esc_html__('Hide', 'apola'), ) ) ) ); } /** * Describes the 'Pages' tab of the theme options. * * @access protected * @return array */ protected function sectionPages() { return array( array( 'icon' => 'el-icon-file', 'icon_class' => 'icon', 'title' => esc_html__('Pages', 'apola'), 'fields' => array( array( 'id' => 'apola-page-title', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Page title style', 'apola' ), 'options' => array( 'apo-style-1' => esc_html__('Style 1', 'apola'), 'apo-style-2' => esc_html__('Style 2', 'apola'), 'apo-hidden' => esc_html__('None', 'apola') ), 'default' => 'apo-style-1' ), array( 'id' => 'apola-page-title-position', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Page title position', 'apola' ), 'required' => array( 'apola-page-title', 'equals', array('apo-style-1', 'apo-style-2') ), 'options' => array( 'apo-align-left' => esc_html__('Left', 'apola'), 'apo-auto-align' => esc_html__('Center', 'apola'), 'apo-align-right' => esc_html__('Right', 'apola') ), 'default' => 'apo-auto-align' ), array( 'id' => 'apola-page-breadcrumbs', 'type' => 'button_set', 'multi' => false, 'title' => esc_html__( 'Breadcrumbs', 'apola' ), 'required' => array( 'apola-page-title', 'equals', array('apo-style-1', 'apo-style-2') ), 'options' => array( 'apola-page-breadcrumbs-show' => esc_html__('Show', 'apola'), 'apola-page-breadcrumbs-hide' => esc_html__('Hide', 'apola') ), 'default' => 'apola-page-breadcrumbs-show' ), array( 'id' => 'apola-page-vertical-padding', 'type' => 'spacing', 'left' => false, 'right' => false, 'mode' => 'padding', 'units' => '', 'units_extended' => 'false', 'title' => esc_html__( 'Page vertical padding', 'apola' ), 'default' => array( 'padding-top' => 85, 'padding-bottom' => 85, 'units' => '' ) ), array( 'id' => 'apola-page-layout', 'type' => 'image_select', 'title' => esc_html__('Page layout', 'apola'), 'options' => array( 'apo-left-sidebar' => array( 'alt' => esc_html__('Left Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-left.jpg' ), 'apo-no-sidebar' => array( 'alt' => esc_html__('Without Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-full.jpg' ), 'apo-right-sidebar' => array( 'alt' => esc_html__('Right Sidebar', 'apola'), 'img' => APOLA_TEMPLATE_DIRECTORY_URI . '/admin/assets/images/layout-right.jpg' ) ), 'default' => 'apo-no-sidebar' ), array( 'id' => 'apola-page-sidebar', 'type' => 'select', 'title' => esc_html__('Select sidebar', 'apola'), 'required' => array( 'apola-page-layout','equals', array('apo-left-sidebar', 'apo-right-sidebar') ), 'data' => 'sidebars', 'default' => 'general-widget-area' ) ) ) ); } /** * Describes the '404 page' tab of the theme options. * * @access protected * @return array */ protected function section404() { return array( array( 'icon' => 'el-icon-warning-sign', 'icon_class' => 'icon', 'title' => esc_html__('404 page', 'apola'), 'fields' => array( array( 'id' => 'apola-404-error-text', 'type' => 'text', 'title' => esc_html__('Error text', 'apola'), 'default' => esc_html__("We're sorry, but we can't find the page you were looking for.", 'apola') ), array( 'id' => 'apola-404-error-description', 'type' => 'textarea', 'title' => esc_html__('Error description', 'apola'), 'default' => esc_html__("It's probably some thing we've done wrong but now we know about it and we'll try to fix it.", 'apola') ) ) ), array( 'subsection' => true, 'title' => esc_html__('Search results', 'apola'), 'icon' => 'el-icon-search', 'icon_class' => 'icon', 'fields' => array( array( 'id' => 'apola-search-not-found-message', 'type' => 'text', 'title' => esc_html__('"Not found" message', 'apola'), 'default' => esc_html__('Nothing found', 'apola') ), array( 'id' => 'apola-search-not-found-description', 'type' => 'textarea', 'title' => esc_html__('"Not found" description', 'apola'), 'default' => esc_html__('Nothing found on your request.', 'apola') ) ) ) ); } /** * Returns parameters for the ReduxFramework instance. * * @access protected * @return array */ protected function setArgs() { return array( 'opt_name' => 'apola_settings', 'display_name' => $this->theme->get('Name') . ' ' . esc_html__('Theme Options', 'apola'), 'display_version' => esc_html__('Theme Version: ', 'apola') . strtolower($this->theme->get('Version')), 'menu_type' => 'submenu', 'allow_sub_menu' => true, 'menu_title' => esc_html__('Theme Options', 'apola'), 'page_title' => esc_html__('Theme Options', 'apola'), 'footer_credit' => esc_html__('Theme Options', 'apola'), 'google_api_key' => 'AIzaSyBQft4vTUGW75YPU6c0xOMwLKhxCEJDPwg', 'disable_google_fonts_link' => true, 'async_typography' => false, 'admin_bar' => false, 'admin_bar_icon' => 'dashicons-admin-generic', 'admin_bar_priority' => 50, 'global_variable' => 'apola_settings', 'dev_mode' => false, 'customizer' => false, 'compiler' => false, 'page_priority' => null, 'page_parent' => 'themes.php', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'apola_settings', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'show_options_object' => false, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => false, 'output_tag' => false, 'database' => '', 'system_info' => false, 'hints' => array( 'icon' => 'icon-question-sign', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array( 'color' => 'light', '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', ), ), ), 'ajax_save' => false, 'use_cdn' => true, ); } /** * Returns an option value. * * @param string $name - the option name * @param mixed $fallback - fallback value * @param array $data - additional data for getting the option * @access public * @return mixed */ public function getOption($name, $fallback = '', array $data = array()) { global $apola_settings; if(isset($this->setted_settings[$name])) { return $this->setted_settings[$name]; } $current_object_id = get_queried_object_id(); if( function_exists('rwmb_get_value') && isset($data['overriden_by']) && $current_object_id) { if( isset($data['depend_on'])) { if( rwmb_get_value($data['depend_on']['key'], null, $current_object_id) == $data['depend_on']['value'] ) { $overriden_by = rwmb_get_value($data['overriden_by'], null, $current_object_id); if($overriden_by === false && isset($apola_settings[$name])) { return $apola_settings[$name]; } return (is_null($overriden_by) || (is_string($overriden_by) && !strlen($overriden_by)) || ($overriden_by === false)) ? $fallback : $overriden_by; } elseif( isset($apola_settings[$name]) ) { return $apola_settings[$name]; } else { return $fallback; } } else { $overriden_by = rwmb_get_value($data['overriden_by'], null, $current_object_id); return (is_null($overriden_by) || (is_string($overriden_by) && !strlen($overriden_by)) || ($overriden_by === false)) ? $fallback : $overriden_by; } } if( isset($apola_settings[$name]) ) return $apola_settings[$name]; elseif( function_exists('rwmb_get_value') && $current_object_id ) { $current_object_value = rwmb_get_value($name, null, $current_object_id); return (is_null($current_object_value) || (is_string($current_object_value) && !strlen($current_object_value)) || ($current_object_value === false)) ? $fallback : $current_object_value; } return $fallback; } } } ?>