function ci_add_format_video_meta_box($object, $box)
    {
        ci_prepare_metabox('post');
        ?>
<p><?php 
        echo sprintf(__('In the following box, you can simply enter the URL of a supported website\'s video. It needs to start with <strong>http://</strong> or <strong>https://</strong> (E.g. <em>%1$s</em>). A list of supported websites can be <a href="%2$s">found here</a>.', 'ci_theme'), 'https://www.youtube.com/watch?v=4Z9WVZddH9w', 'https://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F');
        ?>
</p><?php 
        ci_metabox_input('ci_format_video_url', __('The URL of the video to be embedded:', 'ci_theme'), array('esc_func' => 'esc_url'));
    }
Beispiel #2
0
    function ci_slider_score_meta_box($object, $box)
    {
        ci_prepare_metabox('cpt_slider');
        ?>
<div class="ci-cf-wrap"><?php 
        ci_metabox_open_tab(false);
        ci_metabox_input('ci_cpt_slider_url', __('Slide URL. If someone clicks on this slide, this is the link that they will be visiting. If you leave it empty, linking for this slide will be disabled.', 'ci_theme'), array('esc_func' => 'esc_url'));
        ci_metabox_input('ci_cpt_slider_text', __('Slide text (appears below the title)', 'ci_theme'));
        ci_metabox_guide(sprintf(__('In the following box, you can simply enter the URL of a supported website\'s video. It needs to start with <code>http://</code> or <code>https://</code> (E.g. <code>%1$s</code>). A list of supported websites can be <a href="%2$s">found here</a>. When a video is shown, no text appears in the slide (e.g. title, content, button).', 'ci_theme'), 'http://www.youtube.com/watch?v=4Z9WVZddH9w', 'http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F'));
        ci_metabox_input('ci_cpt_slider_video_url', __('Video URL:', 'ci_theme'));
        ci_metabox_close_tab();
        ?>
</div><?php 
    }
Beispiel #3
0
    function ci_cpt_galleries_score_meta_box($object, $box)
    {
        ci_prepare_metabox('cpt_gallery');
        ?>
<div class="ci-cf-wrap"><?php 
        ci_metabox_open_tab(false);
        ci_metabox_input('ci_cpt_gallery_location', __('Photo gallery Location. For example: Ibiza, Spain', 'ci_theme'));
        ci_metabox_checkbox('ci_cpt_gallery_caption', 'on', __('Enable image captions', 'ci_theme'));
        ci_metabox_guide(__('You can create a featured gallery by pressing the "Add Images" button below. You should also set a featured image that will be used as this Gallery\'s cover.', 'ci_theme'));
        ci_metabox_gallery();
        $options = array();
        for ($i = 1; $i <= 4; $i++) {
            $options[$i] = sprintf(_n('1 Column', '%s Columns', $i, 'ci_theme'), $i);
        }
        ci_metabox_dropdown('ci_cpt_gallery_cols', $options, __('Number of columns to display this gallery in:', 'ci_theme'), array('default' => 'col-md-4'));
        ci_metabox_checkbox('ci_cpt_gallery_masonry', 'on', __('Masonry effect (not applicable to 1 column layout).', 'ci_theme'));
        ci_metabox_close_tab();
        ?>
</div><?php 
    }
