// social buttons $background_dis_acc_col_grad_mode = array("disabled" => _x('Disabled', 'theme-options', 'the7mk2'), "accent" => _x('Accent', 'theme-options', 'the7mk2'), "color" => _x('Custom color', 'theme-options', 'the7mk2'), "gradient" => _x('Custom gradient', 'theme-options', 'the7mk2'), "outline" => _x('Custom color outline', 'theme-options', 'the7mk2')); $background_acc_col_grad_mode = array_diff_key($background_dis_acc_col_grad_mode, array('disabled' => '', 'outline' => '')); $background_dis_line_solid_mode_dependency = array("content_line" => true, "fullwidth_line" => true, "solid" => true); // header layout $header_layout_info_title = _x('Available areas:', 'theme-options', 'the7mk2'); $header_layout_palette_title = _x('Inactive elements', 'theme-options', 'the7mk2'); $header_layout_fields = array('top' => array('title' => _x('Top', 'theme-options', 'the7mk2'), 'class' => 'field-red'), 'bottom' => array('title' => _x('Bottom', 'theme-options', 'the7mk2'), 'class' => 'field-blue'), 'top_bar_left' => array('title' => _x('Top bar (left)', 'theme-options', 'the7mk2'), 'class' => 'field-red'), 'top_bar_right' => array('title' => _x('Top bar (right)', 'theme-options', 'the7mk2'), 'class' => 'field-green'), 'logo_area' => array('title' => _x('Near logo', 'theme-options', 'the7mk2'), 'class' => 'field-purple'), 'nav_area' => array('title' => _x('Near navigation area', 'theme-options', 'the7mk2'), 'class' => 'field-blue')); $header_layout_elements = array('social_icons' => array('title' => _x('Social icons', 'theme-options', 'the7mk2'), 'class' => ''), 'search' => array('title' => _x('Search', 'theme-options', 'the7mk2'), 'class' => ''), 'cart' => array('title' => _x('Cart', 'theme-options', 'the7mk2'), 'class' => ''), 'custom_menu' => array('title' => _x('Custom menu', 'theme-options', 'the7mk2'), 'class' => ''), 'login' => array('title' => _x('Login', 'theme-options', 'the7mk2'), 'class' => ''), 'text_area' => array('title' => _x('Text area', 'theme-options', 'the7mk2'), 'class' => ''), 'skype' => array('title' => _x('Skype', 'theme-options', 'the7mk2'), 'class' => ''), 'email' => array('title' => _x('Mail', 'theme-options', 'the7mk2'), 'class' => ''), 'address' => array('title' => _x('Address', 'theme-options', 'the7mk2'), 'class' => ''), 'phone' => array('title' => _x('Phone', 'theme-options', 'the7mk2'), 'class' => ''), 'working_hours' => array('title' => _x('Working hours', 'theme-options', 'the7mk2'), 'class' => '')); $header_layout_elements = apply_filters('header_layout_elements', $header_layout_elements); $font_sizes = array("big" => _x('large', 'theme-options', 'the7mk2'), "normal" => _x('medium', 'theme-options', 'the7mk2'), "small" => _x('small', 'theme-options', 'the7mk2')); // Divider $divider_html = '<div class="divider"></div>'; $backgrounds_set_1 = dt_get_images_in('images/backgrounds/patterns', 'images/backgrounds', trailingslashit(get_template_directory())); // here we get presets images $presets_images = dt_get_images_in('inc/presets/images', 'inc/presets/images', trailingslashit(get_template_directory())); $id_based_presets_images = array('backgrounds_bottom_bar_bg_image' => array(), 'backgrounds_footer_bg_image' => array(), 'backgrounds_general_bg_image' => array(), 'backgrounds_general_title_bg_image' => array(), 'backgrounds_general_boxed_bg_image' => array(), 'backgrounds_header_bg_image' => array(), 'backgrounds_header_transparent_bg_image' => array(), 'backgrounds_sidebar_bg_image' => array(), 'backgrounds_slideshow_bg_image' => array(), 'backgrounds_background_img' => array(), 'backgrounds_top_bar_bg_image' => array(), 'backgrounds_stripes_stripe_1_bg_image' => array(), 'backgrounds_stripes_stripe_2_bg_image' => array(), 'backgrounds_stripes_stripe_3_bg_image' => array()); // convert all if ($presets_images) { foreach ($presets_images as $full => $thumb) { $img_field_id = explode('.', $full); // ignore if (count($img_field_id) < 3) { continue; } $img_field_id = $img_field_id[1]; $clear_key = 'backgrounds_' . str_replace('-', '_', $img_field_id); if (!isset($id_based_presets_images[$clear_key])) { continue; } $id_based_presets_images[$clear_key][$full] = $thumb;
$soc_ico_arr = array('skype' => array('img' => '\'\'', 'desc' => 'Skype'), 'working_hours' => array('img' => '\'\'', 'desc' => 'Working hours'), 'additional_info' => array('img' => '\'\'', 'desc' => 'Additional info')); // Background Defaults $background_defaults = array('image' => '', 'repeat' => 'repeat', 'position_x' => 'center', 'position_y' => 'center'); // Radio enabled/disabled $en_dis_options = array('1' => _x('Enabled', 'theme-options', LANGUAGE_ZONE), '0' => _x('Disabled', 'theme-options', LANGUAGE_ZONE)); // Radio yes/no $yes_no_options = array('1' => _x('Yes', 'theme-options', LANGUAGE_ZONE), '0' => _x('No', 'theme-options', LANGUAGE_ZONE)); // Radio on/off $on_off_options = array('1' => _x('On', 'theme-options', LANGUAGE_ZONE), '0' => _x('Off', 'theme-options', LANGUAGE_ZONE)); // Radio proportional images/fixed width $prop_fixed_options = array('prop' => _x('Proportional images', 'theme-options', LANGUAGE_ZONE), 'fixed' => _x('Fixed width', 'theme-options', LANGUAGE_ZONE)); // Divider $divider_html = '<div class="divider"></div>'; $backgrounds_set_1 = dt_get_images_in('images/backgrounds/set-1', 'images/backgrounds'); // here we get presets images $presets_images = dt_get_images_in('inc/presets/images', 'inc/presets/images'); $id_based_presets_images = array('backgrounds_bottom_bar_bg_image' => array(), 'backgrounds_footer_bg_image' => array(), 'backgrounds_general_bg_image' => array(), 'backgrounds_general_boxed_bg_image' => array(), 'backgrounds_header_bg_image' => array(), 'backgrounds_header_transparent_bg_image' => array(), 'backgrounds_sidebar_bg_image' => array(), 'backgrounds_slideshow_bg_image' => array(), 'backgrounds_background_img' => array(), 'backgrounds_top_bar_bg_image' => array(), 'backgrounds_stripes_stripe_1_bg_image' => array(), 'backgrounds_stripes_stripe_2_bg_image' => array(), 'backgrounds_stripes_stripe_3_bg_image' => array()); // convert all if ($presets_images) { foreach ($presets_images as $full => $thumb) { $img_field_id = explode('.', $full); // ignore if (count($img_field_id) < 3) { continue; } $img_field_id = $img_field_id[1]; $clear_key = 'backgrounds_' . str_replace('-', '_', $img_field_id); if (!isset($id_based_presets_images[$clear_key])) { continue; } $id_based_presets_images[$clear_key][$full] = $thumb;
$options[] = array("name" => '', "desc" => _x('Vertical position', 'theme-options', LANGUAGE_ZONE), "id" => "bottom_line-bg_vertical_pos", "std" => "center", "type" => "select", "class" => "mini", "options" => $v_arr); // horizontal $options[] = array("name" => '', "desc" => _x('Horizontal position', 'theme-options', LANGUAGE_ZONE), "id" => "bottom_line-bg_horizontal_pos", "std" => "center", "type" => "select", "class" => "mini", "options" => $h_arr); $options[] = array("type" => "block_end"); /* * Boxed Layout */ $options[] = array("name" => _x('Boxed Layout', 'theme-options', LANGUAGE_ZONE), "type" => "heading"); $options[] = array("name" => _x('Enable Boxed Layout', 'theme-options', LANGUAGE_ZONE), "type" => "block_begin"); $options[] = array("name" => '', "desc" => _x('Enable', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-enable", "std" => "1", "type" => "checkbox", 'options' => array('java_hide_global' => true)); $options[] = array("type" => "block_end"); $options[] = array('type' => 'js_hide_begin'); $options[] = array("name" => _x('Background', 'theme-options', LANGUAGE_ZONE), "type" => "block_begin"); $options[] = array("name" => '', "desc" => _x('Color', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-bg_color", "std" => "#EDEDED", "type" => "color"); $options[] = array("name" => '', "desc" => _x('Opacity', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-bg_opacity", "std" => 0, "type" => "slider", "options" => array('min' => 0, 'max' => 100)); $options[] = array("name" => '', "desc" => _x('Choose background image', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-bg_image", "std" => 'none', "type" => "images", "options" => dt_get_images_in('images/backgrounds/boxed', 'images/backgrounds')); $options[] = array("name" => '', "desc" => _x('...or upload your own image', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-bg_upload", "std" => "0", "type" => "checkbox", 'options' => array('java_hide' => true)); $options[] = array('type' => 'js_hide_begin'); $options[] = array("name" => "", "desc" => "", "id" => "boxed_layout-bg_custom", "type" => "upload"); $options[] = array('type' => 'js_hide_end'); $options[] = array("name" => '', "desc" => _x('Shadow color', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-shadow_color", "std" => "#EDEDED", "type" => "color"); $options[] = array("name" => '', "desc" => _x('Shadow opacity', 'theme-options', LANGUAGE_ZONE), "id" => "boxed_layout-shadow_opacity", "std" => 0, "type" => "slider", "options" => array('min' => 0, 'max' => 100)); $options[] = array("type" => "block_end"); $options[] = array('type' => 'js_hide_end'); /* * Color Accent */ $options[] = array("name" => _x('Color accent', 'theme-options', LANGUAGE_ZONE), "type" => "heading"); $options[] = array("name" => _x('Color accent', 'theme-options', LANGUAGE_ZONE), "type" => "block_begin"); $options[] = array("name" => '', "desc" => _x('Accent color', 'theme-options', LANGUAGE_ZONE), "id" => "accent-color", "std" => "#00D0DD", "type" => "color"); $options[] = array("type" => "block_end");
function presscore_opts_get_bg_images($field_id = '') { static $filtered_presets_images = null; if (null === $filtered_presets_images) { $filtered_presets_images = array(); $presets_images = dt_get_images_in('inc/presets/images', 'inc/presets/images', trailingslashit(get_template_directory())); if ($presets_images) { foreach ($presets_images as $full => $thumb) { $img_field_id = explode('.', $full); // ignore if (count($img_field_id) < 3) { continue; } $img_field_id = $img_field_id[1]; $clear_key = sanitize_key(str_replace('-', '_', $img_field_id)); if (!isset($filtered_presets_images[$clear_key])) { $filtered_presets_images[$clear_key] = array(); } $filtered_presets_images[$clear_key][$full] = $thumb; } } } $field_id = sanitize_key(str_replace('-', '_', $field_id)); $bg_images = dt_get_images_in('images/backgrounds/patterns', 'images/backgrounds', trailingslashit(get_template_directory())); if (array_key_exists($field_id, $filtered_presets_images)) { $bg_images = array_merge($filtered_presets_images[$field_id], $bg_images); } return $bg_images; }