__('Common', 'eo_theme'), "icon" => "globe", "type" => "heading"); $options[] = array( "name" => __('Branding Logo', 'eo_theme'), "desc" => "Select an image or type url of image to use for site branding", "id" => "branding_logo", "group" => "branding", "class" => "col-sm-6", "std" => "", "type" => "upload"); $options[] = array( "name" => __('Custom favicon', 'eo_theme'), "desc" => "Select an image or type url of image to use for site favicon (.ico)", "id" => "favicon_url", "group" => "branding", "class" => "col-sm-6", "std" => "", "type" => "upload"); $options[] = array( "name" => __('Default Main Layout', 'eo_theme'), 'id' => 'main_layout', "std" => "right-sidebar", 'type' => 'images', "group" => "layout", "class" => "col-sm-12 col-md-8", "imgclass" => "eo_layoutthumb img-thumbnail col-sm-6 col-md-4 col-lg-3", 'desc' => __( 'Select the default layout.', 'eo_theme' ), 'options' => array( 'full' => $imagepath. '1col.png', 'left-sidebar' =>$imagepath . '2cl.png', 'right-sidebar' => $imagepath . '2cr.png', 'both-sidebar' => $imagepath . '3cr.png' ) ); $options[] = array( "name" => __('Main background color', 'eo_theme'), "desc" => "Main body background color.", "id" => "main_bg_color", "group" => "Background", "class" => 'col-sm-6', "std" => "", "type" => "color"); $options[] = array( "name" => __('Content background color', 'eo_theme'), "desc" => "Content (Container) background color.", "id" => "cont_bg_color", "group" => "Background", "class" => 'col-sm-6', "std" => "", "type" => "color"); $options[] = array( "name" => __('Excerpt background color', 'eo_theme'), "desc" => "Excerpt background color.", "id" => "excerpt_bg_color", "group" => "Background", "class" => 'col-sm-6', "std" => "", "type" => "color"); $options[] = array( "name" => __('Link color', 'eo_theme'), "desc" => "The Link color.", "id" => "link_color", "group" => "Background", "class" => 'col-sm-6', "std" => "", "type" => "color"); /*------------------------- -----------------------------------------*/ $options[] = array( "name" => __('Excerpt', 'eo_theme'), "id" => "loop_ext", "desc" => "Select whether to display excerpt / full content in loops | Doesnt apply to singular display.", "group" => "the loop", "std" => "excerpt", // "prev" => "mult_loop.jpg", "type" => "select", "class" => "col-sm-6 col-md-3", "options" => array('excerpt' => 'Excerpt', 'content' => 'Content') ); $options[] = array( "name" => __('Limit excerpt by', 'eo_theme'), "id" => "exc_limby", "desc" => "Limit the excerpt by words / character.", "group" => "the loop", "std" => "char", // "prev" => "mult_loop.jpg", "type" => "select", "class" => "col-sm-6 col-md-3", "options" => array('char' => 'Characters', 'word' => 'Words') ); $options[] = array( "name" => __('Excerpt Limit#count', 'eo_theme'), "desc" => "Limit by this number of chars / words depending on previous option.", "id" => "exc_lim", "group" => "the loop", "class" => "col-sm-6 col-md-3", // "force_clear" => "visible-md visible-lg", "std" => "180", "type" => "text"); $options[] = array( "name" => __('Author Meta Box', 'eo_theme'), "desc" => "Enable or Disable Author Meta Box.", "id" => "author_meta", "group" => "single", "std" => "1", "type" => "checkbox", "class" => "col-sm-6 col-md-3", ); $options[] = array( "name" => __('Featured IMG size', 'eo_theme'), "desc" => "Select featured image size.", "id" => "feature_img_size", "group" => "the loop", "std" => "thumbnail", "type" => "select", "class" => "col-sm-6 col-md-3", "options" => eo_get_q_thumb_sizes() ); $options[] = array( "name" => __('Featured IMG display', 'eo_theme'), "id" => "featimg_disp", "desc" => "Display featured image block or inline. If you want to set block, please set learge image size in above option (Featured IMG size).", "group" => "the loop", "std" => "inline", "type" => "select", "class" => "col-sm-6 col-md-3", "options" => array('inline' => 'Inline', 'block' => 'Block') ); $options[] = array( "name" => __('Featured IMG Link to', 'eo_theme'), "id" => "featimg_link", "desc" => "Display featured image block or inline.", "group" => "the loop", "std" => "img", // "prev" => "mult_loop.jpg", "type" => "select", "class" => "col-sm-6 col-md-3", "options" => array('img' => 'Image', 'post' => 'Post') ); $options[] = array( "name" => __('Loop Columns', 'eo_theme'), "id" => "loop_size", "desc" => "Select whether to display posts one by one in single column, or two column. Only applies to larger screens.", "group" => "the loop", "std" => "single", "prev" => "mult_loop.jpg", "type" => "select", "class" => "col-sm-6 col-md-3", "options" => array('single' => 'Single', 'col-lg-6' => 'Double') ); /*------------------------------------ ------------------------------------------*/ $options[] = array( "name" => __('Date', 'eo_theme'), "desc" => "Show post time.", "id" => "pmeta_time", "group" => "Post meta", "class" => "col-sm-6 col-md-4 col-lg-3", "std" => "1", "type" => "checkbox"); $options[] = array( "name" => __('Author', 'eo_theme'), "desc" => "Show post author.", "id" => "pmeta_auth", "group" => "Post meta", "class" => "col-sm-6 col-md-4 col-lg-3", "std" => "1", "type" => "checkbox"); /*--------------------------------------------- Custom Code -***************************************************/ $options[] = array( "name" => __('Webmaster Varification Code', 'eo_theme'), "id" => "webmaster_varification", "desc" => "Webmaster Varification Code. Such as code to varify google webmaster tools.", "group" => "Quick Start", "class" => "col-md-6", "std" => "", "type" => "text"); $options[] = array( "name" => __('Custom CSS', 'eo_theme'), "id" => "custom_css", "desc" => "Additional CSS. It will be directly printed inside ", "group" => "Quick Start", "class" => "col-md-6", "std" => "", "type" => "textarea"); $options[] = array( "name" => __('Custom Custom JS', 'eo_theme'), "id" => "custom_footer_js", "desc" => "Custom js before closing </body>It will be directly printed inside <script></script> ", "group" => "Quick Start", "class" => "col-md-6", "std" => "", "type" => "textarea"); /*----------------------------------- Themes -------------------------------*/ $options[] = array( "name" => __('Theme', 'eo_theme'), "type" => "heading", "icon" => "picture"); $options[] = array( "name" => __('Select a theme', 'eo_theme'), "id" => "bsw_theme", "group" => "Bootswatch Themes", "std" => "slate", "class" => eo_opt_dept('use_bsw_themes','1'), "type" => "images", "options" => $theList, "imgclass" => "eo_themethumb img-thumbnail" ); return $options; } function eo_get_q_thumb_sizes(){ global $_wp_additional_image_sizes; $sizes = array(); foreach( get_intermediate_image_sizes() as $s ){ $sizes[ $s ] = array( 0, 0 ); if( in_array( $s, array( 'thumbnail', 'medium', 'large' ) ) ){ $sizes[ $s ][0] = get_option( $s . '_size_w' ); $sizes[ $s ][1] = get_option( $s . '_size_h' ); }else{ if( isset( $_wp_additional_image_sizes ) && isset( $_wp_additional_image_sizes[ $s ] ) ) $sizes[ $s ] = array( $_wp_additional_image_sizes[ $s ]['width'], $_wp_additional_image_sizes[ $s ]['height'], ); } } $thumb_size_arr = array(); foreach( $sizes as $size => $atts ){ $k = $size; $v = $size . ' ' . implode( 'x', $atts ) . "\n"; $thumb_size_arr[$k] = $v; } return $thumb_size_arr; } // quick cat list function eo_get_q_cats() { $category_ids = get_all_category_ids(); $cat_arr = array(); foreach($category_ids as $cat_id) { $cat_name = get_cat_name($cat_id); // echo $cat_id . ': ' . $cat_name; $cat_arr[$cat_id] = $cat_name; } ksort($cat_arr); $st_cat_arr = array(0 => "ALL"); $fin_cat_arr = array_merge($st_cat_arr,$cat_arr); return $fin_cat_arr; } function eo_order_arr() { $order_arr = array("ASC" => "ASC", "DESC" => "DESC" ); return $order_arr; } function eo_order_by_arr() { $order_arr = array( "date" => "Date", "ID" => "ID", "rand" => "Random", "name" => "Name", "title" => "Title", "author" => "Author", "modified" => "Modified", "comment_count" => "Comment Count", ); return $order_arr; }function eo_opt_dept($opt_td,$opt_tb,$col = '',$addc='') { $optionsframework_settings = get_option('optionsframework' ); $opts = get_option( $optionsframework_settings['id'] ); // $dopt = optionsframework_options(); // _eo-todo: build multiple dependencies, for example display page selector only if Jumbo disp. is set to page. $idf = ' dept dp-'.$opt_td.''; $ret_cl = ''; $ret_cl .= $idf; $counter = 0; //if dependant columns is recieved explode true|false if(strpos($opt_tb,"-") !== false) { $opt_tba = explode("-",$opt_tb); } else { $opt_tba = array($opt_tb); } foreach ($opt_tba as $opt_tb) { ($opts[$opt_td]) ? $ret_cl .= " exist" : " non-exist"; if( !empty($col) && ! is_array($col) ) { // var_dump($col); $mlcl = strpos($col, "|"); if ($mlcl !== false) $cola = explode("|",$col); (is_array($cola) ) ? $col = $cola : $col = $col; } if ($opts[$opt_td] == '' && strpos($ret_cl,"empty") === false ) { $ret_cl .= " empty"; if ( !empty($ret_cl) && strpos($ret_cl,"col") === false ) { (is_array($col)) ? $kol = str_replace("col"," kol",$col[0]).' '.$col[1] : $kol = $col; $ret_cl .= $kol; } } else if ( $opt_tb == "|is_ua_code|") { // var_dump("desc: " . $desc); if( !empty($opts[$opt_td]) ) { // skip if already valid $optcl = $opts[$opt_td]["class"]; // var_dump($opts[$opt_td]); $chckua = strpos($optcl, "lvalidl"); if ($chckua === false) { $chckuacd = strpos($opts[$opt_td], "UA"); if ($chckuacd !== false) { $search = array('UA', '-'); $replace = array('', ''); $numonly = str_replace($search, $replace, $opts[$opt_td]); // var_dump($numonly); if(is_numeric($numonly) && strlen($numonly >= 7) ) { $ret_cl .= " lvalidl"; (is_array($col)) ? $kol = str_replace("col"," kol",$col[1]) : $kol = $col; //if( !is_ar$cola = explode("|",$col); } else { $ret_cl .= " linvalidl"; // $desc = $opts[$opt_td]["desc"]; } } else { $ret_cl .= " linvalidl"; } } else { $ret_cl .= "not-eval"; } } } else if ( $opts[$opt_td] == $opt_tb) { // _eo-check: checkboxes with value "0" are not being stored, returning false $ret_cl .= " match "; (is_array($col)) ? $kol = str_replace("col"," kol",$col[1]).' '.$col[0] : $kol = $col; $ret_cl .= $kol; } else if ( $opts[$opt_td] != $opt_tb) { $ret_cl .= " not-met altcl "; (is_array($col)) ? $kol = str_replace("col"," kol",$col[0]).' '.$col[1] : $kol = $col; $ret_cl .= $kol; //return false; } else { $ret_cl .= " unknwn"; } } $ret_classes = preg_replace('!\s+!', ' ', $ret_cl); $occc = substr_count($ret_classes, $idf) ; if ( $occc > 1 ) $ret_classes = preg_replace('/'.$idf.'/', '', $ret_classes, 2); if( get_option('eo_gen_opt_cl') ) { $opt_cl_gen = get_option('eo_gen_opt_cl'); } else { $opt_cl_gen = array(); } if( $opts[$opt_td] && get_option('eo_gen_opt_cl') ) { return $ret_classes; } else { // var_dump("No prior val: return to opts as".$ret_classes); return $ret_classes; } //var_dump($opt_td,$opt_tb); }