예제 #1
0
 function gdlr_get_layerslider_list()
 {
     if (!function_exists('lsSliders')) {
         return;
     }
     $ret = array();
     $sliders = lsSliders();
     foreach ($sliders as $slider) {
         $ret[$slider['id']] = $slider['name'];
     }
     return $ret;
 }
function rt_layer_slider_list()
{
    $get_layer_slider_list = array();
    if (function_exists("lsSliders")) {
        $sliders = lsSliders(200, false, true);
        if (rt_check_layer_slider()) {
            if (is_array($sliders)) {
                foreach ($sliders as $key => $value) {
                    $get_layer_slider_list[$value["id"]] = $value["name"];
                }
            }
        }
    } else {
        $get_layer_slider_list[0] = "Layer Slider has not been installed or activated!";
    }
    return $get_layer_slider_list;
}
 function render_field($field)
 {
     if ($sliders = lsSliders(200, false, true)) {
         echo '<select id="' . $field['id'] . '" class="' . $field['class'] . '" name="' . $field['name'] . '" >';
         if (!empty($sliders)) {
             $name = empty($item['name']) ? 'Unnamed' : $item['name'];
             foreach ($sliders as $key => $item) {
                 $name = empty($item['name']) ? 'Unnamed' : $item['name'];
                 $id = $item['id'];
                 echo '<option', $field['value'] == $id ? ' selected="selected"' : '', ' value="' . $id . '">' . $name . '</option>';
             }
             echo '</select>';
         } else {
             echo '<p>No Sliders</p>';
         }
     } else {
         echo '<p>oh no, try installing layerslider first, or something much wronger happened</p>';
     }
 }