Beispiel #4
0
    function ci_cpt_video_score_meta_box($object, $box)
    {
        ci_prepare_metabox('cpt_video');
        ?>
<div class="ci-cf-wrap"><?php 
        ci_metabox_open_tab(__('Details', 'ci_theme'));
        ci_metabox_input('ci_cpt_video_location', __('Video Location. For example: Ibiza, Spain', 'ci_theme'));
        ci_metabox_input('ci_cpt_video_date', __('Date Taken.', 'ci_theme'));
        ci_metabox_guide(sprintf(__('In the following box, you can simply enter the URL of a supported website\'s video. It needs to start with <code>http://</code> or <code>https://</code> (E.g. <code>%1$s</code>). A list of supported websites can be <a href="%2$s">found here</a>.', 'ci_theme'), 'http://www.youtube.com/watch?v=4Z9WVZddH9w', 'http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F'));
        ci_metabox_input('ci_cpt_video_url', __('Video URL:', 'ci_theme'), array('esc_func' => 'esc_url'));
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Information', 'ci_theme'));
        ci_metabox_guide(array(__('You may include as many rows of information as you want. Press <em>Add Field</em> to add a new row. Press <em>Remove me</em> to delete a specific row. You can rearrange rows by drag and drop. You may leave empty the title or the description, but not both.', 'ci_theme'), __('Allowed tags in description: a (href, class), span (class), i (class), b, em, strong. E.g.: <code>&lt;a href="#" class="btn">Button text&lt;/a></code>', 'ci_theme')), array('type' => 'p'));
        ?>
			<fieldset class="ci-repeating-fields">
				<div class="inner">
					<?php 
        $fields = get_post_meta($object->ID, 'ci_cpt_video_fields', true);
        if (!empty($fields)) {
            foreach ($fields as $field) {
                ?>
								<div class="post-field">
									<label><?php 
                _e('Title:', 'ci_theme');
                ?>
 <input type="text" name="ci_cpt_video_fields_repeatable_title[]" value="<?php 
                echo esc_attr($field['title']);
                ?>
" class="widefat" /></label>
									<label><?php 
                _e('Description:', 'ci_theme');
                ?>
 <input type="text" name="ci_cpt_video_fields_repeatable_description[]" value="<?php 
                echo esc_attr($field['description']);
                ?>
" class="widefat" /></label>
									<p class="ci-repeating-remove-action"><a href="#" class="button ci-repeating-remove-field"><i class="dashicons dashicons-dismiss"></i><?php 
                _e('Remove me', 'ci_theme');
                ?>
</a></p>
								</div>
								<?php 
            }
        }
        ?>
					<div class="post-field field-prototype" style="display: none;">
						<label><?php 
        _e('Title:', 'ci_theme');
        ?>
 <input type="text" name="ci_cpt_video_fields_repeatable_title[]" value="" class="widefat" /></label>
						<label><?php 
        _e('Description:', 'ci_theme');
        ?>
 <input type="text" name="ci_cpt_video_fields_repeatable_description[]" value="" class="widefat" /></label>
						<p class="ci-repeating-remove-action"><a href="#" class="button ci-repeating-remove-field"><i class="dashicons dashicons-dismiss"></i><?php 
        _e('Remove me', 'ci_theme');
        ?>
</a></p>
					</div>
				</div>
				<a href="#" class="ci-repeating-add-field button"><i class="dashicons dashicons-plus-alt"></i><?php 
        _e('Add Field', 'ci_theme');
        ?>
</a>
			</fieldset>
			<?php 
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Sidebar', 'ci_theme'));
        ci_metabox_guide(__("You can change the placement of the informational sidebar of this post, to be either always on the left or always on the right. If you leave it empty, it will follow the global <strong>Site layout</strong> option, which can be changed from the Theme's settings panel.", 'ci_theme'));
        $options = array('' => '&nbsp', 'left' => __('Always left', 'ci_theme'), 'right' => __('Always right', 'ci_theme'));
        ci_metabox_dropdown('meta_placement', $options, __('Sidebar placement:', 'ci_theme'));
        ci_metabox_close_tab();
        ?>
</div><?php 
    }
