コード例 #1
0
function wppb_text_display($option, $wppb_design_settings, $title, $minimum = '')
{
    if ('yes' != $minimum) {
        echo '<div class="section-layout">';
    }
    // Only display title if one is set
    if ('' != $title) {
        echo '<h2>' . $title . '</h2>';
    }
    wppb_fontfamily_selector($option . '_fontfamily', $wppb_design_settings, __('Font', 'wppb_lang'), 'block fontfamily');
    wppb_number_selector($option . '_fontsize', $wppb_design_settings, __('Size', 'wppb_lang'), 'block fontsize');
    wppb_colour_selector($option . '_textcolour', $wppb_design_settings, __('Colour', 'wppb_lang'), 'block colour');
    wppb_fontweight_selector($option . '_font_weight', $wppb_design_settings, __('Weight', 'wppb_lang'), 'block fontweight');
    wppb_fontstyle_selector($option . '_font_style', $wppb_design_settings, __('Style', 'wppb_lang'), 'block fontstyle');
    wppb_number_selector($option . '_line_height', $wppb_design_settings, __('Line height', 'wppb_lang'), 'block lineheight');
    wppb_textdecoration_selector($option . '_textdecoration', $wppb_design_settings, __('Decoration', 'wppb_lang'), 'block decoration');
    wppb_texttranform_selector($option . '_text_transform', $wppb_design_settings, __('Transform', 'wppb_lang'), 'block transform');
    wppb_smallcaps_selector($option . '_small_caps', $wppb_design_settings, __('Small caps', 'wppb_lang'), 'block smallcaps');
    // Split textshadow into separate chunk
    if ('yes' != $minimum) {
        echo "</div>\n\t<div class='section-layout'>\n<div class='chunk textshadow'>\n\t<h2>Text shadow</h2>";
    } else {
        echo "\n<h3>Text shadow</h3>\n";
    }
    // Text shadow section
    echo '
		';
    wppb_number_selector($option . '_shadow_x_coordinate', $wppb_design_settings, __('x-coord', 'wppb_lang'), 'block coordinates');
    wppb_number_selector($option . '_shadow_y_coordinate', $wppb_design_settings, __('y-coord', 'wppb_lang'), 'block coordinates');
    wppb_number_selector($option . '_shadow_blur_radius', $wppb_design_settings, __('Blur radius', 'wppb_lang'), 'block coordinates');
    wppb_colour_selector($option . '_shadow_colour', $wppb_design_settings, __('Colour', 'wppb_lang'), 'block colour');
    //wppb_number_selector( $option . '_shadow_opacity', $wppb_design_settings, __( 'Opacity', 'wppb_lang' ) );
    // Split textshadow into separate chunk
    if ('yes' != $minimum) {
        echo "\t</div>\n";
    }
    if ('yes' != $minimum) {
        echo "</div>\n";
    }
}
コード例 #2
0
ファイル: content.php プロジェクト: pemiu01/wppaintbrush
function wppb_content_editor_tab()
{
    $wppb_design_settings = get_option(WPPB_DESIGNER_SETTINGS);
    // Add HTML
    ?>
<div id="menudesign_options">
	<div id="tabs-text" class="inner-tabber">
		<ul>
			<li id="wppb_overall_options"><a href="#overall_options" title="<?php 
    _e('Overall', 'wppb_lang');
    ?>
"><?php 
    _e('Overall', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_maincontent_options"><a href="#maincontent_options" title="<?php 
    _e('Main content', 'wppb_lang');
    ?>
"><?php 
    _e('Main <br />content', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_postinfo_options"><a href="#postinfo_options" title="<?php 
    _e('Post info.', 'wppb_lang');
    ?>
"><?php 
    _e('Post info', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_pagination_options"><a href="#pagination_options" title="<?php 
    _e('Pagination', 'wppb_lang');
    ?>
"><?php 
    _e('Pagination', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_h1_options"><a href="#h1_options" title="<?php 
    _e('Heading 1', 'wppb_lang');
    ?>
"><?php 
    _e('H1', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_h2_options"><a href="#h2_options" title="<?php 
    _e('Heading 2', 'wppb_lang');
    ?>
"><?php 
    _e('H2', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_h3_options"><a href="#h3_options" title="<?php 
    _e('Heading 3', 'wppb_lang');
    ?>
"><?php 
    _e('H3', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_h4_options"><a href="#h4_options" title="<?php 
    _e('Heading 4', 'wppb_lang');
    ?>
"><?php 
    _e('H4', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_h5_options"><a href="#h5_options" title="<?php 
    _e('Heading 5', 'wppb_lang');
    ?>
"><?php 
    _e('H5', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_h6_options"><a href="#h6_options" title="<?php 
    _e('Heading 6', 'wppb_lang');
    ?>
"><?php 
    _e('H6', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_p_options"><a href="#p_options" title="<?php 
    _e('Paragraph', 'wppb_lang');
    ?>
"><?php 
    _e('P', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_li_options"><a href="#li_options" title="<?php 
    _e('List item', 'wppb_lang');
    ?>
"><?php 
    _e('LI', 'wppb_lang');
    ?>
</a></li>
			<li id="wppb_a_options"><a href="#a_options" title="<?php 
    _e('Links', 'wppb_lang');
    ?>
"><?php 
    _e('A', 'wppb_lang');
    ?>
</a></li>
		</ul>
		<div class="inner-tab-block" id="overall_options">
			<div class="section-layout">
				<h2><?php 
    _e('Background', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_background('background', $wppb_design_settings);
    ?>
			</div>
		</div>
		<div class="inner-tab-block" id="maincontent_options">
			<?php 
    wppb_text_margins('content', $wppb_design_settings);
    ?>
			<div class="section-layout">
				<h2><?php 
    _e('Background', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_colour_selector('maincontent_background_colour', $wppb_design_settings, __('Colour', 'wppb_lang'));
    ?>
				<?php 
    wppb_background_image_selector('maincontent_background_image', $wppb_design_settings, __('Image', 'wppb_lang'));
    ?>
				<?php 
    wppb_imagetiling_selector('maincontent_background_image_tiling', $wppb_design_settings, __('Image tiling', 'wppb_lang'));
    ?>
			</div>
			<div class="section-layout">
				<h2><?php 
    _e('Width', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_number_selector('maincontent_maximum_width', $wppb_design_settings, __('Max width', 'wppb_lang'));
    ?>
				<?php 
    wppb_number_selector('maincontent_minimum_width', $wppb_design_settings, __('Min width', 'wppb_lang'));
    ?>
			</div>
		</div>
		<div class="inner-tab-block" id="postinfo_options">
			<div class="section-layout">
				<h2><?php 
    _e('Post info', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_display_selector('postinfo_display', $wppb_design_settings, __('Display', 'wppb_lang'));
    ?>
			</div>
			<?php 
    wppb_text_display('postinfo', $wppb_design_settings, __('Text', 'wppb_lang'));
    wppb_text_margins('postinfo', $wppb_design_settings);
    wppb_text_padding('postinfo', $wppb_design_settings);
    wppb_text_background('postinfo', $wppb_design_settings);
    wppb_text_borders_horizontal('postinfo', $wppb_design_settings);
    ?>
		</div>
		<div class="inner-tab-block" id="pagination_options">
			<div class="section-layout">
				<h2><?php 
    _e('Pagination', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_display_selector('pagination_display', $wppb_design_settings, __('Display', 'wppb_lang'));
    wppb_fontfamily_selector('pagination_fontfamily', $wppb_design_settings, __('Font', 'wppb_lang'), 'block fontfamily');
    wppb_number_selector('pagination_fontsize', $wppb_design_settings, __('Size', 'wppb_lang'), 'block fontsize');
    wppb_colour_selector('pagination_textcolour', $wppb_design_settings, __('Colour', 'wppb_lang'), 'block colour');
    wppb_colour_selector('pagination_texthovercolour', $wppb_design_settings, __('Colour on hover', 'wppb_lang'), 'block colour');
    wppb_fontweight_selector('pagination_font_weight', $wppb_design_settings, __('Weight', 'wppb_lang'), 'block fontweight');
    wppb_fontstyle_selector('pagination_font_style', $wppb_design_settings, __('Style', 'wppb_lang'), 'block fontstyle');
    wppb_textdecoration_selector('pagination_textdecoration', $wppb_design_settings, __('Decoration', 'wppb_lang'), 'block decoratoin');
    wppb_texttranform_selector('pagination_text_transform', $wppb_design_settings, __('Transform', 'wppb_lang'), 'block texttransform');
    wppb_smallcaps_selector('pagination_small_caps', $wppb_design_settings, __('Small caps', 'wppb_lang'), 'block smallcaps');
    ?>
			</div>
			<div class="section-layout">
			<h2><?php 
    _e('Text shadow', 'wppb_lang');
    ?>
</h3>
				<?php 
    wppb_number_selector('pagination_shadow_x_coordinate', $wppb_design_settings, __('x-coordinate', 'wppb_lang'), 'block coordinates');
    wppb_number_selector('pagination_shadow_y_coordinate', $wppb_design_settings, __('y-coordinate', 'wppb_lang'), 'block coordinates');
    wppb_number_selector('pagination_shadow_blur_radius', $wppb_design_settings, __('Blur radius', 'wppb_lang'), 'block coordinates');
    wppb_colour_selector('pagination_shadow_colour', $wppb_design_settings, __('Colour', 'wppb_lang'), 'block colour');
    ?>
			</div>
			<div class="section-layout">
				<h2><?php 
    _e('Margin', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_number_selector('pagination_vertical_margin', $wppb_design_settings, __('Vertical margin', 'wppb_lang'), 'block coordinates');
    ?>
				<?php 
    wppb_number_selector('pagination_horizontal_margin', $wppb_design_settings, __('Horizontal margin', 'wppb_lang'), 'block coordinates');
    ?>
			</div>
			<div class="section-layout">
				<h2><?php 
    _e('Padding', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_number_selector('pagination_padding', $wppb_design_settings, __('Padding', 'wppb_lang'), 'block coordinates');
    ?>
			</div>
			<div class="section-layout">
				<h2><?php 
    _e('Background', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_colour_selector('pagination_background_colour', $wppb_design_settings, __('Colour', 'wppb_lang'), 'block colour');
    ?>
				<?php 
    wppb_colour_selector('pagination_background_hovercolour', $wppb_design_settings, __('Colour on hover', 'wppb_lang'), 'block colour');
    ?>
			</div>
			<div class="section-layout">
				<h2><?php 
    _e('Border', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_number_selector('pagination_border_width', $wppb_design_settings, __('Width', 'wppb_lang'), 'block coordinates');
    ?>
				<?php 
    wppb_bordertype_selector('pagination_border_type', $wppb_design_settings, __('Type', 'wppb_lang'), 'block bordertype');
    ?>
				<?php 
    wppb_colour_selector('pagination_border_colour', $wppb_design_settings, __('Colour', 'wppb_lang'), 'block colour');
    ?>
			</div>
		</div>
		<?php 
    $count = 1;
    while ($count < 7) {
        ?>
		<div id="h<?php 
        echo $count;
        ?>
_options">
			<?php 
        wppb_text_display('heading' . $count, $wppb_design_settings, __('Heading ' . $count, 'wppb_lang'));
        wppb_text_margins('heading' . $count, $wppb_design_settings, 'block coordinates');
        wppb_text_padding('heading' . $count, $wppb_design_settings, 'block coordinates');
        wppb_text_background('heading' . $count, $wppb_design_settings);
        wppb_text_borders_horizontal('heading' . $count, $wppb_design_settings);
        $count++;
        ?>
		</div>
		<?php 
    }
    ?>
		<div id="p_options">
			<?php 
    wppb_text_display('paragraph', $wppb_design_settings, __('Paragraph', 'wppb_lang'));
    wppb_text_margins('paragraph', $wppb_design_settings, 'block coordinates');
    wppb_text_padding('paragraph', $wppb_design_settings, 'block coordinates');
    wppb_text_background('paragraph', $wppb_design_settings);
    wppb_text_borders_horizontal('paragraph', $wppb_design_settings);
    ?>
		</div>
		<div id="li_options">
			<?php 
    wppb_text_display('listitem', $wppb_design_settings, __('List items', 'wppb_lang'));
    wppb_text_margins('listitem', $wppb_design_settings);
    wppb_text_padding('listitem', $wppb_design_settings);
    wppb_text_background('listitem', $wppb_design_settings);
    wppb_text_borders_horizontal('listitem', $wppb_design_settings);
    ?>
		</div>
		<div class="inner-tab-block" id="a_options">
			<div class="section-layout">
				<h2><?php 
    _e('Links', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_colour_selector('links_textcolour', $wppb_design_settings, __('Colour', 'wppb_lang'));
    wppb_fontweight_selector('links_font_weight', $wppb_design_settings, __('Font weight', 'wppb_lang'), 'block fontweight', 'inherit');
    wppb_fontstyle_selector('links_font_style', $wppb_design_settings, __('Font style', 'wppb_lang'), 'block', 'inherit');
    wppb_textdecoration_selector('links_textdecoration', $wppb_design_settings, __('Text decoration', 'wppb_lang'), 'block textdecoration', 'inherit');
    ?>
			</div>
			<div class="section-layout">
				<h2><?php 
    _e('Links on hover', 'wppb_lang');
    ?>
</h2>
				<?php 
    wppb_colour_selector('links_hover_textcolour', $wppb_design_settings, __('Colour', 'wppb_lang'));
    wppb_fontweight_selector('links_hover_font_weight', $wppb_design_settings, __('Font weight', 'wppb_lang'), 'block fontweight', 'inherit');
    wppb_fontstyle_selector('links_hover_font_style', $wppb_design_settings, __('Font style', 'wppb_lang'), 'block', 'inherit');
    wppb_textdecoration_selector('links_hover_textdecoration', $wppb_design_settings, __('Text decoration', 'wppb_lang'), 'block textdecoration', 'inherit');
    ?>
			</div>
		</div>
	</div>
</div>
<?php 
}