예제 #4
0
function layerslider_register_settings()
{
    // Global settings
    if (isset($_POST['ls-access-permission']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        // Get capability
        $capability = $_POST['custom_role'] == 'custom' ? $_POST['custom_capability'] : $_POST['custom_role'];
        // Error message
        $error = __('Your account does not have the necessary permission you chose, and your settings have not been saved to prevent locking yourself out of the plugin.', 'LayerSlider');
        $success = __('Permission changes have been saved successfully.', 'LayerSlider');
        // Test value
        if (empty($capability) || !current_user_can($capability)) {
            header('Location: admin.php?page=layerslider&error=1&message=' . urlencode($error));
            die;
        } else {
            update_option('layerslider_custom_capability', $capability);
            header('Location: admin.php?page=layerslider&message=' . urlencode($success));
            die;
        }
    }
    // Add slider
    if (isset($_POST['posted_add']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        if (!isset($_POST['layerslider-slides'])) {
            return;
        }
        // Get WPDB Object
        global $wpdb;
        // Table name
        $table_name = $wpdb->prefix . "layerslider";
        // Create new record
        if ($_POST['layerkey'] == 0) {
            // Execute query
            $wpdb->query($wpdb->prepare("INSERT INTO {$table_name}\n\t\t\t\t\t\t\t\t\t(name, data, date_c, date_m)\n\t\t\t\t\t\t\t\tVALUES (%s, %s, %d, %d)", '', '', time(), time()));
            // Empty slider
            $slider = array();
            // ID
            $id = mysql_insert_id();
        } else {
            // Get slider
            $slider = $wpdb->get_row("SELECT * FROM {$table_name} ORDER BY id DESC LIMIT 1", ARRAY_A);
            // ID
            $id = $slider['id'];
            $slider = json_decode($slider['data'], true);
        }
        // Add modifications
        if (isset($_POST['layerslider-slides']['properties']['relativeurls'])) {
            $slider['properties'] = $_POST['layerslider-slides']['properties'];
            $slider['layers'][$_POST['layerkey']] = layerslider_convert_urls($_POST['layerslider-slides']['layers'][$_POST['layerkey']]);
        } else {
            $slider['properties'] = $_POST['layerslider-slides']['properties'];
            $slider['layers'][$_POST['layerkey']] = $_POST['layerslider-slides']['layers'][$_POST['layerkey']];
        }
        // WPML
        if (function_exists('icl_register_string')) {
            layerslider_register_wpml_strings($id, $slider);
        }
        // DB data
        $name = esc_sql($slider['properties']['title']);
        $data = esc_sql(json_encode($slider));
        // Update
        $wpdb->query("UPDATE {$table_name} SET\n\t\t\t\t\tname = '{$name}',\n\t\t\t\t\tdata = '{$data}',\n\t\t\t\t\tdate_m = '" . time() . "'\n\t\t\t\t  ORDER BY id DESC LIMIT 1");
        // Echo last ID for redirect
        echo $id;
        // Redirect back
        //header('Location: '.$_SERVER['REQUEST_URI'].'');
        die;
    }
    // Edit slider
    if (isset($_POST['posted_edit']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        if (!isset($_POST['layerslider-slides'])) {
            return;
        }
        // Get WPDB Object
        global $wpdb;
        // Table name
        $table_name = $wpdb->prefix . "layerslider";
        // Get the IF of the slider
        $id = (int) $_GET['id'];
        // Get slider
        $slider = $wpdb->get_row("SELECT * FROM {$table_name} WHERE id = " . (int) $id . " ORDER BY date_c DESC LIMIT 1", ARRAY_A);
        $data = json_decode($slider['data'], true);
        // Empty the slider
        if ($_POST['layerkey'] == 0) {
            $data = array();
        }
        // Add modifications
        if (isset($_POST['layerslider-slides']['properties']['relativeurls'])) {
            $data['properties'] = $_POST['layerslider-slides']['properties'];
            $data['layers'][$_POST['layerkey']] = layerslider_convert_urls($_POST['layerslider-slides']['layers'][$_POST['layerkey']]);
        } else {
            $data['properties'] = $_POST['layerslider-slides']['properties'];
            $data['layers'][$_POST['layerkey']] = $_POST['layerslider-slides']['layers'][$_POST['layerkey']];
        }
        // WPML
        if (function_exists('icl_register_string')) {
            layerslider_register_wpml_strings($id, $data);
        }
        // DB data
        $name = esc_sql($data['properties']['title']);
        $data = esc_sql(json_encode($data));
        // Update
        $wpdb->query("UPDATE {$table_name} SET\n\t\t\t\t\tname = '{$name}',\n\t\t\t\t\tdata = '{$data}',\n\t\t\t\t\tdate_m = '" . time() . "'\n\t\t\t\t  WHERE id = '{$id}' LIMIT 1");
        // Redirect back
        //header('Location: '.$_SERVER['REQUEST_URI'].'');
        die;
    }
    // Import settings
    if (isset($_POST['ls-import']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        // Check export file if any
        if (!is_uploaded_file($_FILES['import_file']['tmp_name'])) {
            header('Location: ' . $_SERVER['REQUEST_URI'] . '&error=1&message=' . urlencode('Choose a file to import sliders.'));
            die('No data received.');
        }
        // Get decoded file data
        $data = base64_decode(file_get_contents($_FILES['import_file']['tmp_name']));
        // Parsing JSON or PHP object
        if (!($parsed = json_decode($data, true))) {
            $parsed = unserialize($data);
        }
        // Iterate over imported sliders
        if (is_array($parsed)) {
            //  DB stuff
            global $wpdb;
            $table_name = $wpdb->prefix . "layerslider";
            // Import sliders
            foreach ($parsed as $item) {
                // Fix for export issue in v4.6.4
                if (is_string($item)) {
                    $item = json_decode($item, true);
                }
                // Add to DB
                $wpdb->query($wpdb->prepare("INSERT INTO {$table_name} (name, data, date_c, date_m)\n\t\t\t\t\t\t\t\t\tVALUES (%s, %s, %d, %d)", $item['properties']['title'], json_encode($item), time(), time()));
            }
            // Success
            header('Location: ' . menu_page_url('layerslider', 0) . '&message=' . urlencode('Slider imported successfully.'));
            // Fail
        } else {
            header('Location: ' . menu_page_url('layerslider', 0) . '&error=1&message=' . urlencode('The import file seems to be invalid or corrupted.'));
        }
        die;
    }
    if (isset($_POST['ls-export']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        $data = array();
        // All sliders
        if ($_POST['sliders'] == -1) {
            $sliders = lsSliders(200, false, true);
            foreach ($sliders as $item) {
                $data[] = $item['data'];
            }
            // Specific slider
        } elseif (!empty($_POST['sliders']) && is_numeric($_POST['sliders'])) {
            $sliders = lsSliderById((int) $_POST['sliders']);
            $data[] = $sliders['data'];
        } else {
            die('Invalid data received.');
        }
        // Slider name
        $name = 'LayerSlider Export ' . date('Y-m-d') . ' at ' . date('H.i.s') . '.json';
        // Set the headers to force a download
        header('Content-type: application/force-download');
        header('Content-Disposition: attachment; filename="' . str_replace(' ', '_', $name) . '"');
        // Output
        die(base64_encode(json_encode($data)));
    }
    // Skin Editor
    if (isset($_POST['posted_ls_skin_editor']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        // GET SKIN
        if (isset($_GET['skin']) && !empty($_GET['skin'])) {
            $skin = $_GET['skin'];
        } else {
            // Open folder
            $handle = opendir(dirname(__FILE__) . '/skins');
            // Iterate over the contents
            while (false !== ($entry = readdir($handle))) {
                if ($entry == '.' || $entry == '..' || $entry == 'preview') {
                    continue;
                } else {
                    $skin = $entry;
                    break;
                }
            }
        }
        // Get file path
        $file = dirname(__FILE__) . '/skins/' . $skin . '/skin.css';
        // Get content
        $content = $_POST['contents'];
        // Write to file
        $status = @file_put_contents($file, $content);
        if (!$status) {
            wp_die(__("It looks like your files isn't writable, so PHP couldn't make any changes (CHMOD).", "LayerSlider"), __('Cannot write to file', 'LayerSlider'), array('back_link' => true));
        } else {
            header('Location: admin.php?page=layerslider_skin_editor&skin=' . $skin . '&edited=1');
        }
    }
    // Transition builder
    if (isset($_POST['posted_ls_transition_builder']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        // Array to hold transitions
        $transitions = array();
        // Get transitions
        $transitions['t2d'] = isset($_POST['t2d']) ? $_POST['t2d'] : array();
        $transitions['t3d'] = isset($_POST['t3d']) ? $_POST['t3d'] : array();
        array_walk_recursive($transitions['t2d'], 'layerslider_builder_convert_numbers');
        array_walk_recursive($transitions['t3d'], 'layerslider_builder_convert_numbers');
        // Iterate over the sections
        foreach ($transitions['t3d'] as $key => $val) {
            // Rows
            if (strstr($val['rows'], ',')) {
                $tmp = explode(',', $val['rows']);
                $tmp[0] = (int) trim($tmp[0]);
                $tmp[1] = (int) trim($tmp[1]);
                $transitions['t3d'][$key]['rows'] = $tmp;
            } else {
                $transitions['t3d'][$key]['rows'] = (int) $val['rows'];
            }
            // Cols
            if (strstr($val['cols'], ',')) {
                $tmp = explode(',', $val['cols']);
                $tmp[0] = (int) trim($tmp[0]);
                $tmp[1] = (int) trim($tmp[1]);
                $transitions['t3d'][$key]['cols'] = $tmp;
            } else {
                $transitions['t3d'][$key]['cols'] = (int) $val['cols'];
            }
            // Depth
            if (isset($val['tile']['depth'])) {
                $transitions['t3d'][$key]['tile']['depth'] = 'large';
            }
            // Before
            if (!isset($val['before']['enabled'])) {
                unset($transitions['t3d'][$key]['before']['transition']);
            }
            // After
            if (!isset($val['after']['enabled'])) {
                unset($transitions['t3d'][$key]['after']['transition']);
            }
        }
        // Iterate over the sections
        foreach ($transitions['t2d'] as $key => $val) {
            if (strstr($val['rows'], ',')) {
                $tmp = explode(',', $val['rows']);
                $tmp[0] = (int) trim($tmp[0]);
                $tmp[1] = (int) trim($tmp[1]);
                $transitions['t2d'][$key]['rows'] = $tmp;
            } else {
                $transitions['t2d'][$key]['rows'] = (int) $val['rows'];
            }
            if (strstr($val['cols'], ',')) {
                $tmp = explode(',', $val['cols']);
                $tmp[0] = (int) trim($tmp[0]);
                $tmp[1] = (int) trim($tmp[1]);
                $transitions['t2d'][$key]['cols'] = $tmp;
            } else {
                $transitions['t2d'][$key]['cols'] = (int) $val['cols'];
            }
            if (empty($val['transition']['rotateX'])) {
                unset($transitions['t2d'][$key]['transition']['rotateX']);
            }
            if (empty($val['transition']['rotateY'])) {
                unset($transitions['t2d'][$key]['transition']['rotateY']);
            }
            if (empty($val['transition']['rotate'])) {
                unset($transitions['t2d'][$key]['transition']['rotate']);
            }
            if (empty($val['transition']['scale']) || $val['transition']['scale'] == '1.0' || $val['transition']['scale'] == '1') {
                unset($transitions['t2d'][$key]['transition']['scale']);
            }
        }
        // Custom transitions file
        $upload_dir = wp_upload_dir();
        $custom_trs = $upload_dir['basedir'] . '/layerslider.custom.transitions.js';
        // Build transition file
        $data = 'var layerSliderCustomTransitions = ';
        $data .= json_encode($transitions);
        $data .= ';';
        // Write to file
        file_put_contents($custom_trs, $data);
        die('SUCCESS');
    }
    // Styles Editor
    if (isset($_POST['posted_ls_styles_editor']) && strstr($_SERVER['REQUEST_URI'], 'layerslider')) {
        // Get uploads dir
        $upload_dir = wp_upload_dir();
        $upload_dir = $upload_dir['basedir'];
        // Get css file
        $file = $upload_dir . '/layerslider.custom.css';
        // Get content
        $content = stripslashes($_POST['contents']);
        // Write to file
        $status = @file_put_contents($file, $content);
        if (!$status) {
            wp_die(__("It looks like your files isn't writable, so PHP couldn't make any changes (CHMOD).", "LayerSlider"), __('Cannot write to file', 'LayerSlider'), array('back_link' => true));
        } else {
            header('Location: admin.php?page=layerslider_style_editor&edited=1');
        }
    }
}
예제 #5
0
파일: list.php 프로젝트: sebfabiani/vcv
<?php

// Get WPDB Object
global $wpdb;
// Table name
$table_name = $wpdb->prefix . "layerslider";
// Get sliders
$sliders = lsSliders(200, false, true);
// Custom capability
$custom_capability = get_option('layerslider_custom_capability', 'manage_options');
// Auto-updates
$code = get_option('layerslider-purchase-code', '');
$validity = get_option('layerslider-validated', '0');
?>
<div class="wrap">
	<div class="ls-icon-layers"></div>
	<h2>
		<?php 
_e('LayerSlider sliders', 'LayerSlider');
?>
		<a href="?page=layerslider_add_new" class="add-new-h2"><?php 
_e('Add New', 'LayerSlider');
?>
</a>
		<a href="?page=layerslider&action=import_sample" class="add-new-h2"><?php 
_e('Import sample sliders', 'LayerSlider');
?>
</a>
	</h2>

	<div class="ls-box ls-slider-list">
$load_style_options = array('ajax_pagination' => _x('Pagination & filter with AJAX', 'backend metabox', 'the7mk2'), 'ajax_more' => _x('"Load more" button & filter with AJAX', 'backend metabox', 'the7mk2'), 'lazy_loading' => _x('Lazy loading', 'backend metabox', 'the7mk2'), 'default' => _x('Standard (no AJAX)', 'backend metabox', 'the7mk2'));
$font_size = array('h1' => _x('h1', 'backend metabox', 'the7mk2'), 'h2' => _x('h2', 'backend metabox', 'the7mk2'), 'h3' => _x('h3', 'backend metabox', 'the7mk2'), 'h4' => _x('h4', 'backend metabox', 'the7mk2'), 'h5' => _x('h5', 'backend metabox', 'the7mk2'), 'h6' => _x('h6', 'backend metabox', 'the7mk2'), 'small' => _x('small', 'backend metabox', 'the7mk2'), 'normal' => _x('medium', 'backend metabox', 'the7mk2'), 'big' => _x('large', 'backend metabox', 'the7mk2'));
$accent_custom_color = array('accent' => _x('Accent', 'backend metabox', 'the7mk2'), 'color' => _x('Custom color', 'backend metabox', 'the7mk2'));
$proportions = presscore_meta_boxes_get_images_proportions();
$proportions_max = count($proportions);
$proportions_maybe_1x1 = array_search(1, wp_list_pluck($proportions, 'ratio'));
$rev_sliders = $layer_sliders = array('none' => _x('none', 'backend metabox', 'the7mk2'));
if (class_exists('RevSlider')) {
    $rev = new RevSlider();
    $arrSliders = $rev->getArrSliders();
    foreach ((array) $arrSliders as $revSlider) {
        $rev_sliders[$revSlider->getAlias()] = $revSlider->getTitle();
    }
}
if (function_exists('lsSliders')) {
    $layerSliders = lsSliders();
    foreach ($layerSliders as $lSlide) {
        $layer_sliders[$lSlide['id']] = $lSlide['name'];
    }
}
$slideshow_posts = array();
if (post_type_exists('dt_slideshow')) {
    $slideshow_query = new WP_Query(array('no_found_rows' => true, 'cache_results' => false, 'posts_per_page' => -1, 'post_type' => 'dt_slideshow', 'post_status' => 'publish'));
    if ($slideshow_query->have_posts()) {
        foreach ($slideshow_query->posts as $slidehsow_post) {
            $slideshow_posts[$slidehsow_post->ID] = esc_html($slidehsow_post->post_title);
        }
    }
}
$pages_with_basic_meta_boxes = apply_filters('presscore_pages_with_basic_meta_boxes', array('page', 'post'));
/***********************************************************/
예제 #7
0
 public function __construct($name, $default, $properties = array())
 {
     parent::__construct($name, $default, $properties);
     $type_options = array('' => __('None', 'everything'), 'empty' => __('Empty space', 'everything'), 'image' => __('Image', 'everything'), 'thumbnail' => __('Featured image', 'everything'), 'slider' => __('Slider', 'everything'), 'map' => __('Map', 'everything'), 'page' => __('Page', 'everything'), 'embed' => __('Embeding code', 'everything'), 'custom' => __('Custom HTML', 'everything'));
     if (!isset($this->slider)) {
         unset($type_options['slider']);
     }
     if (!isset($this->map)) {
         unset($type_options['map']);
     }
     $this->type->options = $type_options;
     $this->height->unit = 'px';
     $this->height->min = 0;
     $this->height->indent = true;
     $this->height->owner = $this->type;
     $this->height->owner_value = 'empty';
     $this->image->indent = true;
     $this->image->owner = $this->type;
     $this->image->owner_value = 'image';
     if (isset($this->slider)) {
         $this->slider->required = false;
         $this->slider->options = function ($option) {
             $options = array();
             if (\Everything::isPluginActive('layerslider')) {
                 foreach (\lsSliders() as $slider) {
                     $options['layerslider-' . $slider['id']] = $slider['name'];
                     $option->groups['LayerSlider WP'][] = 'layerslider-' . $slider['id'];
                 }
             }
             if (\Everything::isPluginActive('masterslider')) {
                 foreach (get_masterslider_names() as $id => $name) {
                     $options['masterslider-' . $id] = $name;
                     $option->groups['Master Slider WP'][] = 'masterslider-' . $id;
                 }
             }
             if (\Everything::isPluginActive('revslider')) {
                 $revslider = new \RevSlider();
                 foreach ($revslider->getArrSliders() as $slider) {
                     $options['revslider-' . $slider->getID()] = $slider->getTitle();
                     $option->groups['Revolution Slider'][] = 'revslider-' . $slider->getID();
                 }
             }
             return $options;
         };
         $this->slider->indent = true;
         $this->slider->owner = $this->type;
         $this->slider->owner_value = 'slider';
     }
     if (isset($this->map)) {
         $this->map->required = false;
         $this->map->options = function ($option) {
             $options = array();
             if (\Everything::isPluginActive('wild-googlemap')) {
                 $maps = \WiLD_BackendGooglemapManager::getInstance()->get_maps();
                 foreach ($maps as $map) {
                     $options['wild-googlemap-' . $map->id] = $map->name;
                     $option->groups['WiLD Googlemap'][] = 'wild-googlemap-' . $map->id;
                 }
             }
             if (\Everything::isPluginActive('wp-google-map-plugin')) {
                 $maps = $GLOBALS['wpdb']->get_results("SELECT map_id, map_title FROM {$GLOBALS['wpdb']->prefix}create_map ORDER BY map_id ASC", ARRAY_A);
                 foreach ($maps as $map) {
                     $options['wp-google-map-plugin-' . $map['map_id']] = $map['map_title'];
                     $option->groups['WP Google Map Plugin'][] = 'wp-google-map-plugin-' . $map['map_id'];
                 }
             }
             return $options;
         };
         $this->map->indent = true;
         $this->map->owner = $this->type;
         $this->map->owner_value = 'map';
     }
     $this->page->required = false;
     $this->page->options = function () {
         return \Drone\Func::wpPostsList(array('numberposts' => -1, 'post_type' => 'page'));
     };
     $this->page->indent = true;
     $this->page->owner = $this->type;
     $this->page->owner_value = 'page';
     $this->embed->description = __('Embeding code from YouTube, Vimeo, Google Maps or other.', 'everything');
     $this->embed->indent = true;
     $this->embed->owner = $this->type;
     $this->embed->owner_value = 'embed';
     $this->custom->indent = true;
     $this->custom->owner = $this->type;
     $this->custom->owner_value = 'custom';
 }
예제 #8
0
파일: actions.php 프로젝트: scottnkerr/eeco
function ls_export_sliders()
{
    $data = array();
    // All sliders
    if ($_POST['sliders'] == -1) {
        $sliders = lsSliders(200, false, true);
        foreach ($sliders as $item) {
            $data[] = $item['data'];
        }
        // Specific slider
    } elseif (!empty($_POST['sliders']) && is_numeric($_POST['sliders'])) {
        $sliders = lsSliderById((int) $_POST['sliders']);
        $data[] = $sliders['data'];
    } else {
        die('Invalid data received.');
    }
    // Slider name
    $name = 'LayerSlider Export ' . date('Y-m-d') . ' at ' . date('H.i.s') . '.json';
    // Send output and force download
    header('Content-type: application/force-download');
    header('Content-Disposition: attachment; filename="' . str_replace(' ', '_', $name) . '"');
    die(base64_encode(json_encode($data)));
}
예제 #9
0
파일: helper.php 프로젝트: severnrescue/web
            function ioa_panel_markup($post)
            {
                // Use nonce for verification
                wp_nonce_field('ioa_panel_markup', 'ioa_panel_markup_nonce');
                global $super_options, $google_webfonts, $ioa_sidebars;
                $ioa_options = get_post_meta($post->ID, 'ioa_options', true);
                $show_title = $title_icon = '';
                $override_title_style = '';
                if (isset($ioa_options['show_title'])) {
                    $show_title = $ioa_options['show_title'];
                }
                if (isset($ioa_options['title_icon'])) {
                    $title_icon = $ioa_options['title_icon'];
                }
                if (isset($ioa_options['override_title_style'])) {
                    $override_title_style = $ioa_options['override_title_style'];
                }
                $tc = $tbc = $tbco = $stc = $stbc = $stbco = '';
                if (isset($ioa_options['ioa_custom_title_color'])) {
                    $tc = $ioa_options['ioa_custom_title_color'];
                }
                if (isset($ioa_options['ioa_custom_title_bgcolor'])) {
                    $tbc = $ioa_options['ioa_custom_title_bgcolor'];
                }
                if (isset($ioa_options['ioa_custom_title_bgcolor-opacity'])) {
                    $tbco = $ioa_options['ioa_custom_title_bgcolor-opacity'];
                }
                if (isset($ioa_options['ioa_custom_subtitle_color'])) {
                    $stc = $ioa_options['ioa_custom_subtitle_color'];
                }
                if (isset($ioa_options['ioa_custom_subtitle_bgcolor'])) {
                    $stbc = $ioa_options['ioa_custom_subtitle_bgcolor'];
                }
                if (isset($ioa_options['ioa_custom_subtitle_bgcolor-opacity'])) {
                    $stbco = $ioa_options['ioa_custom_subtitle_bgcolor-opacity'];
                }
                $ttbc = $background_cover = '';
                if (isset($ioa_options['ioa_titlearea_bgcolor'])) {
                    $ttbc = $ioa_options['ioa_titlearea_bgcolor'];
                }
                if (isset($ioa_options['background_cover'])) {
                    $background_cover = $ioa_options['background_cover'];
                }
                $background_animate_time = $background_animate_position = '';
                if (isset($ioa_options['background_animate_time'])) {
                    $background_animate_time = $ioa_options['background_animate_time'];
                }
                if (isset($ioa_options['background_animate_position'])) {
                    $background_animate_position = $ioa_options['background_animate_position'];
                }
                $tbgimage = $tbgposition = $tbgpositionc = $tbgrepeat = '';
                if (isset($ioa_options['ioa_titlearea_bgimage'])) {
                    $tbgimage = $ioa_options['ioa_titlearea_bgimage'];
                }
                if (isset($ioa_options['ioa_titlearea_bgposition'])) {
                    $tbgposition = $ioa_options['ioa_titlearea_bgposition'];
                }
                if (isset($ioa_options['ioa_titlearea_bgpositionc'])) {
                    $tbgpositionc = $ioa_options['ioa_titlearea_bgpositionc'];
                }
                if (isset($ioa_options['ioa_titlearea_bgrepeat'])) {
                    $tbgrepeat = $ioa_options['ioa_titlearea_bgrepeat'];
                }
                $ttgr_start = $ttgr_end = $tbggradient_use = $tbggradient_dir = '';
                if (isset($ioa_options['ioa_titlearea_grstart'])) {
                    $ttgr_start = $ioa_options['ioa_titlearea_grstart'];
                }
                if (isset($ioa_options['ioa_titlearea_grend'])) {
                    $ttgr_end = $ioa_options['ioa_titlearea_grend'];
                }
                if (isset($ioa_options['titlearea_gradient'])) {
                    $tbggradient_use = $ioa_options['titlearea_gradient'];
                }
                if (isset($ioa_options['titlearea_gradient_dir'])) {
                    $tbggradient_dir = $ioa_options['titlearea_gradient_dir'];
                }
                $title_font = $subtitle_font = $title_font_size = $title_font_weight = '';
                if (isset($ioa_options['title_font'])) {
                    $title_font = $ioa_options['title_font'];
                }
                if (isset($ioa_options['subtitle_font'])) {
                    $subtitle_font = $ioa_options['subtitle_font'];
                }
                if (isset($ioa_options['title_font_size'])) {
                    $title_font_size = $ioa_options['title_font_size'];
                }
                if (isset($ioa_options['title_font_weight'])) {
                    $title_font_weight = $ioa_options['title_font_weight'];
                }
                $ta = $ts = $title_effect = $subtitle_effect = $effect_delay = $titlearea_effect = $page_layout = $page_sidebar = '';
                if (isset($ioa_options['title_align'])) {
                    $ta = $ioa_options['title_align'];
                }
                if (isset($ioa_options['title_vspace'])) {
                    $ts = $ioa_options['title_vspace'];
                }
                if (isset($ioa_options['title_effect'])) {
                    $title_effect = $ioa_options['title_effect'];
                }
                if (isset($ioa_options['subtitle_effect'])) {
                    $subtitle_effect = $ioa_options['subtitle_effect'];
                }
                if (isset($ioa_options['effect_delay'])) {
                    $effect_delay = $ioa_options['effect_delay'];
                }
                if (isset($ioa_options['titlearea_effect'])) {
                    $titlearea_effect = $ioa_options['titlearea_effect'];
                }
                if (isset($ioa_options['page_layout'])) {
                    $page_layout = $ioa_options['page_layout'];
                }
                if (isset($ioa_options['page_sidebar'])) {
                    $page_sidebar = $ioa_options['page_sidebar'];
                }
                $blogmeta_enable = $meta_keywords = $meta_description = $seo_title = '';
                if (isset($ioa_options['blogmeta_enable'])) {
                    $blogmeta_enable = $ioa_options['blogmeta_enable'];
                }
                if (isset($ioa_options['meta_keywords'])) {
                    $meta_keywords = $ioa_options['meta_keywords'];
                }
                if (isset($ioa_options['meta_description'])) {
                    $meta_description = $ioa_options['meta_description'];
                }
                if (isset($ioa_options['seo_title'])) {
                    $seo_title = $ioa_options['seo_title'];
                }
                if ($background_cover == "") {
                    $background_cover = "true";
                }
                if ($page_layout == "") {
                    $page_layout = "full";
                    if ($post->post_type == "post") {
                        if (isset($super_options[SN . '_post_layout'])) {
                            $page_layout = $super_options[SN . '_post_layout'];
                        } else {
                            $page_layout = "right-sidebar";
                        }
                    }
                    if ($post->post_type == "page") {
                        if (isset($super_options[SN . '_page_layout']) && $super_options[SN . '_page_layout'] != "") {
                            $page_layout = $super_options[SN . '_page_layout'];
                        } else {
                            $page_layout = "full";
                        }
                    }
                }
                $dominant_bg_color = $dominant_color = $blog_metadata = '';
                if (isset($ioa_options['dominant_bg_color'])) {
                    $dominant_bg_color = $ioa_options['dominant_bg_color'];
                }
                if (isset($ioa_options['dominant_color'])) {
                    $dominant_color = $ioa_options['dominant_color'];
                }
                if (isset($ioa_options['blog_metadata'])) {
                    $blog_metadata = $ioa_options['blog_metadata'];
                }
                $featured_media_type = $layered_media_type = $klayered_media_type = '';
                if (isset($ioa_options['featured_media_type'])) {
                    $featured_media_type = $ioa_options['featured_media_type'];
                }
                if (isset($ioa_options['layered_media_type'])) {
                    $layered_media_type = $ioa_options['layered_media_type'];
                }
                if (isset($ioa_options['klayered_media_type'])) {
                    $klayered_media_type = $ioa_options['klayered_media_type'];
                }
                $background_image = $featured_media_height = $adaptive_height = $featured_video = $portfolio_image_resize = '';
                if (isset($ioa_options['background_image'])) {
                    $background_image = $ioa_options['background_image'];
                }
                if (isset($ioa_options['featured_media_height'])) {
                    $featured_media_height = $ioa_options['featured_media_height'];
                }
                if (isset($ioa_options['adaptive_height'])) {
                    $adaptive_height = $ioa_options['adaptive_height'];
                }
                if (isset($ioa_options['featured_video'])) {
                    $featured_video = $ioa_options['featured_video'];
                }
                if (isset($ioa_options['portfolio_image_resize'])) {
                    $portfolio_image_resize = $ioa_options['portfolio_image_resize'];
                }
                if ($blogmeta_enable == "") {
                    $blogmeta_enable = $super_options[SN . '_blog_meta_enable'];
                }
                $posts_item_limit = $ioa_gallery_data = $posts_item_limit = '';
                if (isset($ioa_options['posts_item_limit'])) {
                    $posts_item_limit = $ioa_options['posts_item_limit'];
                }
                if ($posts_item_limit == "") {
                    $posts_item_limit = $super_options[SN . '_posts_item_limit'];
                }
                $enable_thumbnail = $more_label = $posts_excerpt_limit = $blog_excerpt = $query_filter = '';
                if (isset($ioa_options['enable_thumbnail'])) {
                    $enable_thumbnail = $ioa_options['enable_thumbnail'];
                }
                if (isset($ioa_options['more_label'])) {
                    $more_label = $ioa_options['more_label'];
                }
                if (isset($ioa_options['posts_excerpt_limit'])) {
                    $posts_excerpt_limit = $ioa_options['posts_excerpt_limit'];
                }
                if (isset($ioa_options['blog_excerpt'])) {
                    $blog_excerpt = $ioa_options['blog_excerpt'];
                }
                if (isset($ioa_options['query_filter'])) {
                    $query_filter = $ioa_options['query_filter'];
                }
                if (isset($ioa_options['ioa_gallery_data'])) {
                    $ioa_gallery_data = $ioa_options['ioa_gallery_data'];
                }
                $ioa_template_mode = '';
                if (isset($ioa_options['ioa_template_mode'])) {
                    $ioa_template_mode = $ioa_options['ioa_template_mode'];
                }
                /**
                 * Portfolio Meta Data
                 */
                $portfolio_item_limit = $portfolio_enable_thumbnail = $portfolio_more_label = $portfolio_excerpt_limit = $portfolio_excerpt = $portfolio_query_filter = $portfolio_enable_text = '';
                if (isset($ioa_options['portfolio_item_limit'])) {
                    $portfolio_item_limit = $ioa_options['portfolio_item_limit'];
                }
                if ($portfolio_item_limit == "") {
                    $portfolio_item_limit = $super_options[SN . '_portfolio_item_limit'];
                }
                if (isset($ioa_options['portfolio_enable_thumbnail'])) {
                    $portfolio_enable_thumbnail = $ioa_options['portfolio_enable_thumbnail'];
                }
                if (isset($ioa_options['portfolio_enable_text'])) {
                    $portfolio_enable_text = $ioa_options['portfolio_enable_text'];
                }
                if (isset($ioa_options['portfolio_more_label'])) {
                    $portfolio_more_label = $ioa_options['portfolio_more_label'];
                }
                if (isset($ioa_options['portfolio_excerpt_limit'])) {
                    $portfolio_excerpt_limit = $ioa_options['portfolio_excerpt_limit'];
                }
                if (isset($ioa_options['portfolio_excerpt'])) {
                    $portfolio_excerpt = $ioa_options['portfolio_excerpt'];
                }
                if (isset($ioa_options['portfolio_query_filter'])) {
                    $portfolio_query_filter = $ioa_options['portfolio_query_filter'];
                }
                $custom_post_type = $custom_query_filter = $custom_enable_thumbnail = '';
                if (isset($ioa_options['custom_post_type'])) {
                    $custom_post_type = $ioa_options['custom_post_type'];
                }
                if (isset($ioa_options['custom_query_filter'])) {
                    $custom_query_filter = $ioa_options['custom_query_filter'];
                }
                if (isset($ioa_options['custom_enable_thumbnail'])) {
                    $custom_enable_thumbnail = $ioa_options['custom_enable_thumbnail'];
                }
                $ioa_custom_posts_item_limit = '';
                if (isset($ioa_options['custom_posts_item_limit'])) {
                    $ioa_custom_posts_item_limit = $ioa_options['custom_posts_item_limit'];
                }
                if ($ioa_custom_posts_item_limit == "") {
                    $ioa_custom_posts_item_limit = $super_options[SN . '_posts_item_limit'];
                }
                ?>
			
		<div id="ioa_custom_code" class="clearfix">
			<ul class='clearfix'>
				<?php 
                if ($post->post_type != "testimonial") {
                    ?>
				<li><a href="#ioa_title_area" data-step='2' data-intro='<?php 
                    _e("This is title manager, customize title in any way you like.", 'ioa');
                    ?>
' data-position='top'><?php 
                    _e('Title Area Settings', 'ioa');
                    ?>
</a></li>
				<li><a href="#ioa_header_layout" data-step='3' data-intro='<?php 
                    _e("You can set Page/Post Layout and sidebar from here, default layout is taken from options panel -> layout tab.", 'ioa');
                    ?>
' data-position='top'><?php 
                    _e('Layout Settings', 'ioa');
                    ?>
</a></li>
				<?php 
                }
                ?>
	
				<li><a href="#ioa_dominant_color"  data-step='4' data-intro='<?php 
                _e("Set  primary color(background color) and secondary color highlight here. These will show in highlights in templates and single items.", 'ioa');
                ?>
' data-position='top'><?php 
                _e('Dominant Color', 'ioa');
                ?>
</a></li>
				<?php 
                if ($post->post_type != "testimonial") {
                    ?>
				<li><a href="#ioa_media"  data-step='5' data-intro='<?php 
                    _e("Set Featured Media such has image , full width image or gallery here. For featured images be sure to Set Featured Image at top right corner", 'ioa');
                    ?>
' data-position='top'><?php 
                    _e('Media', 'ioa');
                    ?>
</a></li>
				
				<li><a href="#ioa_images"  data-step='7' data-intro='<?php 
                    _e("Add Group of images here, these are used in featured gallery and slider.", 'ioa');
                    ?>
' data-position='top'><?php 
                    _e('Slideshow/Slider Images', 'ioa');
                    ?>
</a></li>
				<li><a href="#ioa_seo"  data-step='8' data-intro='<?php 
                    _e("You can Custom SEO settings from here.", 'ioa');
                    ?>
' data-position='top'><?php 
                    _e('SEO Settings', 'ioa');
                    ?>
</a></li>
				<?php 
                    if ($post->post_type == "page") {
                        ?>
				<li><a href="#ioa_portfolio_settings"  data-step='9' data-intro='<?php 
                        _e("You can filter and customize portfolio items for a portfolio template from here. For global settings you can set them at Theme Admin -> Portfolio Tab.", 'ioa');
                        ?>
' data-position='top'><?php 
                        _e('Portfolio Settings', 'ioa');
                        ?>
</a></li>
				<li><a href="#ioa_blog_settings"  data-step='10' data-intro='<?php 
                        _e("You can filter and customize post items for a blog template from here. For global settings you can set them at Theme Admin -> Blog Tab.", 'ioa');
                        ?>
' data-position='top'><?php 
                        _e('Blog Settings', 'ioa');
                        ?>
</a></li></li>
				<li><a href="#ioa_customtemplate"  data-step='10' data-intro='<?php 
                        _e("You can filter and customize custom post items here. Select Custom Post Template in set template to use this panel.", 'ioa');
                        ?>
' data-position='top'><?php 
                        _e('Custom Post Settings', 'ioa');
                        ?>
</a></li></li>
				<?php 
                    }
                }
                ?>

			

			</ul>
			<?php 
                if ($post->post_type != "testimonial") {
                    ?>
			<div id="ioa_title_area">
				
				<h3 class="ioa_panel_heading" data-step='2' data-intro='<?php 
                    _e("This Panel consists of font related settings, you can select font,alignment and size. To disable title area you can set Show Title Area to no", 'ioa');
                    ?>
' data-position='top'> <?php 
                    _e('General', 'ioa');
                    ?>
 </h3>	
				<div>
					<?php 
                    echo getIOAInput(array("label" => "", "name" => 'ioa_template_mode', "type" => 'hidden', 'default' => 'wp-editor', "value" => $ioa_template_mode));
                    echo getIOAInput(array("label" => __("Show Title Area", 'ioa'), "name" => "show_title", "default" => "yes", "type" => "select", "description" => "  ", "length" => 'medium', "value" => $show_title, "options" => array("yes" => __("Yes", 'ioa'), "no" => __("No", 'ioa'))));
                    echo getIOAInput(array("label" => __("Override Theme's Title Stylings", 'ioa'), "name" => "override_title_style", "default" => "no", "type" => "select", "description" => "  ", "length" => 'medium', "value" => $override_title_style, "options" => array("no" => __("No", 'ioa'), "yes" => __("Yes", 'ioa'))));
                    echo getIOAInput(array("label" => __("Set Icon for Title", 'ioa'), "name" => "title_icon", "default" => "", "type" => "text", "description" => "  ", "length" => 'medium', "value" => $title_icon, 'addMarkup' => '<a href="" class="button-default icon-maker">' . __('Add Icon', 'ioa') . '</a>', "class" => 'has-input-button'));
                    echo getIOAInput(array("label" => __("Select Title Alignment", 'ioa'), "name" => "title_align", "default" => "left", "type" => "select", "description" => "  ", "length" => 'medium', "value" => $ta, "options" => array("left" => __("Left", 'ioa'), "right" => __("Right", 'ioa'), "center" => __("Center", 'ioa'))));
                    echo getIOAInput(array("label" => __("Select Title Vertical Spacing", 'ioa'), "name" => "title_vspace", "default" => "20", "type" => "slider", "description" => "  ", "length" => 'medium', "value" => $ts, "max" => "100", "suffix" => "px"));
                    echo getIOAInput(array("label" => __("Select Title Font Size", 'ioa'), "name" => "title_font_size", "default" => "36", "type" => "slider", "description" => "  ", "length" => 'medium', "value" => $title_font_size, "max" => "160", "suffix" => "px"));
                    echo getIOAInput(array("label" => __("Enter Font Weight", 'ioa'), "name" => "title_font_weight", "default" => "700", "type" => "text", "description" => "  ", "value" => $title_font_weight));
                    echo getIOAInput(array("label" => __("Select Title font", 'ioa'), "name" => "title_fontfamily", "default" => '', "type" => "select", "description" => "", "options" => $google_webfonts, "value" => $title_font));
                    if ($post->post_type == "page") {
                        echo getIOAInput(array("label" => __("Select Sub Title font", 'ioa'), "name" => "subtitle_fontfamily", "default" => '', "type" => "select", "description" => "", "options" => $google_webfonts, "value" => $subtitle_font));
                    }
                    ?>
				</div>			


				<h3 class="ioa_panel_heading" data-step='2' data-intro='<?php 
                    _e("This panel contains background and text color styling of title and subtitle.", 'ioa');
                    ?>
' data-position='top'>  
					<?php 
                    _e('Title ', 'ioa');
                    if ($post->post_type == "page") {
                        _e('& Subtitle', 'ioa');
                    }
                    _e(' Stylings', 'ioa');
                    ?>
 
				</h3>	
				<div>
					<?php 
                    echo getIOAInput(array("label" => __("Select Title Color", 'ioa'), "name" => "title_color", "default" => " << ", "type" => "colorpicker", "description" => "  ", "alpha" => false, "length" => 'medium', "value" => $tc . " << "));
                    echo getIOAInput(array("label" => __("Select Title Background Color", 'ioa'), "name" => "title_bgcolor", "default" => " << ", "type" => "colorpicker", "description" => "  ", "alpha" => false, "length" => 'medium', "value" => $tbc . " << "));
                    echo getIOAInput(array("label" => __("Enter Title Background Opacity(Between 0 and 1)", 'ioa'), "name" => "title_bgcolor-opacity", "default" => "1", "type" => "text", "description" => "  ", "length" => 'small', "value" => $tbco));
                    if ($post->post_type == "page") {
                        echo getIOAInput(array("label" => __("Select Sub Title Color", 'ioa'), "name" => "subtitle_color", "default" => " << ", "type" => "colorpicker", "alpha" => false, "description" => "  ", "length" => 'medium', "value" => $stc . " << "));
                    }
                    if ($post->post_type == "page") {
                        echo getIOAInput(array("label" => __("Select Sub Title Background Color", 'ioa'), "name" => "subtitle_bgcolor", "default" => " << ", "type" => "colorpicker", "alpha" => false, "description" => "  ", "length" => 'medium', "value" => $stbc . " << "));
                    }
                    if ($post->post_type == "page") {
                        echo getIOAInput(array("label" => __("Enter Sub Title Background Opacity(Between 0 and 1)", 'ioa'), "name" => "subtitle_bgcolor-opacity", "default" => "1", "type" => "text", "description" => "  ", "length" => 'small', "value" => $stbco));
                    }
                    ?>

				</div>



				<h3 class="ioa_panel_heading" data-step='2' data-intro='<?php 
                    _e("This panel contains settings to set background image , gradients and colors with all customizable options.", 'ioa');
                    ?>
' data-position='top'>  <?php 
                    _e('Background Stylings', 'ioa');
                    ?>
 </h3>	
				<div>
					<?php 
                    echo getIOAInput(array("label" => __("Select Background Color for title area", 'ioa'), "name" => "titlearea_bgcolor", "default" => " << ", "type" => "colorpicker", "description" => "  ", "length" => 'medium', "alpha" => false, "value" => $ttbc . " << "));
                    echo getIOAInput(array("label" => __("Enable Full Background Stretch", 'ioa'), "name" => "background_cover", "default" => "", "type" => "select", "value" => $background_cover, "options" => array("", "auto", "contain", "cover")));
                    echo getIOAInput(array("label" => __("Add Background Image for Title Area", 'ioa'), "name" => "titlearea_bgimage", "default" => "", "type" => "upload", "description" => "", "class" => "has-input-button", "length" => 'medium', "value" => $tbgimage, "title" => __("Use as Background Image", 'ioa'), "std" => "", "button" => __("Add Image", 'ioa')));
                    echo getIOAInput(array("label" => __("Background Position for Title Area Image", 'ioa'), "name" => "titlearea_bgposition", "default" => "", "type" => "select", "description" => "", "length" => 'medium', "value" => $tbgposition, "options" => array("", "top left", "top right", "bottom left", "bottom right", "center top", "center center", "center bottom", "center left", "center right")));
                    echo getIOAInput(array("label" => __("Custom Background Position( 0px 0px format )", 'ioa'), "name" => "titlearea_bgpositionc", "default" => "", "type" => "text", "description" => "", "length" => 'medium', "value" => $tbgpositionc));
                    echo getIOAInput(array("label" => __("Background Repeat for Title Area Image", 'ioa'), "name" => "titlearea_bgrepeat", "default" => "", "type" => "select", "description" => "", "length" => 'medium', "value" => $tbgrepeat, "options" => array("", "repeat", "repeat-x", "repeat-y", "no-repeat")));
                    echo getIOAInput(array("label" => __("Use Background Gradient", 'ioa'), "name" => "titlearea_gradient", "default" => "no", "type" => "select", "description" => "", "length" => 'medium', "value" => $tbggradient_use, "options" => array("yes" => __("Yes", 'ioa'), "no" => __("No", 'ioa'))));
                    echo getIOAInput(array("label" => __("Use Background Gradient", 'ioa'), "name" => "titlearea_gradient_dir", "default" => "no", "type" => "select", "description" => "", "length" => 'medium', "value" => $tbggradient_dir, "options" => array("horizontal" => __("Horizontal", 'ioa'), "vertical" => __("Vertical", 'ioa'), "diagonaltl" => __("Diagonal Top Left(Not Supported IE8-9)", 'ioa'), "diagonalbr" => __("Diagonal Bottom Right(Not Supported IE8-9)", 'ioa'))));
                    echo getIOAInput(array("label" => __("Select Start Background Color for title area", 'ioa'), "name" => "titlearea_grstart", "default" => " << ", "type" => "colorpicker", "description" => "  ", "length" => 'medium', "alpha" => false, "value" => $ttgr_start . " << "));
                    echo getIOAInput(array("label" => __("Select Start Background Color for title area", 'ioa'), "name" => "titlearea_grend", "default" => " << ", "type" => "colorpicker", "description" => "  ", "length" => 'medium', "alpha" => false, "value" => $ttgr_end . " << "));
                    ?>
				
				</div>
				<h3 class="ioa_panel_heading" data-step='2' data-intro='<?php 
                    _e("You can set title, subtitle and title area animation.", 'ioa');
                    ?>
' data-position='top'>  <?php 
                    _e('Animation', 'ioa');
                    ?>
 </h3>	
				<div>
					<?php 
                    echo getIOAInput(array("label" => __("Title Effect", 'ioa'), "name" => "title_effect", "default" => "none", "type" => "select", "description" => "", "length" => 'medium', "value" => $title_effect, "options" => array("none" => __("None", 'ioa'), "fade" => __("Fade", 'ioa'), "fade-left" => __("Fade From Left", 'ioa'), "fade-right" => __("Fade From Right", 'ioa'), "fade-right" => __("Fade From Right", 'ioa'), "rotate-right" => __("Rotate from Right", 'ioa'), "rotate-left" => __("Rotate from Left", 'ioa'), "scale-in" => __("Scale In", 'ioa'), "scale-out" => __("Scale Out", 'ioa'), "curtain-show" => __("Curtain Show", 'ioa'), "curtain-fade" => __("Curtain Fade", 'ioa'))));
                    if ($post->post_type == "page") {
                        echo getIOAInput(array("label" => __("Sub Title Effect", 'ioa'), "name" => "subtitle_effect", "default" => "none", "type" => "select", "description" => "", "length" => 'medium', "value" => $subtitle_effect, "options" => array("none" => __("None", 'ioa'), "fade" => __("Fade", 'ioa'), "fade-left" => __("Fade From Left", 'ioa'), "fade-right" => __("Fade From Right", 'ioa'), "fade-right" => __("Fade From Right", 'ioa'), "rotate-right" => __("Rotate from Right", 'ioa'), "rotate-left" => __("Rotate from Left", 'ioa'), "scale-in" => __("Scale In", 'ioa'), "scale-out" => __("Scale Out", 'ioa'), "curtain-show" => __("Curtain Show", 'ioa'), "curtain-fade" => __("Curtain Fade", 'ioa'))));
                    }
                    echo getIOAInput(array("label" => __("Enter Background Animation Time in minutes", 'ioa'), "name" => "background_animate_time", "default" => "60", "type" => "text", "description" => "  ", "length" => 'small', "value" => $background_animate_time));
                    echo getIOAInput(array("label" => __("Enter Background Position[Left Top] for animation(ex 9999px 9999px) ", 'ioa'), "name" => "background_animate_position", "default" => "-9999px -9999px", "type" => "text", "description" => "  ", "length" => 'small', "value" => $background_animate_position));
                    echo getIOAInput(array("label" => __("Effect Delay Between Title & Subtitle in seconds", 'ioa'), "name" => "effect_delay", "default" => "0.5", "type" => "text", "description" => "", "length" => 'medium', "value" => $effect_delay));
                    echo getIOAInput(array("label" => __("Title Area Effect", 'ioa'), "name" => "titlearea_effect", "default" => "none", "type" => "select", "description" => "", "length" => 'medium', "value" => $titlearea_effect, "options" => array("none" => __("None", 'ioa'), "fade" => __("Fade", 'ioa'), "fade-left" => __("Fade From Left", 'ioa'), "fade-right" => __("Fade From Right", 'ioa'), "fade-right" => __("Fade From Right", 'ioa'), "rotate-right" => __("Rotate from Right", 'ioa'), "rotate-left" => __("Rotate from Left", 'ioa'), "scale-in" => __("Scale In", 'ioa'), "scale-out" => __("Scale Out", 'ioa'), "metro" => __("Metro Tile Effect", 'ioa'), "parallex" => __("Parallax Background Image", 'ioa'), "animate-bg" => __("Animated Background Axis", 'ioa'))));
                    ?>
				</div>		

	
			</div>
			<div id="ioa_header_layout">
				
				<h3 class="ioa_panel_heading"> <?php 
                    _e('Select Page Layout and Sidebar', 'ioa');
                    ?>
 </h3>	
				<div>

					<ul class="layout-list clearfix">
						<li class='full' data-val='full' ></li>
						<li class='right-sidebar' data-val='right-sidebar' ></li>
						<li class='left-sidebar' data-val='left-sidebar' ></li>

						<li class='sticky-right-sidebar' data-val='sticky-right-sidebar' ></li>
						<li class='sticky-left-sidebar' data-val='sticky-left-sidebar' ></li>

						<li class='below-title' data-val='below-title' ></li>
						<li class='above-footer' data-val='above-footer' ></li>
					</ul>
					<input type="hidden" class="page_layout" name='page_layout' value="<?php 
                    echo $page_layout;
                    ?>
">
					
					<hr>
					
					<?php 
                    echo getIOAInput(array("label" => __("Select Sidebar", 'ioa'), "name" => "page_sidebar", "default" => "Blog Sidebar", "type" => "select", "description" => "", "length" => 'medium', "value" => $page_sidebar, "options" => $ioa_sidebars));
                    ?>
				</div>	
			</div>	
			<?php 
                }
                ?>
			
			
			<div id="ioa_dominant_color">
				
				<h3 class="ioa_panel_heading"> <?php 
                _e('Select Page Layout and Sidebar', 'ioa');
                ?>
 </h3>	
				<div>
				<?php 
                echo getIOAInput(array("label" => __("Select Primary Highlight Color", 'ioa'), "name" => "dominant_bg_color", "default" => " << ", "type" => "colorpicker", "description" => "  ", "length" => 'medium', "alpha" => false, "value" => $dominant_bg_color . " << "));
                echo getIOAInput(array("label" => __("Select Secondary Highlight Color", 'ioa'), "name" => "dominant_color", "default" => " << ", "type" => "colorpicker", "description" => "  ", "length" => 'medium', "alpha" => false, "value" => $dominant_color . " << "));
                ?>
				</div>
			</div>

			<?php 
                if ($post->post_type != "testimonial") {
                    ?>

			<div id="ioa_media">
				
				<?php 
                    if (function_exists('rev_slider_shortcode')) {
                        global $wpdb;
                        $table_db_name = GlobalsRevSlider::$table_sliders;
                        $lsliders = $wpdb->get_results("SELECT * FROM {$table_db_name}", ARRAY_A);
                        $slds = array("none" => "None");
                        foreach ($lsliders as $slider) {
                            $slds[$slider['alias']] = $slider['title'];
                        }
                        echo getIOAInput(array("label" => __("Select Revolution Layered Slider for Featured Media", 'ioa'), "name" => "layered_media_type", "default" => "none", "type" => "select", "description" => "", "length" => 'medium', "value" => $layered_media_type, "options" => $slds));
                    }
                    if (function_exists('lsSliders')) {
                        $layered_slds = array("none" => "None");
                        $lsl = lsSliders();
                        foreach ($lsl as $slider) {
                            $layered_slds[$slider['id']] = $slider['name'];
                        }
                        echo getIOAInput(array("label" => __("Select Layered Slider for Featured Media", 'ioa'), "name" => "klayered_media_type", "default" => "none", "type" => "select", "description" => "", "length" => 'medium', "value" => $klayered_media_type, "options" => $layered_slds));
                    }
                    echo getIOAInput(array("label" => __("Select Featured Media Type", 'ioa'), "name" => "featured_media_type", "default" => "image", "type" => "select", "description" => "", "length" => 'medium', "value" => $featured_media_type, "options" => array("none" => __("None", 'ioa'), "image" => __("Featured Image", 'ioa'), "proportional" => __("Proportional Resized Featured Image", 'ioa'), "none-full" => __("Top Featured Image(No Resizing)", 'ioa'), "none-contained" => __("Contained Featured Image(No Resizing)", 'ioa'), "image-full" => __("Full Width Featured Image", 'ioa'), "image-parallex" => __("Full Width Parallex Featured Image", 'ioa'), "video" => __("Video", 'ioa'), "slideshow" => __("Slideshow", 'ioa'), "slideshow-contained" => __("Full Contained Slideshow", 'ioa'), "slider" => __("Slider", 'ioa'), "slider-contained" => __("Full Contained Slider", 'ioa'), "slider-full" => __("Full Width Slider", 'ioa'))));
                    echo getIOAInput(array("label" => __("Enter Featured Video Link", 'ioa'), "name" => "featured_video", "default" => "", "type" => "text", "description" => "", "length" => 'medium', "value" => $featured_video));
                    echo getIOAInput(array("label" => __("Background Image for Full Featured Media", 'ioa'), "name" => "background_image", "default" => "", "type" => "upload", "description" => "", "length" => 'medium', "value" => $background_image, "class" => 'has-input-button'));
                    echo getIOAInput(array("label" => __("Featured Media Height", 'ioa'), "name" => "featured_media_height", "type" => "slider", "max" => 800, "default" => 450, "value" => $featured_media_height, "suffix" => " px"));
                    echo getIOAInput(array("label" => __("Enable Adaptive Height( doesn't work for parallex media)", 'ioa'), "name" => "adaptive_height", "default" => "false", "type" => "toggle", "length" => 'medium', "value" => $adaptive_height));
                    ?>

			</div>
			
			<div id="ioa_images" class="clearfix">
				<p class="note"> <?php 
                    _e(" To Select Multiple Images hold down control key or cmd for MAC. To select in a row in a single click, hold down shift click on first image then click on last image you want.", 'ioa');
                    ?>
 </p>
				<a href="" class="post-ioa-images-generator button-default" data-title="Add Images" data-label="Add" ><?php 
                    _e(' Add Images ', 'ioa');
                    ?>
</a>	
				

				 <div class="ioa-image-area clearifx">
				 	<?php 
                    if (isset($ioa_gallery_data) && trim($ioa_gallery_data) != "") {
                        $ar = explode(";", stripslashes($ioa_gallery_data));
                        foreach ($ar as $image) {
                            if ($image != "") {
                                $g_opts = explode("<gl>", $image);
                                ?>
								<div class='ioa-gallery-item' data-thumbnail='<?php 
                                echo $g_opts[1];
                                ?>
' data-img='<?php 
                                echo $g_opts[0];
                                ?>
' data-alt='<?php 
                                echo $g_opts[2];
                                ?>
' data-title='<?php 
                                echo $g_opts[3];
                                ?>
' data-description='<?php 
                                echo $g_opts[4];
                                ?>
' ><img src='<?php 
                                echo $g_opts[1];
                                ?>
' /> <a class='close ioa-front-icon  cancel-2icon-' href=''></a></div>
							<?php 
                            }
                        }
                    }
                    ?>

				 </div>
				 <input type="hidden" name="ioa_gallery_data" class="ioa_gallery_data" id="ioa_gallery_data" value="<?php 
                    echo $ioa_gallery_data;
                    ?>
" />
			</div>	
			
			<div id="ioa_seo" class="clearfix">
				<?php 
                    echo getIOAInput(array("label" => __("Meta Keywords for the Page", 'ioa'), "name" => "meta_keywords", "default" => $super_options[SN . '_meta_keywords'], "type" => "text", "description" => "", "length" => 'medium', "value" => $meta_keywords));
                    echo getIOAInput(array("label" => __("Meta Description for the Page", 'ioa'), "name" => "meta_description", "default" => $super_options[SN . '_meta_description'], "type" => "textarea", "description" => "", "length" => 'medium', "value" => $meta_description));
                    echo getIOAInput(array("label" => __("Seo Title for the Page", 'ioa'), "name" => "seo_title", "default" => '', "type" => "text", "description" => "", "length" => 'medium', "value" => $seo_title));
                    ?>
			</div>

			<?php 
                    if ($post->post_type == "page") {
                        global $ioa_portfolio_slug;
                        ?>
			<div id="ioa_portfolio_settings" class='ioa-query-box'>
				<input type="hidden" class="post_type" value="<?php 
                        echo $ioa_portfolio_slug;
                        ?>
">
			<?php 
                        echo getIOAInput(array("label" => __("Portfolio Images Resizing", 'ioa'), "name" => "portfolio_image_resize", "default" => "default", "type" => "select", "description" => "", "length" => 'medium', "value" => $portfolio_image_resize, "options" => array("default" => __("Full Width", 'ioa'), "proportional" => __("Proportional", 'ioa'), "none" => __("None", 'ioa'))));
                        echo getIOAInput(array("label" => __("Generate Filters", 'ioa'), "name" => "portfolio_query_filter", "default" => "", "type" => "text", "description" => "", "length" => 'medium', "class" => 'has-input-button', "value" => $portfolio_query_filter, 'addMarkup' => '<a href="" class="button-default query-maker">' . __('Filter Posts', 'ioa') . '</a>'));
                        echo getIOAInput(array("label" => __("Enable lightbox icon on hover (if false link icon will show)", 'ioa'), "name" => "portfolio_enable_thumbnail", "default" => $super_options[SN . '_portfolio_enable_thumbnail'], "type" => "toggle", "length" => 'medium', "value" => $portfolio_enable_thumbnail));
                        echo getIOAInput(array("label" => __("Enable text description", 'ioa'), "name" => "portfolio_enable_text", "default" => 'false', "type" => "toggle", "length" => 'medium', "value" => $portfolio_enable_text));
                        echo getIOAInput(array("label" => __("Use wordpress default excerpt", 'ioa'), "name" => "portfolio_excerpt", "default" => $super_options[SN . '_portfolio_excerpt'], "type" => "toggle", "length" => 'medium', "value" => $portfolio_excerpt));
                        echo getIOAInput(array("label" => __("More Button Label", 'ioa'), "name" => "portfolio_more_label", "default" => $super_options[SN . '_portfolio_more_label'], "type" => "text", "description" => "", "length" => 'medium', "value" => $portfolio_more_label));
                        echo getIOAInput(array("label" => __("Portfolio Items Limit", 'ioa'), "name" => "portfolio_item_limit", "type" => "slider", "max" => 50, "default" => 6, "value" => $portfolio_item_limit, "suffix" => "Items"));
                        echo getIOAInput(array("label" => __("Portfolio Content Limit", 'ioa'), "name" => "portfolio_excerpt_limit", "type" => "slider", "max" => 800, "default" => $super_options[SN . '_portfolio_excerpt_limit'], "value" => $portfolio_excerpt_limit, "suffix" => " Letters"));
                        ?>
	
			</div>
			<div id="ioa_blog_settings" class="ioa_query_box">
					<input type="hidden" class="post_type" value="post">
				<?php 
                        $pmb = '';
                        $post_meta_shortcodes = array("post_author" => array("name" => __("Post Author", 'ioa'), "syntax" => '[post_author_posts_link/]'), "post_date" => array("name" => __("Post Date", 'ioa'), "syntax" => '[post_date format=\'l, F d S, Y\'/]'), "post_time" => array("name" => __("Post Time", 'ioa'), "syntax" => '[post_time format=\'g:i a\'/]'), "post_tags" => array("name" => __("Post Tags", 'ioa'), "syntax" => '[post_tags sep=\',\' icon=\'\' /]'), "post_categories" => array("name" => __("Post Categories", 'ioa'), "syntax" => '[post_categories sep=\',\' icon=\'\' /]'), "get" => array("name" => __("Post Meta", 'ioa'), "syntax" => '[get name=\'\' /]'), "post_comments" => array("name" => __("Post Comments", 'ioa'), "syntax" => "[post_comments /]"));
                        foreach ($post_meta_shortcodes as $sh) {
                            $pmb .= " <a class='button-default' href=\"" . $sh['syntax'] . "\">" . $sh['name'] . "</a> ";
                        }
                        echo getIOAInput(array("label" => __("Generate Filters", 'ioa'), "name" => "query_filter", "default" => "", "type" => "text", "description" => "", "length" => 'medium', "class" => 'has-input-button', "value" => $query_filter, 'addMarkup' => '<a href="" class="button-default query-maker">' . __('Filter Posts', 'ioa') . '</a>'));
                        echo getIOAInput(array("label" => __("Blog Templates Posts shortcode Bar", 'ioa'), "name" => "blog_metadata", "default" => $super_options[SN . '_blog_meta'], "type" => "textarea", "description" => "", "length" => 'medium', "value" => $blog_metadata, "after_input" => "<div class='post-meta-panel clearfix'> {$pmb} </div>", "buttons" => " <a href='' class='shortcode-extra-insert'>" . __("Add Posts Info", 'ioa') . "</a>"));
                        echo getIOAInput(array("label" => __("Show Blog Templates Posts shortcode Bar", 'ioa'), "name" => "blogmeta_enable", "default" => "", "type" => "toggle", "length" => 'medium', "value" => $blogmeta_enable));
                        echo getIOAInput(array("label" => __("Enable lightbox icon on hover (if false link icon will show)", 'ioa'), "name" => "enable_thumbnail", "default" => $super_options[SN . '_enable_thumbnail'], "type" => "toggle", "length" => 'medium', "value" => $enable_thumbnail));
                        echo getIOAInput(array("label" => __("Use wordpress default excerpt", 'ioa'), "name" => "blog_excerpt", "default" => $super_options[SN . '_blog_excerpt'], "type" => "toggle", "length" => 'medium', "value" => $blog_excerpt));
                        echo getIOAInput(array("label" => __("More Button Label", 'ioa'), "name" => "more_label", "default" => $super_options[SN . '_more_label'], "type" => "text", "description" => "", "length" => 'medium', "value" => $more_label));
                        echo getIOAInput(array("label" => __("Blog Posts Items Limit", 'ioa'), "name" => "posts_item_limit", "type" => "slider", "max" => 50, "default" => 6, "value" => $posts_item_limit, "suffix" => "Items"));
                        echo getIOAInput(array("label" => __("Blog Posts Content Limit", 'ioa'), "name" => "posts_excerpt_limit", "type" => "slider", "max" => 800, "default" => $super_options[SN . '_posts_excerpt_limit'], "value" => $posts_excerpt_limit, "suffix" => " Letters"));
                        ?>
 			
 			
			</div>
			<div id="ioa_customtemplate" class="ioa_query_box">
				
				<?php 
                        $pmb = '';
                        $post_meta_shortcodes = array("post_author" => array("name" => __("Post Author", 'ioa'), "syntax" => '[post_author_posts_link/]'), "post_date" => array("name" => __("Post Date", 'ioa'), "syntax" => '[post_date format=\'l, F d S, Y\'/]'), "post_time" => array("name" => __("Post Time", 'ioa'), "syntax" => '[post_time format=\'g:i a\'/]'), "post_tags" => array("name" => __("Post Tags", 'ioa'), "syntax" => '[post_tags sep=\',\' icon=\'\' /]'), "post_categories" => array("name" => __("Post Categories", 'ioa'), "syntax" => '[post_categories sep=\',\' icon=\'\' /]'), "get" => array("name" => __("Post Meta", 'ioa'), "syntax" => '[get name=\'\' /]'), "post_comments" => array("name" => __("Post Comments", 'ioa'), "syntax" => "[post_comments /]"));
                        foreach ($post_meta_shortcodes as $sh) {
                            $pmb .= " <a href=\"" . $sh['syntax'] . "\">" . $sh['name'] . "</a> ";
                        }
                        global $registered_posts;
                        $cps = array();
                        foreach ($registered_posts as $rs) {
                            if ($rs->getPostType() != "testimonial" && $rs->getPostType() != "slider" && $rs->getPostType() != "custompost" && $rs->getPostType() != $ioa_portfolio_slug) {
                                $cps[] = $rs->getPostType();
                            }
                        }
                        $fitsv = '';
                        if (isset($cps[0])) {
                            $fitsv = $cps[0];
                        }
                        ?>
 				<div class="ioa-query-box"> <?php 
                        echo getIOAInput(array("label" => __("Select Post Type", 'ioa'), "name" => "custom_post_type", "default" => $fitsv, "type" => "select", "description" => "", "length" => 'medium', "value" => $custom_post_type, "options" => $cps));
                        echo getIOAInput(array("label" => __("Generate Filters", 'ioa'), "name" => "custom_query_filter", "default" => "", "type" => "text", "description" => "", "length" => 'medium', "class" => 'has-input-button', "value" => $custom_query_filter, 'addMarkup' => '<a href="" class="button-default query-maker">' . __('Filter Posts', 'ioa') . '</a>'));
                        ?>
 </div> <?php 
                        echo getIOAInput(array("label" => __("Enable lightbox icon on hover (if false link icon will show)", 'ioa'), "name" => "custom_enable_thumbnail", "default" => $super_options[SN . '_enable_thumbnail'], "type" => "toggle", "length" => 'medium', "value" => $custom_enable_thumbnail));
                        echo getIOAInput(array("label" => __("Custom Posts Items Limit", 'ioa'), "name" => "custom_posts_item_limit", "type" => "slider", "max" => 50, "default" => 6, "value" => $ioa_custom_posts_item_limit, "suffix" => "Items"));
                        ?>
 			
 			
			</div>
			<?php 
                    }
                    ?>
	

			<?php 
                }
                ?>


			

		</div>		

		 <?php 
            }
예제 #10
0
파일: functions.php 프로젝트: phupx/genco
function get_all_layer_sliders()
{
    if (!is_layer_slider_activated()) {
        return;
    }
    $sliders = array();
    if (function_exists('lsSliders')) {
        $all_sliders = lsSliders(1000000, true, true);
        if (!empty($all_sliders)) {
            foreach ($all_sliders as $slider) {
                $sliders[$slider['id']] = $slider['name'];
            }
        }
    }
    return $sliders;
}