Example #1
0
<?php

$settings = $data['settings'];
$key = $data['key'];
$action = $data['action'];
$baseStyles = $data['base-styles'];
$selectedBaseStyle = mab_get_fresh_design_option('base_style');
$selectedActionBox = !empty($_GET['action-box']) ? $_GET['action-box'] : '';
if (empty($selectedActionBox)) {
    $selectedActionBox = mab_get_fresh_design_option('preview_action_box');
}
?>
<div class="themes-php mab-design-settings-page">
	<div class="wrap">

		<div id="actionbox-preview"></div>

<form method="post" action="<?php 
echo add_query_arg(array());
?>
" id="mab-style-settings-form">

	<div class="mab-panel-controls">
		<label><?php 
_e('Select action box to preview: ', 'mab');
?>
</label><select id="actionbox-preview-dropdown" name="mab-design[preview_action_box]">
			<?php 
foreach ($data['actionboxes'] as $ab) {
    ?>
				<option value="<?php 
Example #2
0
/**
 * Calculates the width of the primary or secondary nav elements, or the child
 * UL elements, based on the border settings choices.
 *
 * @author Gary Jones
 * @param string $nav 'primary' or 'secondary'
 * @param boolean $ul True for getting width of child UL, false (default) for the (grand)parent element.
 * @return string
 * @since 1.0
 */
function mab_calculate_nav_width($nav, $ul = false)
{
    $border = mab_get_fresh_design_option($nav . '_nav_border');
    $border_style = mab_get_fresh_design_option($nav . '_nav_border_style');
    if ('none' == $border_style) {
        $border = 0;
    }
    $width = 940 - 2 * $border;
    if ($ul) {
        $border = mab_get_fresh_design_option($nav . '_nav_inner_border');
        $border_style = mab_get_fresh_design_option($nav . '_nav_inner_border_style');
        if ('none' == $border_style) {
            $border = 0;
        }
        $width = $width - 2 * $border;
    }
    return ' ' . $width . 'px';
}
Example #3
0
/**
 * Adds a textarea setting - label and textarea.
 *
 * @author Gary Jones
 * @param string $id ID of the element
 * @param string $label Displayed label
 * @param integer cols Value for the cols attribute (default = 25)
 * @param integer rows Value for the rows attribute (default = 10)
 * @since 0.9.5
 * @return string HTML markup
 */
function mab_add_textarea_setting($id, $label, $cols = 25, $rows = 10)
{
    return mab_add_label($id, $label) . '<br /><textarea id="' . $id . '" name="' . 'mab-design' . '[' . $id . ']" cols="39" rows="10">' . mab_get_fresh_design_option($id) . '</textarea>';
}