Example #1
0
 function save_size_color($op)
 {
     $theme_option = op_page_option('feature_area', 'type');
     $size_color = op_page_option('size_color');
     $size_color = $size_color === false ? array() : $size_color;
     $size_color['box_color_start'] = op_get_var($op, 'box_color_start', op_default_page_option($theme_option, 'size_color', 'box_color_start'));
     $size_color['box_color_end'] = op_get_var($op, 'box_color_end', op_default_page_option($theme_option, 'size_color', 'box_color_end'));
     $size_color['box_width'] = op_get_var($op, 'box_width', op_default_page_option($theme_option, 'size_color', 'box_width'));
     op_update_page_option('size_color', $size_color);
 }
Example #2
0
<?php

$theme_option = op_page_option('feature_area', 'type');
$size_color = op_page_option('size_color');
if (is_array($size_color) && isset($size_color['box_color_start']) && isset($size_color['box_color_end']) && isset($size_color['box_width'])) {
    $box_color_start = $size_color['box_color_start'];
    $box_color_end = $size_color['box_color_end'];
    $box_width = $size_color['box_width'];
} else {
    $box_color_start = op_default_page_option($theme_option, 'size_color', 'box_color_start');
    $box_color_end = op_default_page_option($theme_option, 'size_color', 'box_color_end');
    $box_width = op_default_page_option($theme_option, 'size_color', 'box_width');
}
?>
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf" id="op_page_layout_size_color">
    <label for="op_header_layout_box_color_start" class="form-title"><?php 
_e('Box background start colour', OP_SN);
?>
</label>
    <p class="op-micro-copy"><?php 
_e('Choose a box background start colour.', OP_SN);
?>
</p>
    <?php 
op_color_picker('op[size_color][box_color_start]', $box_color_start, 'op_size_color_box_color_start');
?>
    <label for="op_header_layout_box_color_end" class="form-title"><?php 
_e('Box background end colour', OP_SN);
?>
</label>
    <p class="op-micro-copy"><?php 
Example #3
0
}
?>
            </select>



            <label for="op_header_layout_nav_bar_below_logo" class="form-title"><?php 
_e('Upload Small Navigation Bar Logo (optional)', OP_SN);
?>
</label>
            <p class="op-micro-copy"><?php 
_e('If you want to show a small logo in your navigation bar, upload it here. Ensure the logo is in transparent PNG format and no larger than 100x40px', OP_SN);
?>
</p>
		    <?php 
op_upload_field('op[header_layout][nav_bar_below][logo]', op_default_page_option('header_layout', 'nav_bar_below', 'logo'));
?>

	    <label for="op_header_layout_nav_bar_below_font" class="form-title"><?php 
_e('Select Navigation Bar Font (optional)', OP_SN);
?>
</label>
            <p class="op-micro-copy"><?php 
_e('If you would like to change the font for this navigation menu, you may change these settings below.', OP_SN);
?>
</p>
			<?php 
$font_family = isset($header_layout['nav_bar_below']['font_family']) ? $header_layout['nav_bar_below']['font_family'] : op_default_option($header_layout['nav_bar_below'], 'font_family');
$font_weight = isset($header_layout['nav_bar_below']['font_weight']) ? $header_layout['nav_bar_below']['font_weight'] : op_default_option($header_layout['nav_bar_below'], 'font_weight');
$font_size = isset($header_layout['nav_bar_below']['font_size']) ? $header_layout['nav_bar_below']['font_size'] : op_default_option($header_layout['nav_bar_below'], 'font_size');
$font_shadow = isset($header_layout['nav_bar_below']['font_shadow']) ? $header_layout['nav_bar_below']['font_shadow'] : op_default_option($header_layout['nav_bar_below'], 'font_shadow');
Example #4
0
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf" id="op_page_layout_landing_bg">
    <label for="op_header_layout_logo" class="form-title"><?php 
_e('Background Image', 'optimizepress');
?>
</label>
    <p class="op-micro-copy"><?php 
_e('Upload a image to use as the background for your page.', 'optimizepress');
?>
</p>
    <?php 
op_upload_field('op[landing_bg][image]', op_default_page_option('landing_bg', 'image'));
?>
</div>
Example #5
0
 function save_landing_bg($op)
 {
     $landing = op_page_option('landing_bg');
     $landing = $landing === false ? array() : $landing;
     $landing['image'] = op_get_var($op, 'image', op_default_page_option('landing_bg', 'image'));
     op_update_page_option('landing_bg', $landing);
 }
Example #6
0
                <li>
                    <label for="<?php 
        echo $tmp_id;
        ?>
size" class="form-title"><?php 
        _e($title, OP_SN);
        ?>