Beispiel #5
0
    function ci_cpt_event_score_meta_box($object, $box)
    {
        ci_prepare_metabox('cpt_event');
        ?>
<div class="ci-cf-wrap"><?php 
        ci_metabox_open_tab(__('Details', 'ci_theme'));
        ci_metabox_input('ci_cpt_event_location', __('Event Location. For example: Ibiza, Spain', 'ci_theme'));
        ci_metabox_input('ci_cpt_event_venue', __('Event Venue. For example: Ushuaia', 'ci_theme'));
        ci_metabox_checkbox('ci_cpt_event_recurrent', 'enabled', __('Recurrent Event', 'ci_theme'));
        ?>
<div id="event_recurrent"><?php 
        ci_metabox_input('ci_cpt_event_recurrence', __('Event Recurrence (e.g. <b>Every TUE at 22:00</b>).', 'ci_theme'));
        ?>
</div><?php 
        ?>
<div id="event_datetime"><?php 
        ci_metabox_input('ci_cpt_event_date', __('Event Date. Use the Date Picker (Click inside the field).', 'ci_theme'));
        ci_metabox_input('ci_cpt_event_time', __('Event Time (e.g. <b>21:00</b>)', 'ci_theme'));
        ?>
</div><?php 
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Information', 'ci_theme'));
        ci_metabox_guide(array(__('You may include as many rows of information as you want. Press <em>Add Field</em> to add a new row. Press <em>Remove me</em> to delete a specific row. You can rearrange rows by drag and drop. You may leave empty the title or the description, but not both.', 'ci_theme'), __('Allowed tags in description: a (href, class), span (class), i (class), b, em, strong. E.g.: <code>&lt;a href="#" class="btn">Button text&lt;/a></code>', 'ci_theme')), array('type' => 'p'));
        ?>
			<fieldset class="ci-repeating-fields">
				<div class="inner">
					<?php 
        $fields = get_post_meta($object->ID, 'ci_cpt_event_fields', true);
        if (!empty($fields)) {
            foreach ($fields as $field) {
                ?>
								<div class="post-field">
									<label><?php 
                _e('Title:', 'ci_theme');
                ?>
 <input type="text" name="ci_cpt_event_fields_repeatable_title[]" value="<?php 
                echo esc_attr($field['title']);
                ?>
" class="widefat" /></label>
									<label><?php 
                _e('Description:', 'ci_theme');
                ?>
 <input type="text" name="ci_cpt_event_fields_repeatable_description[]" value="<?php 
                echo esc_attr($field['description']);
                ?>
" class="widefat" /></label>
									<p class="ci-repeating-remove-action"><a href="#" class="button ci-repeating-remove-field"><i class="dashicons dashicons-dismiss"></i><?php 
                _e('Remove me', 'ci_theme');
                ?>
</a></p>
								</div>
								<?php 
            }
        }
        ?>
						<div class="post-field field-prototype" style="display: none;">
							<label><?php 
        _e('Title:', 'ci_theme');
        ?>
 <input type="text" name="ci_cpt_event_fields_repeatable_title[]" value="" class="widefat" /></label>
							<label><?php 
        _e('Description:', 'ci_theme');
        ?>
 <input type="text" name="ci_cpt_event_fields_repeatable_description[]" value="" class="widefat" /></label>
							<p class="ci-repeating-remove-action"><a href="#" class="button ci-repeating-remove-field"><i class="dashicons dashicons-dismiss"></i><?php 
        _e('Remove me', 'ci_theme');
        ?>
</a></p>
						</div>
				</div>
				<a href="#" class="ci-repeating-add-field button"><i class="dashicons dashicons-plus-alt"></i><?php 
        _e('Add Field', 'ci_theme');
        ?>
</a>
			</fieldset>
			<?php 
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Status', 'ci_theme'));
        ci_metabox_guide(__("In this section you can create two status buttons. The <em>Upcoming date</em> button will be the one displayed <strong>before</strong> the event's date, while the <em>Past date</em> button will be displayed <strong>after</strong> the event's date passes. This is useful so that you will not need to keep coming back editing the event, in situations like, providing a <em>Buy Tickets</em> button before the event and a <em>Watch Recorded</em> button afterwards. Leave a button's URL empty if you want it to be unclickable (e.g. when <strong>Canceled)</strong>.", 'ci_theme'));
        ?>
<h4><?php 
        _e('Upcoming date button', 'ci_theme');
        ?>
</h4><?php 
        ci_metabox_input('ci_cpt_event_upcoming_button', __('Button text (e.g. <em>Buy now</em>, <em>Watch live</em>, etc):', 'ci_theme'));
        ci_metabox_input('ci_cpt_event_upcoming_url', __('Button URL:', 'ci_theme'), array('esc_func' => 'esc_url'));
        ?>
<h4><?php 
        _e('Past date button', 'ci_theme');
        ?>
</h4><?php 
        ci_metabox_input('ci_cpt_event_past_button', __('Button text (e.g. <em>Buy album</em>, <em>Watch recorded</em>, etc):', 'ci_theme'));
        ci_metabox_input('ci_cpt_event_past_url', __('Button URL:', 'ci_theme'), array('esc_func' => 'esc_url'));
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Map', 'ci_theme'));
        ci_metabox_guide(__('Enter a place or address and press <em>Search place/address</em>. Alternatively, you can drag the marker to the desired position, or double click on the map to set a new location.', 'ci_theme'));
        ?>
			<fieldset class="gllpLatlonPicker">
				<input type="text" class="gllpSearchField">
				<input type="button" class="button gllpSearchButton" value="<?php 
        _e('Search place/address', 'ci_theme');
        ?>
">
				<div class="gllpMap"><?php 
        _e('Google Maps', 'ci_theme');
        ?>
</div>
				<input type="hidden" class="gllpZoom" value="8"/>
				<?php 
        ci_metabox_input('ci_cpt_event_lat', __('Location Latitude.', 'ci_theme'), array('input_class' => 'widefat gllpLatitude', 'default' => '36'));
        ci_metabox_input('ci_cpt_event_lon', __('Location Longitude.', 'ci_theme'), array('input_class' => 'widefat gllpLongitude', 'default' => '-120'));
        ?>
				<p><input type="button" class="button gllpUpdateButton" value="<?php 
        esc_attr_e('Update map', 'ci_theme');
        ?>
"></p>
			</fieldset>
			<?php 
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Sidebar', 'ci_theme'));
        ci_metabox_guide(__("You can change the placement of the informational sidebar of this post, to be either always on the left or always on the right. If you leave it empty, it will follow the global <strong>Site layout</strong> option, which can be changed from the Theme's settings panel.", 'ci_theme'));
        $options = array('' => '&nbsp', 'left' => __('Always left', 'ci_theme'), 'right' => __('Always right', 'ci_theme'));
        ci_metabox_dropdown('meta_placement', $options, __('Sidebar placement:', 'ci_theme'));
        ci_metabox_close_tab();
        ?>
</div><?php 
    }
