Example #1
0
    echo '<h2 class="nav-tab-wrapper">';
    foreach ($tabs as $tab => $name) {
        $class = $tab == $current ? ' nav-tab-active' : '';
        echo "<a class='nav-tab{$class}' href='#{$tab}'>{$name}</a>";
    }
    echo '</h2>';
}
$demotheme_options = get_option('demotheme_options');
$site_logo = isset($demotheme_options['site_logo']) ? demotheme_escape_attr($demotheme_options['site_logo']) : '';
$clients_images = isset($demotheme_options['clients_images']) ? demotheme_escape_attr($demotheme_options['clients_images']) : '';
$fb_url = isset($demotheme_options['fb_url']) ? demotheme_escape_attr($demotheme_options['fb_url']) : '';
$tw_url = isset($demotheme_options['tw_url']) ? demotheme_escape_attr($demotheme_options['tw_url']) : '';
$li_url = isset($demotheme_options['li_url']) ? demotheme_escape_attr($demotheme_options['li_url']) : '';
$gp_url = isset($demotheme_options['gp_url']) ? demotheme_escape_attr($demotheme_options['gp_url']) : '';
$yt_url = isset($demotheme_options['yt_url']) ? demotheme_escape_attr($demotheme_options['yt_url']) : '';
$cpy_text = isset($demotheme_options['cpy_text']) ? demotheme_escape_attr($demotheme_options['cpy_text']) : '';
?>
<div class="wrap demotheme-settings-page">
    
    <h2><?php 
_e('Theme Options', 'demotheme');
?>
</h2>

    <?php 
if (isset($_GET['settings-updated'])) {
    echo '<div class="updated"> 
                    <p><strong>' . __('Settings saved.', 'demotheme') . '</strong></p>
                </div>';
}
?>
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
global $post;
$prefix = DEMOTHEME_META_PREFIX;
$post_id = $post->ID;
$product_images = get_post_meta($post_id, $prefix . 'product_images', true);
$product_title = get_post_meta($post_id, $prefix . 'product_title', true);
$product_title = !empty($product_title) ? demotheme_escape_attr($product_title) : '';
$product_desc = get_post_meta($post_id, $prefix . 'product_desc', true);
$product_desc = !empty($product_desc) ? demotheme_escape_attr($product_desc) : '';
$product_video_url = get_post_meta($post_id, $prefix . 'product_video_url', true);
$product_video_url = !empty($product_video_url) ? demotheme_escape_attr($product_video_url) : '';
?>
<table class="form-table demotheme-form-table">
    
    <tr>
        <td>
            <label for="<?php 
echo $prefix;
?>
product_title"><?php 
_e('Product Title', 'demotheme');
?>
</label>
        </td>
        <td>
            <input type="text" name="<?php