/** * output function. */ public function output($atts = array()) { $this->submit_handler(); $this->submit(); } /** * Submit Step */ public function submit() { $event = get_post($this->event_id); if (empty($this->event_id) || $event->post_status !== 'publish' && !event_manager_user_can_edit_pending_submissions()) { echo wpautop(__('Invalid listing', 'gam-event-manager')); return; } $this->init_fields(); foreach ($this->fields as $group_key => $group_fields) { foreach ($group_fields as $key => $field) { if (!isset($this->fields[$group_key][$key]['value'])) { if ('event_title' === $key) { $this->fields[$group_key][$key]['value'] = $event->post_title; } elseif ('event_description' === $key) { $this->fields[$group_key][$key]['value'] = $event->post_content; } elseif (!empty($field['taxonomy'])) { $this->fields[$group_key][$key]['value'] = wp_get_object_terms($event->ID, $field['taxonomy'], array('fields' => 'ids'));
?> <?php } elseif ('view_count' === $key) { echo get_post_views_count($event); ?> <?php } else { ?> <?php do_action('event_manager_event_dashboard_column_' . $key, $event); ?> <?php } ?> </td> <?php } ?> </tr> <?php } ?> <?php } ?> </tbody> </table> <?php get_event_manager_template('pagination.php', array('max_num_pages' => $max_num_pages)); ?> </div>
<!-- Organizer logo section start --> <div class="text-center"> <?php do_action('event_single_organizer_logo_start'); ?> <?php display_organizer_logo(); ?> <?php do_action('event_single_organizer_logo_end'); ?> </div> <!-- Organizer logo section end --> <!-- Organizer description start --> <h3 class="section-title"><?php _e('About', 'gam-event-manager'); ?> <?php echo display_organizer_name(); ?> </h3> <div class="text-justify"><?php echo get_organizer_description(); ?> </div> <!-- Organizer description end--> <?php
/** * Register and enqueue scripts and css */ public function frontend_scripts() { $ajax_url = GAM_Event_Manager_Ajax::get_endpoint(); $ajax_filter_deps = array('jquery', 'jquery-deserialize'); //jQuery Chosen - vendor if (apply_filters('event_manager_chosen_enabled', true)) { wp_register_script('chosen', EVENT_MANAGER_PLUGIN_URL . '/assets/js/jquery-chosen/chosen.jquery.min.js', array('jquery'), '1.1.0', true); wp_register_script('gam-event-manager-term-multiselect', EVENT_MANAGER_PLUGIN_URL . '/assets/js/term-multiselect.min.js', array('jquery', 'chosen'), EVENT_MANAGER_VERSION, true); wp_register_script('gam-event-manager-multiselect', EVENT_MANAGER_PLUGIN_URL . '/assets/js/multiselect.min.js', array('jquery', 'chosen'), EVENT_MANAGER_VERSION, true); wp_enqueue_style('chosen', EVENT_MANAGER_PLUGIN_URL . '/assets/css/chosen.css'); $ajax_filter_deps[] = 'chosen'; } //file upload - vendor if (apply_filters('event_manager_ajax_file_upload_enabled', true)) { wp_register_script('jquery-iframe-transport', EVENT_MANAGER_PLUGIN_URL . '/assets/js/jquery-fileupload/jquery.iframe-transport.js', array('jquery'), '1.8.3', true); wp_register_script('jquery-fileupload', EVENT_MANAGER_PLUGIN_URL . '/assets/js/jquery-fileupload/jquery.fileupload.js', array('jquery', 'jquery-iframe-transport', 'jquery-ui-widget'), '5.42.3', true); wp_register_script('gam-event-manager-ajax-file-upload', EVENT_MANAGER_PLUGIN_URL . '/assets/js/ajax-file-upload.min.js', array('jquery', 'jquery-fileupload'), EVENT_MANAGER_VERSION, true); ob_start(); get_event_manager_template('form-fields/uploaded-file-html.php', array('name' => '', 'value' => '', 'extension' => 'jpg')); $js_field_html_img = ob_get_clean(); ob_start(); get_event_manager_template('form-fields/uploaded-file-html.php', array('name' => '', 'value' => '', 'extension' => 'zip')); $js_field_html = ob_get_clean(); wp_localize_script('gam-event-manager-ajax-file-upload', 'event_manager_ajax_file_upload', array('ajax_url' => $ajax_url, 'js_field_html_img' => esc_js(str_replace("\n", "", $js_field_html_img)), 'js_field_html' => esc_js(str_replace("\n", "", $js_field_html)), 'i18n_invalid_file_type' => __('Invalid file type. Accepted types:', 'gam-event-manager'))); } //jQuery Desrialize - vendor wp_register_script('jquery-deserialize', EVENT_MANAGER_PLUGIN_URL . '/assets/js/jquery-deserialize/jquery.deserialize.js', array('jquery'), '1.2.1', true); //main frontend, bootstrap & bootstrap calendar style wp_register_style('bootstrap-main-css', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap/css/bootstrap.min.css'); wp_register_style('bootstrap-datetime-picker-css', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap-datetime-picker/bootstrap-datetimepicker.min.css'); if (!wp_style_is('bootstrap.min.css', 'enqueued')) { wp_enqueue_style('bootstrap-main-css'); } if (!wp_style_is('bootstrap-datetimepicker.min.css', 'enqueued')) { wp_enqueue_style('bootstrap-datetime-picker-css'); } wp_enqueue_style('gam-event-manager-frontend', EVENT_MANAGER_PLUGIN_URL . '/assets/css/frontend.css'); //bootstrap, moment and bootstrap calendar js wp_register_script('bootstrap-main-js', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap/js/bootstrap.min.js', array('jquery'), EVENT_MANAGER_VERSION, true); wp_register_script('moment', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap-datetime-picker/moment-with-locales.min.js', array('bootstrap-main-js'), EVENT_MANAGER_VERSION, true); wp_register_script('bootstrap-datetime-picker-js', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap-datetime-picker/bootstrap-datetimepicker.min.js', array('moment'), EVENT_MANAGER_VERSION, true); if (!wp_script_is('bootstrap.min.js', 'enqueued')) { wp_enqueue_script('bootstrap-main-js'); } if (!wp_script_is('bootstrap-datetimepicker.min.js', 'enqueued')) { wp_enqueue_script('bootstrap-datetime-picker-js'); } //wp_enqueue_script( 'moment'); //common js wp_register_script('gam-event-manager-common', EVENT_MANAGER_PLUGIN_URL . '/assets/js/common.min.js', array('jquery'), EVENT_MANAGER_VERSION, true); wp_enqueue_script('gam-event-manager-common'); //event submission forms and validation js wp_register_script('gam-event-manager-event-submission', EVENT_MANAGER_PLUGIN_URL . '/assets/js/event-submission.min.js', array('jquery', 'bootstrap-datetime-picker-js'), EVENT_MANAGER_VERSION, true); wp_register_script('gam-event-manager-content-event-listing', EVENT_MANAGER_PLUGIN_URL . '/assets/js/content-event-listing.min.js', array('jquery', 'gam-event-manager-common'), EVENT_MANAGER_VERSION, true); //ajax filters js wp_register_script('gam-event-manager-ajax-filters', EVENT_MANAGER_PLUGIN_URL . '/assets/js/event-ajax-filters.min.js', $ajax_filter_deps, EVENT_MANAGER_VERSION, true); wp_localize_script('gam-event-manager-ajax-filters', 'event_manager_ajax_filters', array('ajax_url' => $ajax_url, 'is_rtl' => is_rtl() ? 1 : 0, 'lang' => defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : '', 'i18n_load_prev_listings' => __('Load previous listings', 'gam-event-manager'))); //dashboard wp_register_script('bootstrap-confirmation-js', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap/bootstrap-confirmation.min.js', array('jquery', 'bootstrap-main-js'), EVENT_MANAGER_VERSION, true); wp_register_script('gam-event-manager-event-dashboard', EVENT_MANAGER_PLUGIN_URL . '/assets/js/event-dashboard.min.js', array('jquery', 'bootstrap-confirmation-js'), EVENT_MANAGER_VERSION, true); wp_localize_script('gam-event-manager-event-dashboard', 'event_manager_event_dashboard', array('i18n_btnOkLabel' => __('Delete', 'gam-event-manager'), 'i18n_btnCancelLabel' => __('Cancel', 'gam-event-manager'), 'i18n_confirm_delete' => __('Are you sure you want to delete this event?', 'gam-event-manager'))); //registration wp_register_script('gam-event-manager-event-registration', EVENT_MANAGER_PLUGIN_URL . '/assets/js/event-registration.min.js', array('jquery'), EVENT_MANAGER_VERSION, true); }
if (strlen($organizer_tagline) == 0) { return; } $organizer_tagline = esc_attr(strip_tags($organizer_tagline)); $organizer_tagline = $before . $organizer_tagline . $after;
?> <?php get_event_manager_template('form-fields/uploaded-file-html.php', array('key' => $key, 'name' => 'current_' . $field_name, 'value' => $value, 'field' => $field)); ?> <?php } ?> <?php } elseif ($value = $field['value']) { ?> <?php get_event_manager_template('form-fields/uploaded-file-html.php', array('key' => $key, 'name' => 'current_' . $field_name, 'value' => $value, 'field' => $field)); ?> <?php } ?> <?php } ?> </div> <input type="file" class="<?php echo esc_attr(implode(' ', $classes)); ?>
/** * Done Step */ public function done() { do_action('event_manager_event_submitted', $this->event_id); get_event_manager_template('event-submitted.php', array('event' => get_post($this->event_id))); }
<!-- Organizer Information Fields --> <?php if ($organizer_fields) { ?> <h2 class="section-title"><?php _e('Organizer Details', 'gam-event-manager'); ?> </h2> <?php do_action('submit_event_form_organizer_fields_start'); ?> <?php foreach ($organizer_fields as $key => $field) { ?> <fieldset class="fieldset-<?php esc_attr_e($key); ?> "> <label for="<?php esc_attr_e($key); ?> "><?php echo $field['label'] . apply_filters('submit_event_form_required_label', $field['required'] ? '<span class="require-field">*</span>' : ' <small>' . __('(optional)', 'gam-event-manager') . '</small>', $field); ?> </label> <div class="field <?php echo $field['required'] ? 'required-field' : ''; ?> "> <?php
/** * Set post view on the single listing page * @param array $post */ function set_single_listing_view_count($post)
/** * Output some content when no results were found */ public function output_no_results() { get_event_manager_template('content-no-events-found.php'); }