</label>
                    <?php 
        echo empty($help) ? '' : '<p class="op-micro-copy">' . __($help, OP_SN) . '</p>';
        ?>
                    <div class="font-chooser cf">
                    <?php 
        $opt_array = array('default_typography', 'color_elements', $element);
        $page_opt_array = array('typography', 'color_elements', $element);
        $page_opts = op_default_page_option($page_opt_array);
        if (is_array($page_opts)) {
            $color = $page_opts['color'];
            $decoration = $page_opts['text_decoration'];
        } else {
            $color = $page_opts;
            $decoration = '';
        }
        $color_test = str_replace('#', '', $color);
        if (empty($color_test)) {
            $color = op_default_option($opt_array, 'color');
        }
        if (!empty($decoration)) {
            $decoration = op_default_option($opt_array, 'decoration');
            op_color_picker($tmp_field . '[color]', $color, $tmp_id . '_color');
            op_text_decoration_drop($tmp_field . '[text_decoration]', $decoration, $tmp_id . '_text_decoration');
Example #7
0
 function _save_typography($update = false)
 {
     $typography = array();
     $elements = array('link_color' => array('page', 'link_color'), 'link_hover_color' => array('page', 'link_hover_color'), 'footer_text_color' => array('footer', 'text_color'), 'footer_link_color' => array('footer', 'link_color'), 'footer_link_hover_color' => array('footer', 'link_hover_color'), 'feature_text_color' => array('feature_area', 'text_color'), 'feature_link_color' => array('feature_area', 'link_color'), 'feature_link_hover_color' => array('feature_area', 'link_hover_color'));
     $color_scheme_advanced = op_default_page_option('color_scheme_advanced');
     $color_scheme_advanced = is_array($color_scheme_advanced) ? $color_scheme_advanced : array();
     if (($type = op_post('op', 'sections', 'typography')) && is_array($type)) {
         $typography_elements = op_typography_elements();
         $typography['font_elements'] = array();
         $typography['color_elements'] = array();
         if (isset($typography_elements['font_elements'])) {
             foreach ($typography_elements['font_elements'] as $name => $options) {
                 $tmp = op_get_var($type, $name, array());
                 $typography['font_elements'][$name] = array('size' => op_get_var($tmp, 'size'), 'font' => op_get_var($tmp, 'font'), 'style' => op_get_var($tmp, 'style'), 'color' => op_get_var($tmp, 'color'));
             }
         }
         if (isset($typography_elements['color_elements'])) {
             foreach ($typography_elements['color_elements'] as $name => $options) {
                 $val = op_get_var($type, $name, '');
                 $color = op_get_var($val, 'color');
                 $color_test = str_replace('#', '', $color);
                 if (empty($color_test) && !is_array($val)) {
                     $color = $val;
                 }
                 if (is_array($val)) {
                     $newtmp = array('color' => $color, 'text_decoration' => op_get_var($val, 'text_decoration'));
                 } else {
                     $newtmp = $val;
                 }
                 if ($update) {
                     if (isset($elements[$name])) {
                         $tmp = $elements[$name];
                         if (!isset($color_scheme_advanced[$tmp[0]])) {
                             $color_scheme_advanced[$tmp[0]] = array();
                         }
                         $color_scheme_advanced[$tmp[0]][$tmp[1]] = $newtmp;
                     }
                 }
                 $typography['color_elements'][$name] = $newtmp;
             }
         }
     }
     $color_scheme_advanced['feature_area']['text_color'] = $typography['color_elements']['feature_text_color'];
     $color_scheme_advanced['footer']['footer_text_color'] = $typography['color_elements']['footer_text_color'];
     $color_scheme_advanced['footer']['text_color'] = $typography['color_elements']['footer_text_color'];
     if ($update) {
         //op_update_page_option('color_scheme_advanced',$color_scheme_advanced);
     }
     return $typography;
 }
Example #8
0
			<?php 
$help_vid = op_help_vid(array('page', 'footer_area', 'footer_disclaimer'), true);
?>
			<div class="op-bsw-panel-controls<?php 
echo $help_vid == '' ? '' : ' op-bsw-panel-controls-help';
?>
 cf">
				<div class="show-hide-panel"><a href="#"></a></div>
                <?php 
$enabled = op_page_on_off_switch('footer_area', 'footer_disclaimer');
echo $help_vid;
?>
			</div>
		</div>
        <div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar">
            <label for="op_footer_area_disclaimer_message" class="form-title"><?php 
_e('Disclaimer Override', 'optimizepress');
?>
</label>
            <p class="op-micro-copy"><?php 
_e('If you want to override the disclaimer message set in the OptimizePress general settings, enter a new disclaimer below. This disclaimer will be shown above the copyright message in your page footer.', 'optimizepress');
?>
</p>
            <textarea name="op[footer_area][footer_disclaimer][message]" id="op_footer_area_disclaimer_message"><?php 
echo stripslashes(op_default_page_option('footer_area', 'footer_disclaimer', 'message'));
?>
</textarea>
        </div>
    </div>

</div>
Example #9
0
                        echo $key;
                        ?>
"<?php 
                        echo op_default_page_option($opt_array, $el) == $key ? ' selected' : '';
                        ?>
><?php 
                        echo $value;
                        ?>
</option>
						<?php 
                    }
                    ?>
				</select>
				<?php 
                }
            }
        } else {
            echo '
	<div class="font-chooser cf">';
            if (isset($info['text_decoration'])) {
                op_color_picker($fieldname . '[' . $el . '][color]', op_default_page_option($opt_array, $el, 'color'), $fieldid . $el . '_color');
                op_text_decoration_drop($fieldname . '[' . $el . '][text_decoration]', op_default_page_option($opt_array, $el, 'text_decoration'), $fieldid . $el . '_text_decoration');
            } else {
                op_color_picker($fieldname . '[' . $el . ']', op_default_page_option($opt_array, $el), $fieldid . $el);
            }
            echo '
		<a href="#reset" class="reset-link">Reset</a>
	</div>';
        }
    }
}