Beispiel #6
0
    function ci_discography_score_meta_box($object, $box)
    {
        ci_prepare_metabox('cpt_discography');
        ?>
<div class="ci-cf-wrap"><?php 
        ci_metabox_open_tab(__('Details', 'ci_theme'));
        ci_metabox_input('ci_cpt_discography_date', __('Release Date.', 'ci_theme'));
        ci_metabox_input('ci_cpt_discography_label', __('Record Label.', 'ci_theme'));
        ci_metabox_input('ci_cpt_discography_cat_no', __('Catalog Number.', 'ci_theme'));
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Information', 'ci_theme'));
        ci_metabox_guide(array(__('You may include as many rows of information as you want. Press <em>Add Field</em> to add a new row. Press <em>Remove me</em> to delete a specific row. You can rearrange rows by drag and drop. You may leave empty the title or the description, but not both.', 'ci_theme'), __('Allowed tags in description: a (href, class), span (class), i (class), b, em, strong. E.g.: <code>&lt;a href="#" class="btn">Button text&lt;/a></code>', 'ci_theme')));
        ?>
			<fieldset class="ci-repeating-fields">
				<div class="inner">
					<?php 
        $fields = get_post_meta($object->ID, 'ci_cpt_discography_fields', true);
        if (!empty($fields)) {
            foreach ($fields as $field) {
                ?>
								<div class="post-field">
									<p>
										<label><?php 
                _e('Title:', 'ci_theme');
                ?>
											<input type="text" name="ci_cpt_discography_fields_repeatable_title[]" value="<?php 
                echo esc_attr($field['title']);
                ?>
" class="widefat" />
										</label>
									</p>
									<p>
										<label><?php 
                _e('Description:', 'ci_theme');
                ?>
											<input type="text" name="ci_cpt_discography_fields_repeatable_description[]" value="<?php 
                echo esc_attr($field['description']);
                ?>
" class="widefat" />
										</label>
									</p>
									<p class="ci-repeating-remove-action"><a href="#" class="button ci-repeating-remove-field"><i class="dashicons dashicons-dismiss"></i><?php 
                _e('Remove me', 'ci_theme');
                ?>
</a></p>
								</div>
								<?php 
            }
        }
        ?>
						<div class="post-field field-prototype" style="display: none;">
							<p>
								<label><?php 
        _e('Title:', 'ci_theme');
        ?>
									<input type="text" name="ci_cpt_discography_fields_repeatable_title[]" value="" class="widefat" />
								</label>
							</p>
							<p>
								<label><?php 
        _e('Description:', 'ci_theme');
        ?>
									<input type="text" name="ci_cpt_discography_fields_repeatable_description[]" value="" class="widefat" />
								</label>
							</p>
							<p class="ci-repeating-remove-action"><a href="#" class="button ci-repeating-remove-field"><i class="dashicons dashicons-dismiss"></i><?php 
        _e('Remove me', 'ci_theme');
        ?>
</a></p>
						</div>
				</div>
				<a href="#" class="ci-repeating-add-field button"><i class="dashicons dashicons-plus-alt"></i><?php 
        _e('Add Field', 'ci_theme');
        ?>
</a>
			</fieldset>
			<?php 
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Tracks', 'ci_theme'));
        ci_metabox_guide(__('You may add the tracks of your release, along with related information such as a Download URL, Buy URL and lyrics. Press the <em>Add Track</em> button to add a new track, and individually the <em>Remove me</em> button to delete a track. You can also use a SoundCloud URL in place of the Play URL.', 'ci_theme'));
        ?>
			<div id="ci_repeating_tracks" class="ci-repeating-fields">
				<a href="#" class="ci-repeating-add-field button"><i class="dashicons dashicons-plus-alt"></i><?php 
        _e('Add Track', 'ci_theme');
        ?>
</a>
				<table class="tracks inner">
					<thead>
					 <tr>
						 <th class="tracks-no"><?php 
        _e('#', 'ci_theme');
        ?>
</th>
						 <th><?php 
        _e('Title', 'ci_theme');
        ?>
</th>
						 <th><?php 
        _e('Subtitle', 'ci_theme');
        ?>
</th>
						 <th><?php 
        _e('Buy URL', 'ci_theme');
        ?>
</th>
						 <th><?php 
        _e('Play URL', 'ci_theme');
        ?>
</th>
						 <th><?php 
        _e('Download URL', 'ci_theme');
        ?>
</th>
						 <th class="tracks-action"></th>
					 </tr>
					</thead>
						<?php 
        $fields = get_post_meta($object->ID, 'ci_cpt_discography_tracks', true);
        if (!empty($fields)) {
            $i = 0;
            foreach ($fields as $field) {
                $i++;
                ?>
									<tbody class="track-group post-field">
										<tr>
											<td class="tracks-no" rowspan="2"><span class="dashicons dashicons-sort"></span><?php 
                _ex('#', 'track number', 'ci_theme');
                ?>
<span class="track-num"><?php 
                echo $i;
                ?>
</span></td>
											<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_title[]" placeholder="<?php 
                _e('Title', 'ci_theme');
                ?>
" value="<?php 
                echo esc_attr($field['title']);
                ?>
" /></td>
											<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_artist[]" placeholder="<?php 
                _e('Artist', 'ci_theme');
                ?>
" value="<?php 
                echo esc_attr($field['artist']);
                ?>
" /></td>
											<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_buy_url[]" placeholder="<?php 
                _e('Buy URL', 'ci_theme');
                ?>
" value="<?php 
                echo esc_url($field['buy_url']);
                ?>
" /></td>
											<td class="tracks-field"><div class="wp-media-buttons"><input type="text" name="ci_cpt_discography_tracks_repeatable_play_url[]" placeholder="<?php 
                _e('Play URL', 'ci_theme');
                ?>
" value="<?php 
                echo esc_url($field['play_url']);
                ?>
" class="uploaded with-button" /><a href="#" class="ci-upload ci-upload-track button add_media"><span class="wp-media-buttons-icon"></span></a></div></td>
											<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_download_url[]" placeholder="<?php 
                _e('Download URL', 'ci_theme');
                ?>
" value="<?php 
                echo esc_url($field['download_url']);
                ?>
" /></td>
											<td class="tracks-action"><a href="#" class="ci-repeating-remove-field"><span class="dashicons dashicons-no"></span></a></td>
										</tr>
										<tr>
											<td class="tracks-field" colspan="6"><textarea placeholder="<?php 
                _e('Song Lyrics', 'ci_theme');
                ?>
" name="ci_cpt_discography_tracks_repeatable_lyrics[]"><?php 
                echo esc_textarea($field['lyrics']);
                ?>
</textarea></td>
										</tr>
									</tbody>
									<?php 
            }
        }
        ?>
						<tbody class="track-group post-field field-prototype" style="display: none;">
							<tr>
								<td class="tracks-no" rowspan="2"><span class="dashicons dashicons-sort"></span><?php 
        _ex('#', 'track number', 'ci_theme');
        ?>
<span class="track-num"></span></td>
								<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_title[]" placeholder="<?php 
        _e('Title', 'ci_theme');
        ?>
" value="" /></td>
								<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_artist[]" placeholder="<?php 
        _e('Artist', 'ci_theme');
        ?>
" value="" /></td>
								<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_buy_url[]" placeholder="<?php 
        _e('Buy URL', 'ci_theme');
        ?>
" value="" /></td>
								<td class="tracks-field"><div class="wp-media-buttons"><input type="text" name="ci_cpt_discography_tracks_repeatable_play_url[]" placeholder="<?php 
        _e('Play URL', 'ci_theme');
        ?>
" value="" class="uploaded with-button" /><a href="#" class="ci-upload ci-upload-track button add_media"><span class="wp-media-buttons-icon"></span></a></div></td>
								<td class="tracks-field"><input type="text" name="ci_cpt_discography_tracks_repeatable_download_url[]" placeholder="<?php 
        _e('Download URL', 'ci_theme');
        ?>
" value="" /></td>
								<td class="tracks-action"><a href="#" class="ci-repeating-remove-field"><span class="dashicons dashicons-no"></span></a></td>
							</tr>
							<tr>
								<td class="tracks-field" colspan="6"><textarea placeholder="<?php 
        _e('Song Lyrics', 'ci_theme');
        ?>
" name="ci_cpt_discography_tracks_repeatable_lyrics[]"></textarea></td>
							</tr>
						</tbody>
				</table>
				<a href="#" class="ci-repeating-add-field button"><i class="dashicons dashicons-plus-alt"></i><?php 
        _e('Add Track', 'ci_theme');
        ?>
</a>
			</div>
			<?php 
        ci_metabox_guide(array(__('Your tracks will be displayed on top of your content. If you want to show them in another place in the content, you can use the <code>[tracklisting]</code> shortcode at the desired position.', 'ci_theme'), __('The <code>[tracklisting]</code> shortcode, by default will display the tracks of the current discography item. You may also display the track listing of any discography item in any other post/page or widget (that supports shortcodes) by passing the <code>ID</code> or <code>slug</code> parameter to the shortcode. E.g. <code>[tracklisting id="25"]</code> or <code>[tracklisting slug="the-division-bell"]</code>', 'ci_theme'), __('You can also selectively display tracks, by passing their track number (counting from 1), separated by a comma, like this <code>[tracklisting tracks="2,5,8"]</code> and can limit the total number of tracks displayed like <code>[tracklisting limit="3"]</code>', 'ci_theme'), __('Of course, you can mix and match the parameters, so the following is totally valid: <code>[tracklisting slug="the-division-bell" tracks="2,5,8" limit="2"]</code>', 'ci_theme'), __("You may also add a SoundCloud track by copying the track's URL (the one given by it's <em>Share</em> button) and pasting it into the Play URL field.", 'ci_theme')));
        ci_metabox_close_tab();
        ci_metabox_open_tab(__('Sidebar', 'ci_theme'));
        ci_metabox_guide(__("You can change the placement of the informational sidebar of this post, to be either always on the left or always on the right. If you leave it empty, it will follow the global <strong>Site layout</strong> option, which can be changed from the Theme's settings panel.", 'ci_theme'));
        $options = array('' => '&nbsp', 'left' => __('Always left', 'ci_theme'), 'right' => __('Always right', 'ci_theme'));
        ci_metabox_dropdown('meta_placement', $options, __('Sidebar placement:', 'ci_theme'));
        ci_metabox_close_tab();
        ?>
</div><!-- /ci-cf-wrap --><?php 
    }
