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 }
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><a href="#" class="btn">Button text</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('' => ' ', '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 }
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'); }
function ci_add_all_formats_meta_box($object, $box) { ci_prepare_metabox('post'); ci_metabox_checkbox('ci_format_slider', 'slider', __("Show this post's image/video on the homepage slider.", 'ci_theme')); }