示例#1
0
function waxom_portfolio_extra_settings_config()
{
    global $post;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $link_type = $portfolio_external_url = $portfolio_post_excerpt = '';
    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];
    }
    if (isset($custom["portfolio_post_excerpt"][0])) {
        $portfolio_post_excerpt = $custom["portfolio_post_excerpt"][0];
    }
    ?>

	<div class="metabox-options form-table fullwidth-metabox image-upload-dep">
	
		<div class="metabox-option">
			<h6><?php 
    esc_html_e('Optional post excerpt', 'waxom');
    ?>
:</h6>
			<?php 
    if (is_null($portfolio_post_excerpt)) {
        $portfolio_post_excerpt = '';
    }
    ?>
			<textarea name="portfolio_post_excerpt" class="portfolio_post_excerpt"><?php 
    echo esc_textarea($portfolio_post_excerpt);
    ?>
</textarea>
			
		</div>
		
		<div class="metabox-option">
			<h6><?php 
    esc_html_e('Thumbnail Link Type', 'waxom');
    ?>
:</h6>
			
			<?php 
    $link_type_arr = array('Default - according to Portfolio Grid settings' => 'default', 'Always link - even if Portfolio Grid type is set to Lightbox, this post will open in a new page' => 'link', 'External Link - thumbnail links to external URL' => 'external');
    waxom_create_dropdown('link_type', $link_type_arr, $link_type, true);
    ?>
		</div>
		
		<div class="metabox-option fold fold-link_type fold-external" <?php 
    if ($link_type != "external") {
        echo 'style="display:none;"';
    }
    ?>
>
			<h6><?php 
    esc_html_e('External URL', 'waxom');
    ?>
:</h6>
			
			<input type="text" name="portfolio_external_url" value="<?php 
    echo esc_url($portfolio_external_url);
    ?>
">
			
		</div>
		
		
		
		
	</div>

<?php 
}
示例#2
0
    function vntd_slider_settings()
    {
        global $post;
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
            return $post_id;
        }
        $custom = get_post_custom($post->ID);
        $heading_weight = $heading_texttransform = $heading_size = $heading_weight = $text_color = $content_align = $button1_color = $button1_style = $button2_color = $button1_color_hover = $button2_color_hover = $button2_style = $slide_overlay = $slide_height = $offset_top = $fullscreen = '';
        if (isset($custom["heading_weight"][0])) {
            $heading_weight = $custom["heading_weight"][0];
        }
        if (isset($custom["heading_texttransform"][0])) {
            $heading_texttransform = $custom["heading_texttransform"][0];
        }
        if (isset($custom["heading_size"][0])) {
            $heading_size = $custom["heading_size"][0];
        }
        if (isset($custom["heading_weight"][0])) {
            $heading_weight = $custom["heading_weight"][0];
        }
        if (isset($custom["text_color"][0])) {
            $text_color = $custom["text_color"][0];
        }
        if (isset($custom["content_align"][0])) {
            $content_align = $custom["content_align"][0];
        }
        if (isset($custom["button1_color"][0])) {
            $button1_color = $custom["button1_color"][0];
        }
        if (isset($custom["button1_color_hover"][0])) {
            $button1_color_hover = $custom["button1_color_hover"][0];
        }
        if (isset($custom["button1_style"][0])) {
            $button1_style = $custom["button1_style"][0];
        }
        if (isset($custom["button2_color"][0])) {
            $button2_color = $custom["button2_color"][0];
        }
        if (isset($custom["button2_color_hover"][0])) {
            $button2_color_hover = $custom["button2_color_hover"][0];
        }
        if (isset($custom["button2_style"][0])) {
            $button2_style = $custom["button2_style"][0];
        }
        if (isset($custom["slide_overlay"][0])) {
            $slide_overlay = $custom["slide_overlay"][0];
        }
        if (isset($custom["offset_top"][0])) {
            $offset_top = $custom["offset_top"][0];
        }
        ?>
	
		<div class="metabox-options form-table fullwidth-metabox image-upload-dep">
			
			<h2 class="metabox-title">Basic Settings</h2>
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Slide Overlay', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_slide_overlay = array('None' => "none", 'Dark' => "dark", 'Darker' => "darker");
        waxom_create_dropdown('slide_overlay', $arr_slide_overlay, $slide_overlay);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Content Align', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_content_align = array('Center' => "center", 'Left' => "left", 'Right' => "right");
        waxom_create_dropdown('content_align', $arr_content_align, $content_align);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Text Color', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_text_color = array('White' => "white", 'Dark' => "dark");
        waxom_create_dropdown('text_color', $arr_text_color, $text_color);
        ?>
	
			</div>
			
			<h2 class="metabox-title">Advanced Settings</h2>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Main Heading Font Size', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_heading_size = array('48' => 48, '52' => 52, '56' => 56, '60' => 60, '64' => 64, '68' => 68, '72' => 72, '76' => 76, '80' => 80, '88' => 88);
        if (!$heading_size) {
            $heading_size = 56;
        }
        waxom_create_dropdown('heading_size', $arr_heading_size, $heading_size);
        ?>

			</div>
			
			<!--<div class="metabox-option">
				<h6><?php 
        esc_html_e('Heading Text Transform', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_heading_texttransform = array('Normal' => "normal", 'Uppercase' => "uppercase");
        waxom_create_dropdown('heading_texttransform', $arr_heading_texttransform, $heading_texttransform);
        ?>

			</div>-->
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Button 1 Color', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_button1_color = array('Accent' => "accent", 'Accent 2' => "accent2", 'Accent 3' => "accent3", 'Accent 4' => "accent4", 'White' => "white");
        if (!$button1_color) {
            $button1_color = 'accent3';
        }
        waxom_create_dropdown('button1_color', $arr_button1_color, $button1_color);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Button 1 Hover Color', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_button1_color_hover = array('Accent' => "accent", 'Accent 2' => "accent2", 'Accent 3' => "accent3", 'Accent 4' => "accent4", 'White' => "white");
        if (!$button1_color_hover) {
            $button1_color_hover = 'white';
        }
        waxom_create_dropdown('button1_color_hover', $arr_button1_color_hover, $button1_color_hover);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Button 1 Style', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_button1_style = array('Default' => "default", 'Stroke (Outline)' => "stroke");
        waxom_create_dropdown('button1_style', $arr_button1_style, $button1_style);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Button 2 Color', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_button2_color = array('Accent' => "accent", 'Accent 2' => "accent2", 'Accent 3' => "accent3", 'Accent 4' => "accent4", 'White' => "white");
        if (!$button2_color) {
            $button2_color = 'white';
        }
        waxom_create_dropdown('button2_color', $arr_button2_color, $button2_color);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Button 2 Hover Color', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_button2_color_hover = array('Accent' => "accent", 'Accent 2' => "accent2", 'Accent 3' => "accent3", 'Accent 4' => "accent4", 'White' => "white");
        if (!$button2_color_hover) {
            $button2_color_hover = 'white';
        }
        waxom_create_dropdown('button2_color_hover', $arr_button2_color_hover, $button2_color_hover);
        ?>

			</div>
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Button 2 Style', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_button2_style = array('Default' => "default", 'Stroke (Outline)' => "stroke");
        if (!$button2_style) {
            $button2_style = 'stroke';
        }
        waxom_create_dropdown('button2_style', $arr_button2_style, $button2_style);
        ?>

			</div>
			
			<div class="metabox-separator"></div>
			
			
			<div class="metabox-option">
				<h6><?php 
        esc_html_e('Content Offset Top', 'waxom');
        ?>
:</h6>
				
				<?php 
        $arr_offset_top = array('0' => 0, '10' => 10, '20' => 20, '30' => 30, '40' => 40, '50' => 50, '60' => 60, '70' => 70);
        if (!$offset_top) {
            $offset_top = 0;
        }
        waxom_create_dropdown('offset_top', $arr_offset_top, $offset_top);
        ?>

			</div>
				
			
		</div>
	
	<?php 
    }