Beispiel #7
0
    function ci_add_page_events_listing_meta_box($object, $box)
    {
        ci_prepare_metabox('page');
        ?>
<div class="ci-cf-wrap"><?php 
        ci_metabox_open_tab(false);
        ci_metabox_checkbox('events_listing_upcoming', 'on', __('Show upcoming events.', 'ci_theme'), array('default' => 'on'));
        ci_metabox_input('events_listing_upcoming_title', __('Upcoming events title:', 'ci_theme'), array('default' => __('Upcoming Events', 'ci_theme')));
        ci_metabox_checkbox('events_listing_past', 'on', __('Show past events.', 'ci_theme'), array('default' => 'on'));
        ci_metabox_input('events_listing_past_title', __('Past events title:', 'ci_theme'), array('default' => __('Past Events', 'ci_theme')));
        $options = array();
        for ($i = 1; $i <= 4; $i++) {
            $options[$i] = sprintf(_n('1 Column', '%s Columns', $i, 'ci_theme'), $i);
        }
        ci_metabox_dropdown('events_listing_columns', $options, __('Events listing columns:', 'ci_theme'));
        ci_metabox_checkbox('events_listing_masonry', 'on', __('Masonry effect (not applicable to 1 column layout).', 'ci_theme'));
        ci_metabox_checkbox('events_listing_isotope', 'on', __('Isotope effect (ignores <em>Items per page</em> setting.', 'ci_theme'));
        ci_metabox_guide(sprintf(__('Set the number of items per page that you want to display. Setting this to <strong>-1</strong> will show <strong>all items</strong>, while setting it to zero or leaving it empty, will follow the global option set from <em>Settings -> Reading</em>, currently set to <strong>%s items per page</strong>.', 'ci_theme'), get_option('posts_per_page')));
        ci_metabox_input('events_listing_posts_per_page', __('Items per page:', 'ci_theme'));
        ci_metabox_close_tab();
        ?>
</div><?php 
        ci_bind_metabox_to_page_template('ci_page_events_listing_meta', 'template-listing-events.php', 'events_listing_metabox');
    }