function vntd_services_title_config()
{
    global $post;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $title = $icon = $desc = '';
    if (isset($custom["title"][0])) {
        $title = $custom["title"][0];
    }
    if (isset($custom["icon"][0])) {
        $icon = $custom["icon"][0];
    }
    if (isset($custom["desc"][0])) {
        $desc = $custom["desc"][0];
    }
    ?>
	<div class="metabox-options form-table fullwidth-metabox image-upload-dep">
		
		<div class="metabox-option">
			<h6><?php 
    _e('Title', 'veented_backend');
    ?>
:</h6>
			<input type="text" name="title" value="<?php 
    echo $title;
    ?>
">
		</div>
		
		<div class="metabox-option">
			<h6><?php 
    _e('Description', 'veented_backend');
    ?>
:</h6>
			<textarea name="desc"><?php 
    echo $desc;
    ?>
</textarea>
		</div>		
		
		<div class="metabox-option">
			<h6><?php 
    _e('Font-Awesome Icon', 'veented_backend');
    ?>
:</h6>
			<?php 
    vntd_create_dropdown('icon', vntd_fontawesome_array(), $icon);
    ?>
		</div>
		
	</div>
<?php 
}
function vntd_portfolio_extra_settings_config()
{
    global $post;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $link_type = $home_button = $home_button_link = $portfolio_external_url = '';
    if (isset($custom["link_type"][0])) {
        $link_type = $custom["link_type"][0];
    }
    if (isset($custom["portfolio_external_url"][0])) {
        $portfolio_external_url = $custom["portfolio_external_url"][0];
    }
    ?>

	<div class="metabox-options form-table fullwidth-metabox image-upload-dep">
		
		<div class="metabox-option">
			<h6><?php 
    _e('Thumbnail Link Type', 'veented_backend');
    ?>
:</h6>
			
			<?php 
    $link_type_arr = array('Default - content loaded with Ajax' => 'default', 'Direct Link - post opens in new page' => 'direct', 'External Link - thumbnail links to external URL' => 'external');
    vntd_create_dropdown('link_type', $link_type_arr, $link_type, true);
    ?>
			<p class="description">Choose if the post content should be loaded dynamically with Ajax or opened in a new tab/window.</p>
		</div>
		
		<div class="metabox-option fold fold-link_type fold-external" <?php 
    if ($link_type != "external") {
        echo 'style="display:none;"';
    }
    ?>
>
			<h6><?php 
    _e('External URL', 'veented_backend');
    ?>
:</h6>
			
			<input type="text" name="portfolio_external_url" value="<?php 
    echo $portfolio_external_url;
    ?>
">
			
		</div>
		
		
	</div>

<?php 
}
Example #3
0
function vntd_page_settings_config()
{
    global $post, $smof_data;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $page_header = $page_subtitle = $navbar_style = $navbar_color = $page_layout = $page_sidebar = $page_width = $footer_color = $footer_widgets = '';
    if (array_key_exists("page_header", $custom)) {
        $page_header = $custom["page_header"][0];
    }
    if (array_key_exists("page_subtitle", $custom)) {
        $page_subtitle = $custom["page_subtitle"][0];
    }
    if (array_key_exists("navbar_style", $custom)) {
        $navbar_style = $custom["navbar_style"][0];
    }
    if (array_key_exists("navbar_color", $custom)) {
        $navbar_color = $custom["navbar_color"][0];
    }
    if (array_key_exists("page_layout", $custom)) {
        $page_layout = $custom["page_layout"][0];
    }
    if (array_key_exists("page_sidebar", $custom)) {
        $page_sidebar = $custom["page_sidebar"][0];
    }
    if (array_key_exists("page_width", $custom)) {
        $page_width = $custom["page_width"][0];
    }
    if (array_key_exists("footer_color", $custom)) {
        $footer_color = $custom["footer_color"][0];
    }
    if (array_key_exists("footer_widgets", $custom)) {
        $footer_widgets = $custom["footer_widgets"][0];
    }
    ?>
    <div class="metabox-options form-table side-options">
  		
		<div id="page-header" class="label-radios">  		
			<h5><?php 
    _e('Page Title', 'veented_backend');
    ?>
:</h5>
    	    <?php 
    $headers = array('Enabled' => "default", 'No Page Title' => 'no-header');
    vntd_create_dropdown('page_header', $headers, $page_header);
    ?>
    	    
    	</div>
    	
    	<div id="vntd_page_header_default" <?php 
    if ($page_header != "default" && $page_header) {
        echo 'class="hidden"';
    }
    ?>
>
    		<h5><?php 
    _e('Page Tagline', 'veented_backend');
    ?>
:</h5>
    		<input type="text" name="page_subtitle" value="<?php 
    echo $page_subtitle;
    ?>
">
    	</div>
    	
    	<div id="navbar-style">  		
    		<h5><?php 
    _e('Header Style', 'veented_backend');
    ?>
:</h5>
    	    <?php 
    $navbar_styles = array('Default set in Theme Options' => "default", 'Style1' => 'style1', 'Style2' => 'style2', 'Style3' => 'style3', 'Disable' => 'disable');
    vntd_create_dropdown('navbar_style', $navbar_styles, $navbar_style);
    ?>
    	    
    	</div>
    	
    	<div id="navbar-color">  		
    		<h5><?php 
    _e('Header Color', 'veented_backend');
    ?>
:</h5>
    	    <?php 
    $navbar_colors = array('Default set in Theme Options' => "default", 'White' => 'white', 'Dark' => 'dark');
    vntd_create_dropdown('navbar_color', $navbar_colors, $navbar_color);
    ?>
    	    
    	</div>
    	
    	<?php 
    if (get_post_type(get_the_id()) == 'portfolio') {
    } else {
        ?>
    	
    	<div class="metabox-option">
			<h5><?php 
        _e('Layout', 'veented_backend');
        ?>
:</h5>
			
			<?php 
        if (!$page_layout) {
            $page_layout = $smof_data['vntd_default_layout'];
        }
        $page_layout_arr = array('Right Sidebar' => 'sidebar_right', 'Left Sidebar' => 'sidebar_left', "Fullwidth" => 'fullwidth');
        vntd_create_dropdown('page_layout', $page_layout_arr, $page_layout, true);
        ?>
		</div>
		<div class="metabox-option fold fold-page_layout fold-sidebar_right fold-sidebar_left" <?php 
        if ($page_layout == "fullwidth" || !$page_layout) {
            echo 'style="display:none;"';
        }
        ?>
>
			<h5><?php 
        _e('Page Sidebar', 'veented_backend');
        ?>
:</h5>
			<select name="page_sidebar" class="select"> 
                <option value="Default Sidebar"<?php 
        if ($page_sidebar == "Default Sidebar" || !$page_sidebar) {
            echo "selected";
        }
        ?>
>Default Sidebar</option>
            	<?php 
        // Retrieve custom sidebars
        $sidebars = $smof_data['sidebar_generator'];
        if (isset($sidebars) && sizeof($sidebars) > 0) {
            foreach ($sidebars as $sidebar) {
                ?>
                
				<option value="<?php 
                echo $sidebar['title'];
                ?>
"<?php 
                if ($page_sidebar == $sidebar['title']) {
                    echo "selected";
                }
                ?>
><?php 
                echo $sidebar['title'];
                ?>
</option>
                
				<?php 
            }
        }
        if (class_exists('Woocommerce')) {
            if ($page_sidebar == "WooCommerce Shop Page") {
                $selected_shop = "selected";
            }
            if ($page_sidebar == "WooCommerce Product Page") {
                $selected_product = "selected";
            }
            echo '<option value="WooCommerce Shop Page" ' . $selected_shop . '>WooCommerce Shop Page</option>';
            echo '<option value="WooCommerce Product Page" ' . $selected_product . '>WooCommerce Product Page</option>';
        }
        ?>
            	

            </select>
		</div>
		
		<?php 
    }
    ?>

		<?php 
    if (get_post_type(get_the_id()) == 'post') {
        ?>
		<div class="metabox-option fold fold-page_layout fold-fullwidth" <?php 
        if ($page_layout != "fullwidth" && get_post_type(get_the_id()) != 'portfolio') {
            echo 'style="display:none;"';
        }
        ?>
>
			<h5><?php 
        _e('Page Content Width', 'veented_backend');
        ?>
:</h5>
			
			<?php 
        if (!$page_layout) {
            $page_layout = $smof_data['vntd_default_layout'];
        }
        $page_width_arr = array('Container' => 'content', 'Fullwidth' => 'fullwidth');
        vntd_create_dropdown('page_width', $page_width_arr, $page_width, true);
        ?>
		</div>
		<?php 
    } else {
        ?>
		<div class="metabox-option fold fold-page_layout fold-fullwidth" <?php 
        if ($page_layout != "fullwidth" && get_post_type(get_the_id()) != 'portfolio') {
            echo 'style="display:none;"';
        }
        ?>
>
			<h5><?php 
        _e('Page Content Width', 'veented_backend');
        ?>
:</h5>
			
			<?php 
        if (!$page_layout) {
            $page_layout = $smof_data['vntd_default_layout'];
        }
        $page_width_arr = array('Fullwidth' => 'fullwidth', 'Container' => 'content');
        vntd_create_dropdown('page_width', $page_width_arr, $page_width, true);
        ?>
		</div>
		
		<?php 
    }
    ?>
		
		<div id="footer-color">  		
			<h5><?php 
    _e('Footer Color', 'veented_backend');
    ?>
:</h5>
		    <?php 
    $footer_colors = array('Default set in Theme Options' => "default", 'White' => 'white', 'Dark' => 'dark');
    vntd_create_dropdown('footer_color', $footer_colors, $footer_color);
    ?>
		    
		</div>
		
		<div id="footer-color">  		
			<h5><?php 
    _e('Footer Widgets Area', 'veented_backend');
    ?>
:</h5>
		    <?php 
    $footer_widgets_arr = array('Default set in Theme Options' => "default", 'Enabled' => 'enabled', 'Disabled' => 'disabled');
    vntd_create_dropdown('footer_widgets', $footer_widgets_arr, $footer_widgets);
    ?>
		    
		</div>
        
    </div>
<?php 
}
Example #4
0
function vntd_blog_gallery_settings_config()
{
    global $post;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $gallery_type = $gallery_images = '';
    if (isset($custom["gallery_type"][0])) {
        $gallery_type = $custom["gallery_type"][0];
    }
    if (isset($custom["gallery_images"][0])) {
        $gallery_images = $custom["gallery_images"][0];
    }
    ?>
    <div class="form-table custom-table fullwidth-metabox">
    	<!--<div class="metabox-option">
    		<h6><?php 
    _e('Gallery Type', 'veented_backend');
    ?>
:</h6>
    	    <div class="metabox-option-side">
    	    <?php 
    $gallery_types = array("Lightbox" => "lightbox", "Slider" => "slider");
    vntd_create_dropdown('gallery_type', $gallery_types, $gallery_type);
    ?>
    	    </div>
    	</div>-->
    	<div class="metabox-option">
    		<h6><?php 
    _e('Gallery Images', 'veented_backend');
    ?>
:</h6> 
    		
    		<div class="metabox-option-side">
    		<?php 
    vntd_gallery_metabox($gallery_images);
    ?>
	 
    		</div>  
    	</div>   
    </div>
<?php 
}
function vntd_pagetitle_config()
{
    global $post, $smof_data;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $customize_enable = $customize_textcolor = $customize_bgcolor = $customize_bg_image = $customize_textalign = $customize_bgimage = $customize_breadcrumbs = $customize_fontsize = $customize_fontweight = $customize_texttransform = $customize_height = $customize_animated = '';
    if (array_key_exists("customize_enable", $custom)) {
        $customize_enable = $custom["customize_enable"][0];
    }
    if (array_key_exists("customize_textcolor", $custom)) {
        $customize_textcolor = $custom["customize_textcolor"][0];
    }
    if (array_key_exists("customize_bgcolor", $custom)) {
        $customize_bgcolor = $custom["customize_bgcolor"][0];
    }
    if (array_key_exists("customize_bgimage", $custom)) {
        $customize_bgimage = $custom["customize_bgimage"][0];
    }
    if (array_key_exists("customize_textalign", $custom)) {
        $customize_textalign = $custom["customize_textalign"][0];
    }
    if (array_key_exists("customize_fontweight", $custom)) {
        $customize_fontweight = $custom["customize_fontweight"][0];
    }
    if (array_key_exists("customize_fontsize", $custom)) {
        $customize_fontsize = $custom["customize_fontsize"][0];
    }
    if (array_key_exists("customize_texttransform", $custom)) {
        $customize_texttransform = $custom["customize_texttransform"][0];
    }
    if (array_key_exists("customize_breadcrumbs", $custom)) {
        $customize_breadcrumbs = $custom["customize_breadcrumbs"][0];
    }
    if (array_key_exists("customize_height", $custom)) {
        $customize_height = $custom["customize_height"][0];
    }
    if (array_key_exists("customize_animated", $custom)) {
        $customize_animated = $custom["customize_animated"][0];
    }
    wp_enqueue_style('wp-color-picker');
    wp_enqueue_script('wp-color-picker', '', '', '', true);
    ?>
    <div class="metabox-options form-table side-options pagetitle-customize">
  		
  		<div id="customize_textcolor">  		
  		    <?php 
    $arr_enable = array("Don't use a custom page title" => 'no', 'Use a custom page title' => "yes");
    vntd_create_dropdown('customize_enable', $arr_enable, $customize_enable);
    ?>
  		    
  		</div>	
    	
    	<?php 
    $extra_class = 'hidden';
    if ($customize_enable == 'yes') {
        $extra_class = ' not-hidden';
    }
    ?>
    	<div id="customize_textalign" class="hidden <?php 
    echo esc_attr($extra_class);
    ?>
">  		
    		<h5><?php 
    _e('Text Align', 'veented_backend');
    ?>
:</h5>
    		
    	    <?php 
    $arr_textalign = array('Left' => "left", 'Center' => "center");
    vntd_create_dropdown('customize_textalign', $arr_textalign, $customize_textalign);
    ?>
    	    
    	</div> 	
    	
    	<div id="customize_breadcrumbs" class="hidden <?php 
    echo esc_attr($extra_class);
    ?>
">  		
    		<h5><?php 
    _e('Breadcrumbs', 'veented_backend');
    ?>
:</h5>
    		
    	    <?php 
    $arr_breadcrumbs = array('Enabled' => "enabled", 'Disabled' => 'disabled');
    vntd_create_dropdown('customize_breadcrumbs', $arr_breadcrumbs, $customize_breadcrumbs);
    ?>
    	    
    	</div>
    	
    	<div id="customize_fontweight" class="hidden <?php 
    echo esc_attr($extra_class);
    ?>
">  		
    		<h5><?php 
    _e('Title Font Weight', 'veented_backend');
    ?>
:</h5>
    		
    	    <?php 
    $arr_fontweight = array('Normal' => "normal", 'Bold' => 700, 'Extra Bold' => 800);
    vntd_create_dropdown('customize_fontweight', $arr_fontweight, $customize_fontweight);
    ?>
    	    
    	</div>
    	
    	<div id="customize_fontsize" class="hidden <?php 
    echo esc_attr($extra_class);
    ?>
">  		
    		<h5><?php 
    _e('Title Font Size', 'veented_backend');
    ?>
:</h5>
    		
    	    <?php 
    $arr_fontsize = array('30' => 30, '32' => 32, '36' => 36, '40' => 40, '44' => 44, '48' => 48, '52' => 52, '56' => 56, '60' => 60, '64' => 64, '68' => 68, '72' => 72, '76' => 76);
    vntd_create_dropdown('customize_fontsize', $arr_fontsize, $customize_fontsize);
    ?>
    	    
    	</div>
    	
    	<div id="customize_texttransform" class="hidden <?php 
    echo $extra_class;
    ?>
">  		
    		<h5><?php 
    _e('Text Transform', 'veented_backend');
    ?>
:</h5>
    		
    	    <?php 
    $arr_texttransform = array('Normal' => "normal", 'Uppercase' => "uppercase");
    vntd_create_dropdown('customize_texttransform', $arr_texttransform, $customize_texttransform);
    ?>
    	    
    	</div>
    	
    	<div id="customize_height" class="hidden <?php 
    echo $extra_class;
    ?>
">  		
    		<h5><?php 
    _e('Page Title Height', 'veented_backend');
    ?>
:</h5>
    		
    	    <input type="text/css" value="<?php 
    if (!$customize_height) {
        echo '80';
    } else {
        echo $customize_height;
    }
    ?>
" name="customize_height">
    	    
    	</div>
    	
		<div id="customize_textcolor" class="hidden <?php 
    echo $extra_class;
    ?>
">  		
			<h5><?php 
    _e('Text Color', 'veented_backend');
    ?>
:</h5>

		    <input name="customize_textcolor" type="text" value="<?php 
    echo $customize_textcolor;
    ?>
" class="wp-color-picker">
		</div>
    	
		<div id="customize_bgcolor" class="hidden <?php 
    echo $extra_class;
    ?>
">  		
			<h5><?php 
    _e('Background Color', 'veented_backend');
    ?>
:</h5>

		    <input name="customize_bgcolor" type="text" value="<?php 
    echo $customize_bgcolor;
    ?>
" class="wp-color-picker">
		</div>
		
		<div id="customize_bgimage" class="hidden image-upload image-upload-dep <?php 
    echo $extra_class;
    ?>
">  		
			<h5><?php 
    _e('Background Image', 'veented_backend');
    ?>
:</h5>

		    <input name="customize_bgimage" type="hidden" value="<?php 
    echo $customize_bgimage;
    ?>
" class="image-upload-data">
		    <div class="image-upload-preview show-on-upload" <?php 
    if ($customize_bgimage) {
        echo 'style="display:block;"';
    }
    ?>
>
		    	<?php 
    $imgurl = '';
    if ($customize_bgimage) {
        $imgurl = wp_get_attachment_image_src($customize_bgimage, 'thumbnail');
        $imgurl = $imgurl[0];
    }
    ?>
		    	<img src="<?php 
    echo $imgurl;
    ?>
">
		    </div>
		    <div class="button add-single-image"><?php 
    if ($customize_bgimage) {
        _e('Change image', 'vntd_qaro');
    } else {
        _e('Upload image', 'vntd_qaro');
    }
    ?>
</div>
		    <div class="button remove-single-image show-on-upload" <?php 
    if ($customize_bgimage) {
        echo 'style="display:inline-block;"';
    }
    ?>
>Remove image</div>
		</div>
		
		<div id="customize_breadcrumbs" class="hidden <?php 
    echo $extra_class;
    ?>
">  		
			<h5><?php 
    _e('Animated', 'veented_backend');
    ?>
:</h5>
			
		    <?php 
    $arr_animated = array('No' => "no", 'Yes' => 'yes');
    vntd_create_dropdown('customize_animated', $arr_animated, $customize_animated);
    ?>
		    
		</div>

        
    </div>
<?php 
}