コード例 #1
0
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Location', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Details', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Contact Options', THEMENAME);
        ?>
</li>
					<li><?php 
        _e('Booking Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the title of this page is shown under the header. If you would like to hide this title, check the radio button next to  "Hide"', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_title' class='sectionTitle'><?php 
        _e('Page Title', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_title', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_title-<?php 
            echo $i;
            ?>
' name='_est_title' value='<?php 
            echo $value;
            ?>
'><label for='_est_title-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this post, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='bsh_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        $sidebars['Property Page Sidebar'] = 'Property Page Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select what you would like to use at the top of the single apartment page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_top_element' class='sectionTitle'><?php 
        _e('Element At The Top Of The Page', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Image Slider' => 'slider', 'Featured Image' => 'thumbnail', 'Nothing' => 'none');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_top_element', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'slider') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_top_element-<?php 
            echo $i;
            ?>
' name='_est_top_element' value='<?php 
            echo $value;
            ?>
'><label for='_est_top_element-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If "image slider" is chosen for the element at the top of the page you can choose specific image IDs to make sure not all images are shown.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_slider_image_ids', true);
        ?>
	        				<label for='_est_slider_image_ids' class='sectionTitle'><?php 
        _e('Slider Image IDs (comma separated, empty for all)', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_slider_image_ids' name='_est_slider_image_ids' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set the id of the picasa album for this property here', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_picasa_album', true);
        ?>
	        				<label for='_est_picasa_album' class='sectionTitle'><?php 
        _e('Picasa Album ID', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_picasa_album' name='_est_picasa_album' value='<?php 
        echo $value;
        ?>
'>

	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('The default data to put in the ribbon can be set in the <a href="%s">theme customizer</a>. If you want to override it for this property, simply select a different field.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_ribbon_field' class='sectionTitle'><?php 
        _e('Ribbon Custom Field', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_ribbon_field', true);
        $choices = array();
        $choices['default'] = '-- Use The Default --';
        $choices = array_merge($choices, get_custom_detail_array());
        ?>
	        				<select id='_est_ribbon_field' name='_est_ribbon_field'>
		        				<?php 
        foreach ($choices as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>


	        		</section>


	        		<section>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like this property to remain in the system but be hidden from the map, you can set this option to hide', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_on_map' class='sectionTitle'><?php 
        _e('Geolocation', THEMENAME);
        ?>
</label>
							<?php 
        $geolocation = get_post_meta($post->ID, '_est_geocode', true);
        if (empty($geolocation)) {
            _e('The coordinates of this property are not set. Please fill out the location details below, or the latitude and longitude fields at the bottom. If you have filled out the location fields but you do not get coordinates here you will need to ask your web host to enable curl or file_get_contents()', THEMENAME);
        } else {
            $lat = get_post_meta($post->ID, '_est_meta_latitude', true);
            $lng = get_post_meta($post->ID, '_est_meta_longitude', true);
            if (empty($lat) or empty($lng)) {
                echo sprintf(__('The coordinates of this property have been geocoded by Google using the location fields. The coordinates are the following: <br> %s', THEMENAME), $geolocation);
            } else {
                echo sprintf(__('The coordinates of this property have been entered manually in the latitude and longitude field. They are the following: <br> %s', THEMENAME), $geolocation);
            }
        }
        ?>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like this property to remain in the system but be hidden from the map, you can set this option to hide', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_on_map' class='sectionTitle'><?php 
        _e('Show On Map?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_on_map', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_on_map-<?php 
            echo $i;
            ?>
' name='_est_show_on_map' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_on_map-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By specifying a new image you can change the way the markers look on the map', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_marker', true);
        $value = empty($value) ? get_template_directory_uri() . '/images/marker.png' : $value;
        ?>
	        				<label for='_est_marker' class='sectionTitle'><?php 
        _e('Map Marker Image', THEMENAME);
        ?>
</label>
		        			<img src='<?php 
        echo $value;
        ?>
' data-id='_est_marker'><br><br>
		        			<span class='button primary bshUpload' data-id='_est_marker'>Select an Image</span>
		        			<input type='hidden' name='_est_marker' id='_est_marker' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the country the property is located in.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_country', true);
        ?>
	        				<label for='_est_meta_country' class='sectionTitle'><?php 
        _e('Country', THEMENAME);
        ?>
</label>
	        				<select id='_est_meta_country' name='_est_meta_country'>
	        					<?php 
        echo bsh_get_country_dropdown_options($value);
        ?>
	        				</select>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the state this property is located in', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_state', true);
        ?>
	        				<label for='_est_meta_state' class='sectionTitle'><?php 
        _e('State', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_state' name='_est_meta_state' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the city this property is located in', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_city', true);
        ?>
	        				<label for='_est_meta_city' class='sectionTitle'><?php 
        _e('City', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_city' name='_est_meta_city' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the street level address', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_address', true);
        ?>
	        				<label for='_est_meta_address' class='sectionTitle'><?php 
        _e('Street Address', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_address' name='_est_meta_address' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the zip/postal code', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_zipcode', true);
        ?>
	        				<label for='_est_meta_zipcode' class='sectionTitle'><?php 
        _e('Zip/Postal Code', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_zipcode' name='_est_meta_zipcode' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<?php 
        _e('The following fields can be used to add the latitude and longitude manually. This can be useful if you have some properties in remote locations. Beware as this overwrites andy previous locations settings on Google Maps.', THEMENAME);
        ?>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the latitude of this location manually', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_latitude', true);
        ?>
	        				<label for='_est_meta_latitude' class='sectionTitle'><?php 
        _e('Latitude', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_latitude' name='_est_meta_latitude' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the longitude of this location manually', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_longitude', true);
        ?>
	        				<label for='_est_meta_longitude' class='sectionTitle'><?php 
        _e('Longitude', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_longitude' name='_est_meta_longitude' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        		</section>

	        		<section>

		        		<?php 
        $fields = get_option('est_customdata');
        foreach ($fields as $field) {
            if (in_array($field['key'], est_get_builtins())) {
                continue;
            }
            ?>
			        		<div class='option'>
<!--
	        					<div class='help'>
	        						<span class='title'><?php 
            _e('help', THEMENAME);
            ?>
</span>
	        						<div class='content'>
	        						<?php 
            _e('Specify the price of this property here.', THEMENAME);
            ?>
	        						</div>
	        					</div>
-->

		        				<label for='_est_price' class='sectionTitle'><?php 
            echo $field['name'];
            ?>
</label>

		        				<?php 
            show_customdata_field($post, $field);
            ?>

		        				<?php 
            $info = array();
            if (!empty($field['prefix'])) {
                $info[] = sprintf(__('Prefix: %s', THEMENAME), $field['prefix']);
            }
            if (!empty($field['suffix'])) {
                $info[] = sprintf(__('Suffix: %s', THEMENAME), $field['suffix']);
            }
            if (!empty($info)) {
                ?>
				        			<p class='description'>
				        				<?php 
                echo implode(', ', $info);
                ?>
				        			</p>
		        				<?php 
            }
            ?>
		        			</div>


		        		<?php 
        }
        ?>





	        		</section>

	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the agent this property belongs to', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label class='sectionTitle'><?php 
        _e('Agents', THEMENAME);
        ?>
</label>

							<div id='est_agents'>
        					<?php 
        $users['administrator'] = @get_users(array('role' => 'administrator'));
        $users['agent'] = @get_users(array('role' => 'agent'));
        $users['agent'] = @get_users(array('role' => 'agent'));
        $users = array_merge($users['administrator'], $users['agent']);
        $values = get_post_meta($post->ID, '_est_agent');
        if (empty($values)) {
            $values[0] = $post->post_author;
        }
        ?>

			        			<?php 
        $i = 0;
        foreach ($values as $user_id) {
            ?>
								<div class='est_agent'>
								<label><?php 
            _e('Agent', THEMENAME);
            ?>
 <span class='agent_count'><?php 
            echo $i + 1;
            ?>
</span></label>
			        			<select class='widefat' id='_est_agent_<?php 
            echo $i;
            ?>
' name='_est_agent[<?php 
            echo $i;
            ?>
]'>
		        					<option value='0'><?php 
            _e('-- Select an Agent --', THEMENAME);
            ?>
</option>
			        				<?php 
            foreach ($users as $user) {
                $selected = $user->data->ID == $user_id ? 'selected="selected"' : '';
                ?>
			        					<option <?php 
                echo $selected;
                ?>
 value='<?php 
                echo $user->data->ID;
                ?>
'><?php 
                echo $user->data->display_name;
                ?>
</option>
			        				<?php 
            }
            ?>
			        			</select>
								<br><br>

			        			</div>
			        			<?php 
            $i++;
        }
        ?>


							</div>

		        			<a href='#' class='primary button' id='add-agent'><?php 
        _e('+ add another agent', THEMENAME);
        ?>
</a>



	        			</div>


	        			<div class='option'>
		        			<?php 
        echo sprintf(__('
		        				<p>
		        				The following fields let you customize the automatic reply messages that get sent to users sending contact messages. You only need to fill this out if you would like something different than the global settings defined in the <a href="%s">Theme Customizer</a>.
		        				</p>
								<p>
									For the subject and message fields below you can use a couple of placeholders which signify the title and the link for the property. If you use <strong>!url</strong> it will be replaced by the url of the property. If you use <strong>!title</strong> it will be replaced with the title of the property.
								</p>

		        				', THEMENAME), admin_url() . '/customize.php');
        ?>
		        		</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject of the auto-reply email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_contact_reply_subject', true);
        ?>
	        				<label for='_est_contact_reply_subject' class='sectionTitle'><?php 
        _e('Contact Auto-Reply Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_contact_reply_subject' name='_est_contact_reply_subject' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the message of the auto-reply email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_contact_reply_message', true);
        ?>
	        				<label for='_est_contact_reply_message' class='sectionTitle'><?php 
        _e('Contact Auto-Reply Message', THEMENAME);
        ?>
</label>
		        			<textarea rows='12' class='widefat' id='_est_contact_reply_message' name='_est_contact_reply_message'><?php 
        echo $value;
        ?>
</textarea>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the email address the contact email is sent to', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_contact_email', true);
        ?>
	        				<label for='_est_contact_email' class='sectionTitle'><?php 
        _e('Send The Contact Email To This Address', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_contact_email' name='_est_contact_email' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        		</section>


					<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If this property is rentable users will be able to book online and view availiblitiy and so on.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_bookable' class='sectionTitle'><?php 
        _e('Is This Property Bookable?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Yes, booking is allowed' => 'yes', 'No, no bookings can be made' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_bookable', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'no') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_bookable-<?php 
            echo $i;
            ?>
' name='_est_bookable' value='<?php 
            echo $value;
            ?>
'><label for='_est_bookable-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like to have a separate PayPal email/ID associated with this property, add it here. A PayPal ID can also be added to book now pages. That serves as the default, you only need to add it here if you want it to be different from the default.', THEMENAME);
        ?>
        						</div>
        					</div>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_property_paypal', true);
        ?>
	        				<label for='_est_property_paypal' class='sectionTitle'><?php 
        _e('PayPal email/ID', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_property_paypal' name='_est_property_paypal' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Enter your PayPal email or ID here', THEMENAME);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Type the currency you want to use for rental prices', THEMENAME);
        ?>
        						</div>
        					</div>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_currency', true);
        $value = empty($value) ? '$' : $value;
        ?>
	        				<label for='_est_rent_currency' class='sectionTitle'><?php 
        _e('Rental Price Currency', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_rent_currency' name='_est_rent_currency' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Rental Currency', THEMENAME);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the position of the rental currency symbol.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_rent_currency_position' class='sectionTitle'><?php 
        _e('Currency Symbol Position?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Before' => 'before', 'After' => 'after');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_rent_currency_position', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'before') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_rent_currency_position-<?php 
            echo $i;
            ?>
' name='_est_rent_currency_position' value='<?php 
            echo $value;
            ?>
'><label for='_est_rent_currency_position-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the minimum and maximum amount of people allowed to book this property', THEMENAME);
        ?>
        						</div>
        					</div>

							<div class='half-left'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_min_guests', true);
        ?>
		        				<label for='_est_min_guests' class='sectionTitle'><?php 
        _e('Minimum Guests', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_min_guests' name='_est_min_guests' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Minimum number of guests', THEMENAME);
        ?>
'>
		        			</div>

							<div class='half-right'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_max_guests', true);
        ?>
		        				<label for='_est_max_guests' class='sectionTitle'><?php 
        _e('Maximum Guests', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_max_guests' name='_est_max_guests' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Maximum number of guests', THEMENAME);
        ?>
'>
		        			</div>


	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the minimum and maximum length of time booking is allowed', THEMENAME);
        ?>
        						</div>
        					</div>

							<div class='half-left'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_min_nights', true);
        ?>
		        				<label for='_est_min_nights' class='sectionTitle'><?php 
        _e('Minimum Stay', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_min_nights' name='_est_min_nights' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Minimum stay in days', THEMENAME);
        ?>
'>
		        			</div>

							<div class='half-right'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_max_nights', true);
        ?>
		        				<label for='_est_max_nights' class='sectionTitle'><?php 
        _e('Maximum Stay', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_max_nights' name='_est_max_nights' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Maximum stay in days', THEMENAME);
        ?>
'>
		        			</div>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the booking interval to allow. If days are selected users can choose their stay in days. If weeks is selected, users may only book weekly stays', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_booking_interval' class='sectionTitle'><?php 
        _e('Booking Intervals', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Daily bookings' => 'day', 'Only weekly stays allowed' => 'week');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_booking_interval', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'day') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_booking_interval-<?php 
            echo $i;
            ?>
' name='_est_booking_interval' value='<?php 
            echo $value;
            ?>
'><label for='_est_booking_interval-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify weather the price is calculated per room/property or per person', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_price_type' class='sectionTitle'><?php 
        _e('Price Type', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Per Night' => 'night', 'Per Person Per Night' => 'person');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_price_type', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'night') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_price_type-<?php 
            echo $i;
            ?>
' name='_est_price_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_price_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The daily price of renting the property', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_daily_price', true);
        ?>
	        				<label for='_est_rent_daily_price' class='sectionTitle'><?php 
        _e('Daily Price', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_rent_daily_price' name='_est_rent_daily_price' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('The daily price', THEMENAME);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The weekly price of renting the property. If not specified, the daily price will be used to calculate the total cost.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_weekly_price', true);
        ?>
	        				<label for='_est_rent_weekly_price' class='sectionTitle'><?php 
        _e('Weekly Price', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_rent_weekly_price' name='_est_rent_weekly_price' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('The weekly price', THEMENAME);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The monthly price of renting the property. If not specified, the daily price and weekly price (if specified) will be used to calculate the total cost.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_monthly_price', true);
        ?>
	        				<label for='_est_rent_monthly_price' class='sectionTitle'><?php 
        _e('Monthly Price', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_rent_monthly_price' name='_est_rent_monthly_price' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('The monthly price', THEMENAME);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The following controls allow you to specify date based discounts or increased prices.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_seasonal_price', true);
        if (empty($value)) {
            $value = array(array('start' => '', 'end' => '', 'price' => array('daily' => '', 'weekly' => '', 'monthly' => '')));
        }
        ?>

	        				<label for='_est_rent_seasonal_price' class='sectionTitle'><?php 
        _e('Seasonal Prices', THEMENAME);
        ?>
</label>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th class='text-left'><?php 
        _e('Name', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Start Date', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('End Date', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Price', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Remove', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        $i = 0;
        foreach ($value as $season) {
            ?>
			        				<tr class='est-seasonal-price'>
				        				<td>
				        				<?php 
            _e('Season Name', THEMENAME);
            ?>
<br> <input class='name' style='width:100px' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][name]' value='<?php 
            echo $season['name'];
            ?>
' type='text' placeholder='name'>
				        				</td>
				        				<td>
				        				<?php 
            _e('From', THEMENAME);
            ?>
<br> <input class='from small monthdaypicker' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][start]' value='<?php 
            echo $season['start'];
            ?>
' type='text' placeholder='Start Date'>
				        				</td>
				        				<td>
				        				<?php 
            _e('Until', THEMENAME);
            ?>
<br> <input class='until monthdaypicker small' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][end]' value='<?php 
            echo $season['end'];
            ?>
' type='text' placeholder='End Date'>
				        				</td>
				        				<td>
				        				<?php 
            _e('The new prices are', THEMENAME);
            ?>
<br>
				        				<input class='daily small' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][price][daily]' value='<?php 
            echo $season['price']['daily'];
            ?>
' type='text' placeholder='Daily'>
				        				<input name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][price][weekly]' class='weekly small' value='<?php 
            echo $season['price']['weekly'];
            ?>
' type='text' placeholder='Weekly'>
				        				<input name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][price][monthly]' class='monthly small' value='<?php 
            echo $season['price']['monthly'];
            ?>
' type='text' placeholder='Monthly'>
				        				</td>

				        				<td><br><a href='#' class='remove-seasonal-price'><?php 
            _e('remove', THEMENAME);
            ?>
</a></td>
									</tr>
									<?php 
            $i++;
        }
        ?>
								</table>
								<br>
								<a href='#' id='add-seasonal-price'><?php 
        _e('+ add another', THEMENAME);
        ?>
</a>

						</div>



	        			<div class='option'>
		        			<?php 
        echo sprintf(__('
		        				<p>
		        				The following fields let you customize the automatic booking confirmation that gets sent to users when they finalize a booking. You only need to fill this out if you would like something different than the global settings defined in the <a href="%s">Theme Customizer</a>.
		        				</p>
								<p>
									For the subject and message fields below you can use a couple of placeholders which signify the title and the link for the property. If you use <strong>!url</strong> it will be replaced by the url of the property. If you use <strong>!title</strong> it will be replaced with the title of the property.
								</p>

		        				', THEMENAME), admin_url() . '/customize.php');
        ?>
		        		</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject of the confimation email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_booking_email_subject', true);
        ?>
	        				<label for='_est_booking_email_subject' class='sectionTitle'><?php 
        _e('Booking Confirmation Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_booking_email_subject' name='_est_booking_email_subject' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the message of the booking confirmation email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_booking_email_message', true);
        ?>
	        				<label for='_est_booking_email_message' class='sectionTitle'><?php 
        _e('Booking Confirmation Message', THEMENAME);
        ?>
</label>
		        			<textarea rows='12' class='widefat' id='_est_booking_email_message' name='_est_booking_email_message'><?php 
        echo $value;
        ?>
</textarea>

	        			</div>




					</section>





	        		<section class='helpSection'>
	        			<?php 
        _e('
<div class="post-content">

							<p>Properties can be created and managed in the "Properties" section of the admin. They work quite like regular posts. In addition to the standard things like a title, content, being able to schedule them and so on, they give you a lot of property-specific options, let\'s take a look at those.</p>
<p>First of all, there are two custom taxonomies available. Property Type and Property Category. You can add as many entries as you want into each. You can later let users search based on these parameters, and you can use them in property lists to narrow what you show to users.</p>
<p>In the <a href="bonsaished.com/estatement/">Estatement Demo</a> &nbsp;we\'ve used the property types to add categories like "Apartment", "Detached House" and so on. We\'ve used the property categories to add building types like "Highrise", "Victorian", "Colonial" and so on.</p>
<p>Note that the media uploaded to properties is used in the slider for the property page. If you only add one image it is shown as a featured image, if more are added, a slider is created for you.</p>
<p>All the other property-specific settings can be found in the Estatement options box underneath the content editor. :</p>
<ul>
<li>Structure
<ul>
<li><strong><strong>Page Title</strong>: Allows you to show or hide the page title</strong></li>
<li><strong>Sidebar</strong>: Allows you ro show a specific sidebar for this page</li>
<li><strong>Element At The Top Of The Page</strong>: Allows you to select which element is shown at the top of the page.</li>
<li><strong>Ribbon Custom Field</strong>: Allows you to choose which custom field should be shown in the ribbon. A global default can be set for this in the theme customizer.</li>
</ul>
</li>
<li>Location
<ul>
<li><strong>Country</strong>: Allows you to select the country the property is located in</li>
<li><strong>State</strong>: Select the state the property is located in</li>
<li><strong>City</strong>: Add the city the property is in</li>
<li><strong>Street Address</strong>: Add the specific street address if the property.</li>
<li><strong>Zip/Postal Code</strong>: Add the zip or postal code of the property</li>
<li><strong>Latitude</strong>: Allows you to manually set the latitude for a property</li>
<li><strong>Longitude</strong>: Allows you to manually set the longitude for a property</li>
</ul>
</li>
<li>Details
<ul>
<li><b>Global Details</b>: All your global details should be shown in the top part of this section. To modify these global details go to the "Custom Fields" page. To learn more about managing custom fields read our knowledgebase article on <a href="http://bonsaished.com/blog/kb/managing-custom-fields/">Managing Custom Fields</a>.</li>
<li><strong>Custom Details</strong>: Below the global details you can add any ad-hoc details you would like to show for only this property.</li>
</ul>
</li>
<li>Contact Options
<ul>
<li><strong>Agents</strong>: This section allows you to assign agents to a property. By default the post author will be the agent but this can be changed here, and other agents can also be added. Refer to our article on <a href="http://bonsaished.com/blog/kb/managing-agents/">Managing Agents</a> for more information</li>
<li><strong>Contact Auto-Reply Subject</strong>: This setting is set globally in the theme customizer. If you want to specify a different auto-reply subject for a specific property you can do so here.</li>
<li><strong>Contact Auto-Reply Message</strong>: This setting is set globally in the theme customizer. If you want to specify a different auto-reply message for a specific property you can do so here.</li>
<li><strong>Send The Contact Email To This Address</strong>: This setting is set globally in the theme customizer. If you would like contact messages sent about a specific property to go to a different email address you can specify it here.</li>
</ul>
</li>
</ul>
<p>Don\'t forget that help is available inline inside the options box. You can read the text of this article there, as well as reading inline help for each specific option next to the option itself. Simply hover over the help link.</p>

						</div>
	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
コード例 #2
0
    public static function register($wp_customize)
    {
        /*********************************/
        /*         1.1 Sections          */
        /*********************************/
        $wp_customize->add_section('general_options', array('title' => __('General Options', THEMENAME), 'priority' => 10));
        $wp_customize->add_section('property_options', array('title' => __('Property Options', THEMENAME), 'priority' => 15));
        $wp_customize->add_section('blog_options', array('title' => __('Blog Options', THEMENAME), 'priority' => 18));
        $wp_customize->add_section('header_options', array('title' => __('Header Options', THEMENAME), 'priority' => 20));
        $wp_customize->add_section('footer_options', array('title' => __('Footer Options', THEMENAME), 'priority' => 24));
        $wp_customize->add_section('footer_bar_options', array('title' => __('Footer Bar Options', THEMENAME), 'priority' => 26));
        $wp_customize->add_section('featured_properties_options', array('title' => __('Featured Properties Options', THEMENAME), 'priority' => 27));
        $wp_customize->add_section('contact_options', array('title' => __('Contact Options', THEMENAME), 'priority' => 28));
        $wp_customize->add_section('booking_options', array('title' => __('Booking Options', THEMENAME), 'priority' => 29));
        $wp_customize->add_section('api_keys', array('title' => __('API Keys', THEMENAME), 'priority' => 30));
        $wp_customize->add_section('error_options', array('title' => __('Error Display Options', THEMENAME), 'priority' => 40));
        $wp_customize->add_section('custom_css', array('title' => __('Custom CSS', THEMENAME), 'priority' => 150));
        $wp_customize->add_setting('custom_css', array('default' => '', 'transport' => 'refresh'));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'custom_css', array('label' => __('Custom CSS Code', THEMENAME), 'priority' => 20, 'section' => 'custom_css', 'settings' => 'custom_css', 'description' => '')));
        /*********************************/
        /*         1.2 Settings          */
        /*********************************/
        // 1.2.1 General Settings
        $wp_customize->add_setting('author_base', array('default' => 'agent', 'transport' => 'postMessage'));
        $wp_customize->add_setting('body_text_color', array('default' => '#666666', 'transport' => 'postMessage'));
        $wp_customize->add_setting('heading_text_color', array('default' => '#444444', 'transport' => 'postMessage'));
        $wp_customize->add_setting('read_more_text', array('default' => 'read_more'));
        $wp_customize->add_setting('site_background_color', array('default' => '#282828', 'transport' => 'postMessage'));
        $wp_customize->add_setting('background_image', array('default' => get_template_directory_uri() . '/images/defaults/bg.png', 'transport' => 'postMessage'));
        $wp_customize->add_setting('background_tiling', array('default' => 'repeat'));
        $wp_customize->add_setting('background_position', array('default' => 'center'));
        $wp_customize->add_setting('background_attachment', array('default' => 'scroll'));
        $wp_customize->add_setting('content_background', array('default' => '#ffffff', 'transport' => 'postMessage'));
        $wp_customize->add_setting('layout', array('default' => '2col_right'));
        $wp_customize->add_setting('primary_color', array('default' => '#ee514b', 'transport' => 'postMessage'));
        $wp_customize->add_setting('primary_text_color', array('default' => '#ffffff', 'transport' => 'postMessage'));
        $wp_customize->add_setting('body_font', array('default' => 'Chivo'));
        $wp_customize->add_setting('heading_font', array('default' => 'Bitter'));
        $wp_customize->add_setting('font_character_set', array('default' => 'latin'));
        $wp_customize->add_setting('search_page_heading', array('default' => 'Raleway'));
        $wp_customize->add_setting('sidebars', array('default' => ''));
        $wp_customize->add_setting('sidebar_responsiveness', array('default' => 'show'));
        $wp_customize->add_setting('analytics', array('default' => ''));
        $wp_customize->add_setting('sidebar', array('default' => 'Sidebar'));
        $wp_customize->add_setting('property_sidebar', array('default' => 'Property Page Sidebar'));
        // 1.2.2 Header Settings
        $wp_customize->add_setting('logo_image', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo_image', array('label' => __('Logo Image', THEMENAME), 'section' => 'header_options', 'settings' => 'logo_image', 'priority' => 10)));
        $wp_customize->add_setting('logo_image_retina', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo_image_retina', array('label' => __('HiDPI Logo Image', THEMENAME), 'section' => 'header_options', 'settings' => 'logo_image_retina', 'priority' => 15)));
        $wp_customize->add_setting('retina_logo_width', array('default' => ''));
        $wp_customize->add_control('retina_logo_width', array('label' => __('Retina Logo Width', THEMENAME), 'section' => 'header_options', 'setting' => 'retina_logo_width', 'priority' => 16));
        $wp_customize->add_setting('logo_full_width', array('default' => 'no'));
        $wp_customize->add_control('logo_full_width', array('label' => __('Full Width Logo?', THEMENAME), 'section' => 'header_options', 'priority' => 17, 'settings' => 'logo_full_width', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('header_contact_location', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control('header_contact_location', array('label' => __('Location Text', THEMENAME), 'section' => 'header_options', 'setting' => 'header_contact_location', 'priority' => 20));
        $wp_customize->add_setting('header_contact_phone', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control('header_contact_phone', array('label' => __('Phone Text', THEMENAME), 'section' => 'header_options', 'setting' => 'header_contact_phone', 'priority' => 30));
        $wp_customize->add_setting('header_contact_phone_link', array('default' => 'yes', 'transport' => 'postMessage'));
        $wp_customize->add_control('header_contact_phone_link', array('label' => __('Use Tel Link?', THEMENAME), 'section' => 'header_options', 'priority' => 31, 'settings' => 'header_contact_phone_link', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('header_contact_email', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control('header_contact_email', array('label' => __('Email Text', THEMENAME), 'section' => 'header_options', 'setting' => 'header_contact_email', 'priority' => 40));
        $wp_customize->add_setting('header_background_color', array('default' => '#ffffff', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'header_background_color', array('label' => __('Header Background Color', THEMENAME), 'section' => 'header_options', 'settings' => 'header_background_color', 'priority' => 50)));
        $wp_customize->add_setting('header_text_color', array('default' => '#5c5c5c', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'header_text_color', array('label' => __('Header Text Color', THEMENAME), 'section' => 'header_options', 'settings' => 'header_text_color', 'priority' => 60)));
        $wp_customize->add_setting('header_slider_shortcode', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control('header_slider_shortcode', array('label' => __('Header Slider Shortcode', THEMENAME), 'section' => 'header_options', 'setting' => 'header_slider_shortcode', 'priority' => 70));
        // Footer Options
        $wp_customize->add_setting('show_footer', array('default' => 'yes'));
        $wp_customize->add_control('show_footer', array('label' => __('Show Widgetized Footer Area?', THEMENAME), 'section' => 'footer_options', 'priority' => 10, 'settings' => 'show_footer', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('footer_background_color', array('default' => '#232323', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footer_background_color', array('label' => __('Footer Background Color', THEMENAME), 'section' => 'footer_options', 'settings' => 'footer_background_color', 'priority' => 10)));
        $wp_customize->add_setting('footer_text_color', array('default' => '#ffffff', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footer_text_color', array('label' => __('Footer Text Color', THEMENAME), 'section' => 'footer_options', 'settings' => 'footer_text_color', 'priority' => 20)));
        $wp_customize->add_setting('footer_background_image', array('default' => ''));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'footer_background_image', array('label' => __('Background Image', THEMENAME), 'section' => 'footer_options', 'settings' => 'footer_background_image', 'priority' => 30)));
        $wp_customize->add_setting('footer_background_tiling', array('default' => 'repeat'));
        $wp_customize->add_control('footer_background_tiling', array('label' => __('Tile Background?', THEMENAME), 'section' => 'footer_options', 'priority' => 40, 'settings' => 'footer_background_tiling', 'type' => 'radio', 'choices' => array('repeat' => 'Yes', 'repeat-x' => 'Only Horizontally', 'repeat-y' => 'Only Vertically', 'no-repeat' => 'No')));
        // Footer Bar Options
        $wp_customize->add_setting('show_footer_bar', array('default' => 'yes'));
        $wp_customize->add_control('show_footer_bar', array('label' => __('Show Footer Bar?', THEMENAME), 'section' => 'footer_bar_options', 'priority' => 10, 'settings' => 'show_footer_bar', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('footer_bar_background_color', array('default' => '#000000', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footer_bar_background_color', array('label' => __('Footer Bar Background Color', THEMENAME), 'section' => 'footer_bar_options', 'settings' => 'footer_bar_background_color', 'priority' => 10)));
        $wp_customize->add_setting('footer_bar_text_color', array('default' => '#ffffff', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'footer_bar_text_color', array('label' => __('Footer Bar Text Color', THEMENAME), 'section' => 'footer_bar_options', 'settings' => 'footer_bar_text_color', 'priority' => 20)));
        $wp_customize->add_setting('footer_bar_text', array('default' => 'Estatement Theme By <a href="http://bonsaished.com">Bonsai Shed</a>', 'transport' => 'postMessage'));
        $wp_customize->add_control('footer_bar_text', array('label' => __('Footer Bar Text', THEMENAME), 'section' => 'footer_bar_options', 'setting' => 'footer_bar_text', 'priority' => 30));
        // Featured Property Options
        $wp_customize->add_setting('show_featured_properties', array('default' => 'yes'));
        $wp_customize->add_control('show_featured_properties', array('label' => __('Show Featured Properties Box?', THEMENAME), 'section' => 'featured_properties_options', 'priority' => 10, 'settings' => 'show_featured_properties', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('featured_properties_speed', array('default' => '10'));
        $wp_customize->add_control('featured_properties_speed', array('label' => __('Featured Properties Speed', THEMENAME), 'section' => 'featured_properties_options', 'setting' => 'featured_properties_speed', 'priority' => 20));
        $wp_customize->add_setting('featured_properties_count', array('default' => '5'));
        $wp_customize->add_control('featured_properties_count', array('label' => __('Number Of Featured Properties To Show', THEMENAME), 'section' => 'featured_properties_options', 'setting' => 'featured_properties_count', 'priority' => 30));
        $wp_customize->add_setting('featured_properties_to_show', array('default' => 'latest'));
        $wp_customize->add_control('featured_properties_to_show', array('label' => __('Featured Properties To Show', THEMENAME), 'section' => 'featured_properties_options', 'priority' => 40, 'settings' => 'featured_properties_to_show', 'type' => 'radio', 'choices' => array('latest' => 'Latest', 'random' => 'Random', 'from_category' => 'From Category', 'specified' => 'Specified Properties')));
        $wp_customize->add_setting('featured_properties_ids', array('default' => ''));
        $wp_customize->add_control('featured_properties_ids', array('label' => __('Comma separated Propert ID\'s to show', THEMENAME), 'section' => 'featured_properties_options', 'setting' => 'featured_properties_ids', 'priority' => 45));
        $wp_customize->add_setting('featured_properties_taxonomy', array('default' => '0'));
        $wp_customize->add_control('featured_properties_taxonomy', array('label' => 'Featured Properties Taxonomy', 'section' => 'featured_properties_options', 'settings' => 'featured_properties_taxonomy', 'priority' => 50, 'type' => 'radio', 'choices' => bsh_get_taxonomies_array()));
        $wp_customize->add_setting('featured_properties_terms', array('default' => ''));
        $wp_customize->add_control('featured_properties_terms', array('label' => __('Comma separated terms to show from taxonomy', THEMENAME), 'section' => 'featured_properties_options', 'setting' => 'featured_properties_terms', 'priority' => 52));
        $wp_customize->add_setting('featured_properties_info_1', array('default' => '_est_meta_building_area'));
        $wp_customize->add_control('featured_properties_info_1', array('label' => __('First Custom Field To Show', THEMENAME), 'section' => 'featured_properties_options', 'settings' => 'featured_properties_info_1', 'priority' => 60, 'type' => 'select', 'choices' => get_custom_detail_array()));
        $wp_customize->add_setting('featured_properties_info_2', array('default' => '_est_meta_property_area'));
        $wp_customize->add_control('featured_properties_info_2', array('label' => __('Second Custom Field To Show', THEMENAME), 'section' => 'featured_properties_options', 'settings' => 'featured_properties_info_2', 'priority' => 70, 'type' => 'select', 'choices' => get_custom_detail_array()));
        // Contact Options
        $wp_customize->add_setting('contact_info', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Info($wp_customize, 'contact_info', array('label' => __('About Contact Options', THEMENAME), 'priority' => 1, 'section' => 'contact_options', 'settings' => 'contact_info', 'description' => __('<p>
						The following options concern contact messages sent from single property pages. Whenever a user sends a message it is sent to you (or a separate contact for the specific property) and a confirmation is sent to the user.
						</p>
						<p>
							For the subject and message fields below you can use a couple of placeholders which signify the title and the link for the property. If you use <strong>!url</strong> it will be replaced by the url of the property. If you use <strong>!title</strong> it will be replaced with the title of the property.
						</p>
					', THEMENAME))));
        $wp_customize->add_setting('contact_reply_subject', array('default' => 'Thank you for your message', 'transport' => 'postMessage'));
        $wp_customize->add_control('contact_reply_subject', array('label' => __('Contact Auto-Reply Subject', THEMENAME), 'section' => 'contact_options', 'setting' => 'contact_reply_subject', 'priority' => 10));
        $wp_customize->add_setting('contact_reply_message', array('default' => 'We\'ve received your message regarding our property <a href="!url">!title</a>. We read all messages and try and respond within 24 hours.', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'contact_reply_message', array('label' => __('Contact Auto-reply Message', THEMENAME), 'priority' => 20, 'section' => 'contact_options', 'settings' => 'contact_reply_message', 'description' => '')));
        $wp_customize->add_setting('contact_email', array('default' => get_option('admin_email'), 'transport' => 'postMessage'));
        $wp_customize->add_control('contact_email', array('label' => __('Send Contact Messages To:', THEMENAME), 'section' => 'contact_options', 'setting' => 'contact_email', 'priority' => 30));
        $wp_customize->add_setting('contact_success_message', array('default' => 'Thank you for your message', 'transport' => 'postMessage'));
        $wp_customize->add_control('contact_success_message', array('label' => __('Contact Success Message:', THEMENAME), 'section' => 'contact_options', 'setting' => 'contact_email', 'priority' => 40));
        $wp_customize->add_setting('contact_error_captcha', array('default' => 'Please fill out the captcha field correctly', 'transport' => 'postMessage'));
        $wp_customize->add_control('contact_error_captcha', array('label' => __('Captcha Field Error:', THEMENAME), 'section' => 'contact_options', 'setting' => 'contact_error_captcha', 'priority' => 50));
        $wp_customize->add_setting('contact_error_email', array('default' => 'Please provide your email address', 'transport' => 'postMessage'));
        $wp_customize->add_control('contact_error_email', array('label' => __('Captcha Field Error:', THEMENAME), 'section' => 'contact_options', 'setting' => 'contact_error_email', 'priority' => 60));
        // Booking Options
        $wp_customize->add_setting('booking_email_info', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Info($wp_customize, 'contact_info', array('label' => __('About Booking Confirmations', THEMENAME), 'priority' => 1, 'section' => 'booking_email_info', 'settings' => 'contact_info', 'description' => __('<p>
						The following options concern booking confirmation emails sent after a booking has been completed. The following options are default options, they can be overridden for each property individually.
						</p>
						<p>
							For the subject and message fields below you can use a couple of placeholders which signify the title and the link for the property. If you use <strong>!url</strong> it will be replaced by the url of the property. If you use <strong>!title</strong> it will be replaced with the title of the property.
						</p>
					', THEMENAME))));
        $wp_customize->add_setting('booking_email_subject', array('default' => 'Thank you for your booking', 'transport' => 'postMessage'));
        $wp_customize->add_control('booking_email_subject', array('label' => __('Booking Confirmation Subject ', THEMENAME), 'section' => 'booking_options', 'setting' => 'booking_email_subject', 'priority' => 10));
        $wp_customize->add_setting('booking_email_message', array('default' => 'Thank you for booking <a href="!url">!title</a>. We look forward to having you at our property, if you have any questions please let us know!', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'booking_email_message', array('label' => __('Booking Confirmation Message', THEMENAME), 'priority' => 20, 'section' => 'booking_options', 'settings' => 'booking_email_message', 'description' => '')));
        // 1.2.3 API Settings
        $wp_customize->add_setting('google_maps_api_key', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_setting('facebook_api_key', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_setting('twitter_consumer_key', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_setting('twitter_consumer_secret', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_setting('twitter_access_token', array('default' => '', 'transport' => 'postMessage'));
        $wp_customize->add_setting('twitter_access_secret', array('default' => '', 'transport' => 'postMessage'));
        // Error Options
        $wp_customize->add_setting('404_title', array('default' => 'Oh No, a page is missing!'));
        $wp_customize->add_setting('404_message', array('default' => 'It seems that you have stumbled on to some missing content. Try going back to the <a href="' . home_url() . '">main page</a> and give it another go.'));
        $wp_customize->add_setting('no_posts_title', array('default' => 'There is no content here!'));
        $wp_customize->add_setting('no_posts_message', array('default' => 'The page you are on exists, but there is no content added to it yet!'));
        $wp_customize->add_setting('no_search_title', array('default' => 'Your search yielded no results :('));
        $wp_customize->add_setting('no_search_message', array('default' => 'Go back to try your search again'));
        $wp_customize->add_setting('no_search_include_page', array('default' => ''));
        /*********************************/
        /*         1.3 Controls          */
        /*********************************/
        // 1.3.1 General Controls
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'body_text_color', array('label' => __('Body Text Color', THEMENAME), 'section' => 'general_options', 'settings' => 'body_text_color', 'priority' => 1)));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'heading_text_color', array('label' => __('Heading Text Color', THEMENAME), 'section' => 'general_options', 'settings' => 'heading_text_color', 'priority' => 2)));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'site_background_color', array('label' => __('Background Color', THEMENAME), 'section' => 'general_options', 'settings' => 'site_background_color', 'priority' => 3)));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'background_image', array('label' => __('Background Image', THEMENAME), 'section' => 'general_options', 'settings' => 'background_image', 'priority' => 4)));
        $wp_customize->add_control('background_tiling', array('label' => __('Tile Background?', THEMENAME), 'section' => 'general_options', 'priority' => 5, 'settings' => 'background_tiling', 'type' => 'radio', 'choices' => array('repeat' => 'Yes', 'repeat-x' => 'Only Horizontally', 'repeat-y' => 'Only Vertically', 'no-repeat' => 'No')));
        $wp_customize->add_control('background_position', array('label' => __('Background Position', THEMENAME), 'section' => 'general_options', 'priority' => 6, 'settings' => 'background_position', 'type' => 'radio', 'choices' => array('left top' => 'Left', 'right top' => 'Right', 'center top' => 'Center')));
        $wp_customize->add_control('background_attachment', array('label' => __('Background Attachment', THEMENAME), 'section' => 'general_options', 'priority' => 6, 'settings' => 'background_attachment', 'type' => 'radio', 'choices' => array('scroll' => 'Scroll', 'fixed' => 'Fixed')));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'content_background', array('label' => __('Content Area Background', THEMENAME), 'section' => 'general_options', 'settings' => 'content_background', 'priority' => 7)));
        $wp_customize->add_control('layout', array('label' => __('Default Layout', THEMENAME), 'section' => 'general_options', 'settings' => 'layout', 'type' => 'radio', 'priority' => 8, 'choices' => array('2col_right' => '2 Columns - Sidebar on the Right', '2col_left' => '2 Columns - Sidebar on the Left', '1col' => '1 Column - No Sidebar')));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'primary_color', array('label' => __('Primary Color', THEMENAME), 'section' => 'general_options', 'settings' => 'primary_color', 'priority' => 10)));
        $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'primary_text_color', array('label' => __('Primary Text Color', THEMENAME), 'section' => 'general_options', 'settings' => 'primary_text_color', 'priority' => 20)));
        $wp_customize->add_setting('favicon', array('default' => get_template_directory_uri() . '/images/defaults/favicon.ico'));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'favicon', array('label' => __('Favicon', THEMENAME), 'section' => 'general_options', 'settings' => 'favicon', 'priority' => 40)));
        $wp_customize->add_setting('touchicon', array('default' => get_template_directory_uri() . '/images/defaults/apple-touch-icon.png'));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'touchicon', array('label' => __('Apple Touch Icon', THEMENAME), 'section' => 'general_options', 'settings' => 'touchicon', 'priority' => 41)));
        $wp_customize->add_control('body_font', array('label' => __('Body Font', THEMENAME), 'section' => 'general_options', 'settings' => 'body_font', 'type' => 'select', 'priority' => 33, 'choices' => self::get_font_dropdown_options()));
        $wp_customize->add_control('heading_font', array('label' => __('Heading Font', THEMENAME), 'section' => 'general_options', 'settings' => 'heading_font', 'type' => 'select', 'priority' => 36, 'choices' => self::get_font_dropdown_options()));
        $wp_customize->add_control('font_character_set', array('label' => __('Character Set', THEMENAME), 'section' => 'general_options', 'settings' => 'font_character_set', 'type' => 'select', 'priority' => 36, 'choices' => array('latin' => 'Use Latin', 'cyrillic-ext' => 'Use Cyrillic if possible', 'greek-ext' => 'Use Greek if possible')));
        $wp_customize->add_control('search_page_heading', array('label' => __('Search Page Heading Font', THEMENAME), 'section' => 'general_options', 'settings' => 'search_page_heading', 'type' => 'select', 'priority' => 40, 'choices' => self::get_font_dropdown_options()));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'sidebars', array('label' => __('Sidebars', THEMENAME), 'priority' => 50, 'section' => 'general_options', 'settings' => 'sidebars', 'description' => 'Add custom sidebars, separated by commas. Once added, please reload this page to be able to select in the default sidebar list below')));
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['Sidebar'] = 'Sidebar';
        $sidebars['Property Page Sidebar'] = 'Property Page Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $wp_customize->add_control('sidebar', array('label' => 'Default Sidebar:', 'section' => 'general_options', 'priority' => 60, 'type' => 'select', 'choices' => $sidebars));
        $wp_customize->add_control('property_sidebar', array('label' => 'Default Property Page Sidebar:', 'settings' => 'property_sidebar', 'section' => 'general_options', 'priority' => 70, 'type' => 'select', 'choices' => $sidebars));
        $wp_customize->add_control('sidebar_responsiveness', array('label' => 'Sidebar on mobile devices:', 'settings' => 'sidebar_responsiveness', 'section' => 'general_options', 'priority' => 80, 'type' => 'radio', 'choices' => array('show' => 'Show sidebar below content', 'hide' => 'Hide the sidebar')));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'analytics', array('label' => __('Analytics', THEMENAME), 'priority' => 80, 'section' => 'general_options', 'settings' => 'analytics', 'description' => 'Add analytics code here. If you use more than one service paste each code block one under the other')));
        $wp_customize->add_control('read_more_text', array('label' => 'Read More Text:', 'settings' => 'read_more_text', 'section' => 'general_options', 'priority' => 90));
        $wp_customize->add_setting('decimal_separator', array('default' => '.'));
        $wp_customize->add_control('decimal_separator', array('label' => __('Decimal Separator', THEMENAME), 'section' => 'general_options', 'priority' => 100, 'settings' => 'decimal_separator'));
        $wp_customize->add_setting('thousand_separator', array('default' => '.'));
        $wp_customize->add_control('thousand_separator', array('label' => __('Thousand Separator', THEMENAME), 'section' => 'general_options', 'priority' => 110, 'settings' => 'thousand_separator'));
        $wp_customize->add_control('author_base', array('label' => __('Agent URL Base', THEMENAME), 'section' => 'general_options', 'priority' => 120, 'settings' => 'author_base'));
        // Property Options
        $wp_customize->add_setting('property_permalink', array('default' => 'property'));
        $wp_customize->add_control('property_permalink', array('label' => __('Property Permalink', THEMENAME), 'section' => 'property_options', 'priority' => 5, 'settings' => 'property_permalink'));
        $wp_customize->add_setting('property_slider_crop', array('default' => 'crop'));
        $wp_customize->add_control('property_slider_crop', array('label' => __('Crop Images In Slider', THEMENAME), 'section' => 'property_options', 'priority' => 6, 'settings' => 'property_slider_crop', 'type' => 'radio', 'choices' => array('crop' => 'Crop', 'full' => 'Don\'t crop (leaves whitespace next to image)')));
        $wp_customize->add_setting('property_excerpt_length', array('default' => 0));
        $wp_customize->add_control('property_excerpt_length', array('label' => __('Property Excerpt Length (0 for auto)', THEMENAME), 'section' => 'property_options', 'priority' => 6, 'settings' => 'property_excerpt_length'));
        $wp_customize->add_setting('property_post_links', array('default' => 'no'));
        $wp_customize->add_control('property_post_links', array('label' => __('Show links to next/prev properties?', THEMENAME), 'section' => 'property_options', 'priority' => 10, 'settings' => 'property_post_links', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('property_commenting', array('default' => 'no'));
        $wp_customize->add_control('property_commenting', array('label' => __('Allow Commenting on Properties?', THEMENAME), 'section' => 'property_options', 'priority' => 12, 'settings' => 'property_commenting', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('featured_ribbon', array('default' => get_template_directory_uri() . '/images/featured-flag.png', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'featured_ribbon', array('label' => __('Featured Ribbon', THEMENAME), 'section' => 'property_options', 'settings' => 'featured_ribbon', 'priority' => 14)));
        $wp_customize->add_setting('featured_ribbon_width', array('default' => '95'));
        $wp_customize->add_control('featured_ribbon_width', array('label' => __('Featured Ribbon Width', THEMENAME), 'section' => 'property_options', 'priority' => 15, 'settings' => 'featured_ribbon_width'));
        $wp_customize->add_setting('featured_ribbon_height', array('default' => '95'));
        $wp_customize->add_control('featured_ribbon_height', array('label' => __('Featured Ribbon Height', THEMENAME), 'section' => 'property_options', 'priority' => 16, 'settings' => 'featured_ribbon_height'));
        $wp_customize->add_setting('property_ribbon_field', array('default' => '_est_meta_price'));
        $wp_customize->add_control('property_ribbon_field', array('label' => __('Field To Show In Ribbon', THEMENAME), 'section' => 'property_options', 'settings' => 'property_ribbon_field', 'priority' => 20, 'type' => 'select', 'choices' => get_custom_detail_array()));
        $wp_customize->add_setting('show_print', array('default' => 'yes'));
        $wp_customize->add_control('show_print', array('label' => __('Show Print Button?', THEMENAME), 'section' => 'property_options', 'priority' => 30, 'settings' => 'show_print', 'type' => 'radio', 'choices' => array('yes' => 'Yes', 'no' => 'No')));
        $wp_customize->add_setting('print_icon', array('default' => 'http://cdn.printfriendly.com/button-print-gry20.png', 'transport' => 'postMessage'));
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'print_icon', array('label' => __('Print Icon', THEMENAME), 'section' => 'property_options', 'settings' => 'print_icon', 'priority' => 40)));
        // Blog Options
        $wp_customize->add_setting('content_length', array('default' => 'excerpt'));
        $wp_customize->add_control('content_length', array('label' => __('Content to show in lists', THEMENAME), 'section' => 'blog_options', 'priority' => 10, 'settings' => 'content_length', 'type' => 'radio', 'choices' => array('excerpt' => 'Excerpt', 'content' => 'Full Content')));
        $wp_customize->add_setting('blog_title', array('default' => 'Archives'));
        $wp_customize->add_control('blog_title', array('label' => __('The title to show on the blog page', THEMENAME), 'section' => 'blog_options', 'priority' => 10, 'settings' => 'blog_title', 'type' => 'text'));
        $wp_customize->add_setting('blog_slider', array('default' => ''));
        $wp_customize->add_control('blog_slider', array('label' => __('Slider to show on main blog page', THEMENAME), 'section' => 'blog_options', 'priority' => 10, 'settings' => 'blog_slider', 'type' => 'text'));
        // 1.3.2 Header Controls
        // 1.3.3 API Controls
        $wp_customize->add_control('google_maps_api_key', array('label' => __('Google Maps API Key', THEMENAME), 'section' => 'api_keys'));
        $wp_customize->add_control('facebook_api_key', array('label' => __('Facebook API Key', THEMENAME), 'section' => 'api_keys'));
        $wp_customize->add_control('twitter_consumer_key', array('label' => __('Twitter Consumer Key', THEMENAME), 'section' => 'api_keys'));
        $wp_customize->add_control('twitter_consumer_secret', array('label' => __('Twitter Consumer Secret', THEMENAME), 'section' => 'api_keys'));
        $wp_customize->add_control('twitter_access_token', array('label' => __('Twitter Access Token', THEMENAME), 'section' => 'api_keys'));
        $wp_customize->add_control('twitter_access_secret', array('label' => __('Twitter Access Secret', THEMENAME), 'section' => 'api_keys'));
        // Error Controls
        $wp_customize->add_control('404_title', array('label' => __('404 Error Title', THEMENAME), 'section' => 'error_options', 'priority' => 10));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, '404_message', array('label' => __('404 Error Message', THEMENAME), 'priority' => 20, 'section' => 'error_options', 'settings' => '404_message')));
        $wp_customize->add_control('no_posts_title', array('label' => __('No Content Title', THEMENAME), 'section' => 'error_options', 'priority' => 60, 'settings' => 'no_posts_title'));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'no_posts_message', array('label' => __('No Content Message', THEMENAME), 'priority' => 70, 'section' => 'error_options', 'settings' => 'no_posts_message')));
        $wp_customize->add_control('no_search_title', array('label' => __('No Search Results Title', THEMENAME), 'section' => 'error_options', 'priority' => 80, 'settings' => 'no_search_title'));
        $wp_customize->add_control(new WP_Customize_Textarea_Control($wp_customize, 'no_search_message', array('label' => __('No Search Results Message', THEMENAME), 'priority' => 90, 'section' => 'error_options', 'settings' => 'no_search_message')));
        $wp_customize->add_control('no_search_include_page', array('label' => __('Include a Page When No Search Results', THEMENAME), 'section' => 'error_options', 'settings' => 'no_search_include_page', 'type' => 'select', 'priority' => 100, 'choices' => self::get_page_dropdown_options()));
    }