示例#3
0
function waxom_blog_post_settings_config()
{
    global $post;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_id;
    }
    $custom = get_post_custom($post->ID);
    $thumb_setting = $thumb_height = $thumb_lightbox = '';
    if (isset($custom["thumb_setting"][0])) {
        $thumb_setting = $custom["thumb_setting"][0];
    }
    if (isset($custom["thumb_height"][0])) {
        $thumb_height = $custom["thumb_height"][0];
    }
    if (isset($custom["thumb_lightbox"][0])) {
        $thumb_lightbox = $custom["thumb_lightbox"][0];
    }
    ?>
    <div class="form-table custom-table fullwidth-metabox">
    	<div class="metabox-option">
    	    		
    	    <h6><?php 
    esc_html_e('Thumbnail Display', 'waxom');
    ?>
:</h6>
    	    <div class="metabox-option-side">    	    
    	    <?php 
    $thumb_setting_arr = array("Display thumbnail on single post page" => "on", "Do NOT display the thumbnail on post page" => "off");
    waxom_create_dropdown('thumb_setting', $thumb_setting_arr, $thumb_setting);
    ?>
   	    
    	    </div>
    	</div>
    	<div class="metabox-option">    		
    	    <h6><?php 
    esc_html_e('Thumbnail Lightbox', 'waxom');
    ?>
: <span class="form-caption">(<?php 
    esc_html_e('standard post format', 'waxom');
    ?>
)</span></h6>
    	    <div class="metabox-option-side">   	    
    	    <?php 
    $thumb_lightbox_arr = array("Disable lightbox" => "off", "Enable lightbox zoom of thumbnail image" => "on");
    waxom_create_dropdown('thumb_lightbox', $thumb_lightbox_arr, $thumb_lightbox);
    ?>
    

    	    </div>
    	</div>
    	<div class="metabox-option">  
            <h6><?php 
    esc_html_e('Thumbnail Height', 'waxom');
    ?>
:</h6>
            <div class="metabox-option-side">            
        	<?php 
    $thumb_heights = array("Landscape" => "landscape", "Original Aspect Ratio" => "auto");
    waxom_create_dropdown('thumb_height', $thumb_heights, $thumb_height);
    ?>
        
            </div> 
       </div> 
        
    </div> 
<?php 
}