当前位置: 首页>>代码示例>>PHP>>正文


PHP EM_Event::get_errors方法代码示例

本文整理汇总了PHP中EM_Event::get_errors方法的典型用法代码示例。如果您正苦于以下问题:PHP EM_Event::get_errors方法的具体用法?PHP EM_Event::get_errors怎么用?PHP EM_Event::get_errors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EM_Event的用法示例。


在下文中一共展示了EM_Event::get_errors方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: em_admin_email_test_ajax

function em_admin_email_test_ajax()
{
    if (wp_verify_nonce($_REQUEST['_check_email_nonce'], 'check_email') && current_user_can('activate_plugins')) {
        $subject = __("Events Manager Test Email", 'dbem');
        $content = __('Congratulations! Your email settings work.', 'dbem');
        $current_user = get_user_by('id', get_current_user_id());
        $EM_Event = new EM_Event();
        if ($EM_Event->email_send($subject, $content, $current_user->user_email)) {
            $result = array('result' => true, 'message' => sprintf(__('Email sent succesfully to %s', 'dbem'), $current_user->user_email));
        } else {
            $result = array('result' => false, 'message' => __('Email not sent.', 'dbem') . " <ul><li>" . implode('</li><li>', $EM_Event->get_errors()) . '</li></ul>');
        }
        echo json_encode($result);
    }
    exit;
}
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:16,代码来源:em-options.php

示例2: em_admin_email_test_ajax

function em_admin_email_test_ajax()
{
    if (wp_verify_nonce($_REQUEST['_check_email_nonce'], 'check_email') && current_user_can('activate_plugins')) {
        $subject = __("Events Manager Test Email", 'dbem');
        $content = __('Congratulations! Your email settings work.', 'dbem');
        $current_user = get_user_by('id', get_current_user_id());
        //add filters for options used in EM_Mailer so the current supplied ones are used
        ob_start();
        function pre_option_dbem_mail_sender_name()
        {
            return sanitize_email($_REQUEST['dbem_mail_sender_name']);
        }
        add_filter('pre_option_dbem_mail_sender_name', 'pre_option_dbem_mail_sender_name');
        function pre_option_dbem_mail_sender_address()
        {
            return sanitize_text_field($_REQUEST['dbem_mail_sender_address']);
        }
        add_filter('pre_option_dbem_mail_sender_address', 'pre_option_dbem_mail_sender_address');
        function pre_option_dbem_rsvp_mail_send_method()
        {
            return sanitize_text_field($_REQUEST['dbem_rsvp_mail_send_method']);
        }
        add_filter('pre_option_dbem_rsvp_mail_send_method', 'pre_option_dbem_rsvp_mail_send_method');
        function pre_option_dbem_rsvp_mail_port()
        {
            return sanitize_text_field($_REQUEST['dbem_rsvp_mail_port']);
        }
        add_filter('pre_option_dbem_rsvp_mail_port', 'pre_option_dbem_rsvp_mail_port');
        function pre_option_dbem_rsvp_mail_SMTPAuth()
        {
            return sanitize_text_field($_REQUEST['dbem_rsvp_mail_SMTPAuth']);
        }
        add_filter('pre_option_dbem_rsvp_mail_SMTPAuth', 'pre_option_dbem_rsvp_mail_SMTPAuth');
        function pre_option_dbem_smtp_host()
        {
            return sanitize_text_field($_REQUEST['dbem_smtp_host']);
        }
        add_filter('pre_option_dbem_smtp_host', 'pre_option_dbem_smtp_host');
        function pre_option_dbem_smtp_username()
        {
            return sanitize_text_field($_REQUEST['dbem_smtp_username']);
        }
        add_filter('pre_option_dbem_smtp_username', 'pre_option_dbem_smtp_username');
        function pre_option_dbem_smtp_password()
        {
            return sanitize_text_field($_REQUEST['dbem_smtp_password']);
        }
        add_filter('pre_option_dbem_smtp_password', 'pre_option_dbem_smtp_password');
        ob_clean();
        //remove any php errors/warnings output
        $EM_Event = new EM_Event();
        if ($EM_Event->email_send($subject, $content, $current_user->user_email)) {
            $result = array('result' => true, 'message' => sprintf(__('Email sent succesfully to %s', 'dbem'), $current_user->user_email));
        } else {
            $result = array('result' => false, 'message' => __('Email not sent.', 'dbem') . " <ul><li>" . implode('</li><li>', $EM_Event->get_errors()) . '</li></ul>');
        }
        echo EM_Object::json_encode($result);
    }
    exit;
}
开发者ID:rolka,项目名称:events-manager,代码行数:60,代码来源:em-options.php

示例3: em_init_actions

/**
 * Performs actions on init. This works for both ajax and normal requests, the return results depends if an em_ajax flag is passed via POST or GET.
 */
function em_init_actions()
{
    global $wpdb, $EM_Notices, $EM_Event;
    if (defined('DOING_AJAX') && DOING_AJAX) {
        $_REQUEST['em_ajax'] = true;
    }
    //NOTE - No EM objects are globalized at this point, as we're hitting early init mode.
    //TODO Clean this up.... use a uniformed way of calling EM Ajax actions
    if (!empty($_REQUEST['em_ajax']) || !empty($_REQUEST['em_ajax_action'])) {
        if (isset($_REQUEST['em_ajax_action']) && $_REQUEST['em_ajax_action'] == 'get_location') {
            if (isset($_REQUEST['id'])) {
                $EM_Location = new EM_Location($_REQUEST['id'], 'location_id');
                $location_array = $EM_Location->to_array();
                $location_array['location_balloon'] = $EM_Location->output(get_option('dbem_location_baloon_format'));
                echo EM_Object::json_encode($location_array);
            }
            die;
        }
        if (isset($_REQUEST['em_ajax_action']) && $_REQUEST['em_ajax_action'] == 'delete_ticket') {
            if (isset($_REQUEST['id'])) {
                $EM_Ticket = new EM_Ticket($_REQUEST['id']);
                $result = $EM_Ticket->delete();
                if ($result) {
                    $result = array('result' => true);
                } else {
                    $result = array('result' => false, 'error' => $EM_Ticket->feedback_message);
                }
            } else {
                $result = array('result' => false, 'error' => __('No ticket id provided', 'dbem'));
            }
            echo EM_Object::json_encode($result);
            die;
        }
        if (isset($_REQUEST['query']) && $_REQUEST['query'] == 'GlobalMapData') {
            $EM_Locations = EM_Locations::get($_REQUEST);
            $json_locations = array();
            foreach ($EM_Locations as $location_key => $EM_Location) {
                $json_locations[$location_key] = $EM_Location->to_array();
                $json_locations[$location_key]['location_balloon'] = $EM_Location->output(get_option('dbem_map_text_format'));
            }
            echo EM_Object::json_encode($json_locations);
            die;
        }
        if (isset($_REQUEST['ajaxCalendar']) && $_REQUEST['ajaxCalendar']) {
            //FIXME if long events enabled originally, this won't show up on ajax call
            echo EM_Calendar::output($_REQUEST, false);
            die;
        }
    }
    //Event Actions
    if (!empty($_REQUEST['action']) && substr($_REQUEST['action'], 0, 5) == 'event') {
        //Load the event object, with saved event if requested
        if (!empty($_REQUEST['event_id'])) {
            $EM_Event = new EM_Event($_REQUEST['event_id']);
        } else {
            $EM_Event = new EM_Event();
        }
        //Save Event, only via BP or via [event_form]
        if ($_REQUEST['action'] == 'event_save' && $EM_Event->can_manage('edit_events', 'edit_others_events')) {
            //Check Nonces
            if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'wpnonce_event_save')) {
                exit('Trying to perform an illegal action.');
            }
            //Grab and validate submitted data
            if ($EM_Event->get_post() && $EM_Event->save()) {
                //EM_Event gets the event if submitted via POST and validates it (safer than to depend on JS)
                $events_result = true;
                //Success notice
                if (is_user_logged_in()) {
                    $EM_Notices->add_confirm($EM_Event->output(get_option('dbem_events_form_result_success')), true);
                } else {
                    $EM_Notices->add_confirm($EM_Event->output(get_option('dbem_events_anonymous_result_success')), true);
                }
                $redirect = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : wp_get_referer();
                $redirect = em_add_get_params($redirect, array('success' => 1));
                wp_redirect($redirect);
                exit;
            } else {
                $EM_Notices->add_error($EM_Event->get_errors());
                $events_result = false;
            }
        }
        if ($_REQUEST['action'] == 'event_duplicate' && wp_verify_nonce($_REQUEST['_wpnonce'], 'event_duplicate_' . $EM_Event->event_id)) {
            $EM_Event = $EM_Event->duplicate();
            if ($EM_Event === false) {
                $EM_Notices->add_error($EM_Event->errors, true);
            } else {
                $EM_Notices->add_confirm($EM_Event->feedback_message, true);
            }
            wp_redirect(wp_get_referer());
            exit;
        }
        if ($_REQUEST['action'] == 'event_delete' && wp_verify_nonce($_REQUEST['_wpnonce'], 'event_delete_' . $EM_Event->event_id)) {
            //DELETE action
            $selectedEvents = !empty($_REQUEST['events']) ? $_REQUEST['events'] : '';
            if (EM_Object::array_is_numeric($selectedEvents)) {
                $events_result = EM_Events::delete($selectedEvents);
//.........这里部分代码省略.........
开发者ID:rajankz,项目名称:webspace,代码行数:101,代码来源:em-actions.php

示例4: em_init_actions

/**
 * Performs actions on init. This works for both ajax and normal requests, the return results depends if an em_ajax flag is passed via POST or GET.
 */
function em_init_actions()
{
    global $wpdb, $EM_Notices, $EM_Event;
    if (defined('DOING_AJAX') && DOING_AJAX) {
        $_REQUEST['em_ajax'] = true;
    }
    //NOTE - No EM objects are globalized at this point, as we're hitting early init mode.
    //TODO Clean this up.... use a uniformed way of calling EM Ajax actions
    if (!empty($_REQUEST['em_ajax']) || !empty($_REQUEST['em_ajax_action'])) {
        if (isset($_REQUEST['em_ajax_action']) && $_REQUEST['em_ajax_action'] == 'get_location') {
            if (isset($_REQUEST['id'])) {
                $EM_Location = new EM_Location($_REQUEST['id'], 'location_id');
                $location_array = $EM_Location->to_array();
                $location_array['location_balloon'] = $EM_Location->output(get_option('dbem_location_baloon_format'));
                echo EM_Object::json_encode($location_array);
            }
            die;
        }
        if (isset($_REQUEST['em_ajax_action']) && $_REQUEST['em_ajax_action'] == 'delete_ticket') {
            if (isset($_REQUEST['id'])) {
                $EM_Ticket = new EM_Ticket($_REQUEST['id']);
                $result = $EM_Ticket->delete();
                if ($result) {
                    $result = array('result' => true);
                } else {
                    $result = array('result' => false, 'error' => $EM_Ticket->feedback_message);
                }
            } else {
                $result = array('result' => false, 'error' => __('No ticket id provided', 'dbem'));
            }
            echo EM_Object::json_encode($result);
            die;
        }
        if (isset($_REQUEST['query']) && $_REQUEST['query'] == 'GlobalMapData') {
            $EM_Locations = EM_Locations::get($_REQUEST);
            $json_locations = array();
            foreach ($EM_Locations as $location_key => $EM_Location) {
                $json_locations[$location_key] = $EM_Location->to_array();
                $json_locations[$location_key]['location_balloon'] = $EM_Location->output(get_option('dbem_map_text_format'));
            }
            echo EM_Object::json_encode($json_locations);
            die;
        }
        if (isset($_REQUEST['ajaxCalendar']) && $_REQUEST['ajaxCalendar']) {
            //FIXME if long events enabled originally, this won't show up on ajax call
            echo EM_Calendar::output($_REQUEST, false);
            die;
        }
    }
    //Event Actions
    if (!empty($_REQUEST['action']) && substr($_REQUEST['action'], 0, 5) == 'event') {
        //Load the event object, with saved event if requested
        if (!empty($_REQUEST['event_id'])) {
            $EM_Event = new EM_Event($_REQUEST['event_id']);
        } else {
            $EM_Event = new EM_Event();
        }
        //Save Event, only via BP or via [event_form]
        if ($_REQUEST['action'] == 'event_save' && $EM_Event->can_manage('edit_events', 'edit_others_events')) {
            //Check Nonces
            if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'wpnonce_event_save')) {
                exit('Trying to perform an illegal action.');
            }
            //Grab and validate submitted data
            if ($EM_Event->get_post() && $EM_Event->save()) {
                //EM_Event gets the event if submitted via POST and validates it (safer than to depend on JS)
                $events_result = true;
                //Success notice
                if (is_user_logged_in()) {
                    if (empty($_REQUEST['event_id'])) {
                        $EM_Notices->add_confirm($EM_Event->output(get_option('dbem_events_form_result_success')), true);
                    } else {
                        $EM_Notices->add_confirm($EM_Event->output(get_option('dbem_events_form_result_success_updated')), true);
                    }
                } else {
                    $EM_Notices->add_confirm($EM_Event->output(get_option('dbem_events_anonymous_result_success')), true);
                }
                $redirect = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : wp_get_referer();
                $redirect = em_add_get_params($redirect, array('success' => 1), false, false);
                wp_redirect($redirect);
                exit;
            } else {
                $EM_Notices->add_error($EM_Event->get_errors());
                $events_result = false;
            }
        }
        if ($_REQUEST['action'] == 'event_duplicate' && wp_verify_nonce($_REQUEST['_wpnonce'], 'event_duplicate_' . $EM_Event->event_id)) {
            $event = $EM_Event->duplicate();
            if ($event === false) {
                $EM_Notices->add_error($EM_Event->errors, true);
                wp_redirect(wp_get_referer());
            } else {
                $EM_Notices->add_confirm($EM_Event->feedback_message, true);
                wp_redirect($event->get_edit_url());
            }
            exit;
        }
//.........这里部分代码省略.........
开发者ID:Olaf1989,项目名称:Cakes-and-more,代码行数:101,代码来源:em-actions.php

示例5: em_init_actions

/**
 * Performs actions on init. This works for both ajax and normal requests, the return results depends if an em_ajax flag is passed via POST or GET.
 */
function em_init_actions()
{
    global $wpdb, $EM_Notices, $EM_Event;
    //NOTE - No EM objects are globalized at this point, as we're hitting early init mode.
    //TODO Clean this up.... use a uniformed way of calling EM Ajax actions
    if (!empty($_REQUEST['em_ajax']) || !empty($_REQUEST['em_ajax_action'])) {
        if (isset($_REQUEST['em_ajax_action']) && $_REQUEST['em_ajax_action'] == 'get_location') {
            if (isset($_REQUEST['id'])) {
                $EM_Location = new EM_Location($_REQUEST['id']);
                $location_array = $EM_Location->to_array();
                $location_array['location_balloon'] = $EM_Location->output(get_option('dbem_location_baloon_format'));
                echo EM_Object::json_encode($location_array);
            }
            die;
        }
        if (isset($_REQUEST['em_ajax_action']) && $_REQUEST['em_ajax_action'] == 'delete_ticket') {
            if (isset($_REQUEST['id'])) {
                $EM_Ticket = new EM_Ticket($_REQUEST['id']);
                $result = $EM_Ticket->delete();
                if ($result) {
                    $result = array('result' => true);
                } else {
                    $result = array('result' => false, 'error' => $EM_Ticket->feedback_message);
                }
            } else {
                $result = array('result' => false, 'error' => __('No ticket id provided', 'dbem'));
            }
            echo EM_Object::json_encode($result);
            die;
        }
        if (isset($_REQUEST['query']) && $_REQUEST['query'] == 'GlobalMapData') {
            $EM_Locations = EM_Locations::get($_REQUEST);
            $json_locations = array();
            foreach ($EM_Locations as $location_key => $EM_Location) {
                $json_locations[$location_key] = $EM_Location->to_array();
                $json_locations[$location_key]['location_balloon'] = $EM_Location->output(get_option('dbem_map_text_format'));
            }
            echo EM_Object::json_encode($json_locations);
            die;
        }
        if (isset($_REQUEST['ajaxCalendar']) && $_REQUEST['ajaxCalendar']) {
            //FIXME if long events enabled originally, this won't show up on ajax call
            echo EM_Calendar::output($_REQUEST);
            die;
        }
    }
    //Event Actions
    if (!empty($_REQUEST['action']) && substr($_REQUEST['action'], 0, 5) == 'event') {
        //Load the event object, with saved event if requested
        if (!empty($_REQUEST['event_id'])) {
            $EM_Event = new EM_Event($_REQUEST['event_id']);
        } else {
            $EM_Event = new EM_Event();
        }
        if ($_REQUEST['action'] == 'event_save' && current_user_can('edit_events')) {
            //Check Nonces
            if (is_admin()) {
                if (!wp_verify_nonce($_REQUEST['_wpnonce'] && 'event_save')) {
                    check_admin_referer('trigger_error');
                }
            } else {
                if (!wp_verify_nonce($_REQUEST['_wpnonce'] && 'event_save')) {
                    exit('Trying to perform an illegal action.');
                }
            }
            //Grab and validate submitted data
            if ($EM_Event->get_post() && $EM_Event->save()) {
                //EM_Event gets the event if submitted via POST and validates it (safer than to depend on JS)
                $EM_Notices->add_confirm($EM_Event->feedback_message);
                if (is_admin()) {
                    $page = !empty($_REQUEST['pno']) ? $_REQUEST['pno'] : '';
                    $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope'] : '';
                    //wp_redirect( get_bloginfo('wpurl').'/wp-admin/admin.php?page=events-manager&pno='.$page.'&scope='.$scope.'&message='.urlencode($EM_Event->feedback_message));
                } else {
                    $redirect = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : wp_get_referer();
                    wp_redirect($redirect);
                }
                $events_result = true;
            } else {
                $EM_Notices->add_error($EM_Event->get_errors());
                $events_result = false;
            }
        }
        if ($_REQUEST['action'] == 'event_duplicate') {
            global $EZSQL_ERROR;
            $EM_Event = $EM_Event->duplicate();
            if ($EM_Event === false) {
                $EM_Notices->add_error($EM_Event->errors, true);
            } else {
                if ($EM_Event->id == $_REQUEST['event_id']) {
                    $EM_Notices->add_confirm($EM_Event->feedback_message . " " . sprintf(__('You are now viewing the duplicated %s.', 'dbem'), __('event', 'dbem')), true);
                } else {
                    $EM_Notices->add_confirm($EM_Event->feedback_message, true);
                }
            }
        }
        if ($_REQUEST['action'] == 'event_delete') {
//.........这里部分代码省略.........
开发者ID:hypenotic,项目名称:slowfood,代码行数:101,代码来源:em-actions.php

示例6: create_event_from_feed

 public static function create_event_from_feed(array $FEED_ = NULL, $event_id = NULL)
 {
     global $ESS_Notices, $current_site;
     $EM_Event = NULL;
     if ($FEED_ != NULL) {
         //dd( $FEED_ );
         $EM_Event = new EM_Event(intval($event_id) > 0 ? $event_id : 0);
         // set eventID for update
         // -- Populate $_POST global var for EM functions
         if (ESS_Import::set_post_from_feed($FEED_)) {
             //dd($_POST);
             if ($EM_Event->can_manage('edit_events', 'edit_recurring_events', 'edit_others_events') && $EM_Event->get_post()) {
                 // -- temporarily remove the save listener to prevent multi-pushing to search engines
                 ESS_IO::set_save_filter(FALSE);
                 $EM_Location = NULL;
                 $EM_Categories = NULL;
                 $EM_Tickets = NULL;
                 $blog_id = isset($current_site) ? $current_site->blog_id : NULL;
                 // used as global by some functions (Cf: EM_location::save())
                 if (empty($event_id)) {
                     $EM_Event->force_status = intval(get_option('ess_syndication_status')) >= 1 ? ESS_Database::EVENT_STATUS_PUBLISH : ESS_Database::EVENT_STATUS_DRAFT;
                     $EM_Event->event_status = 1;
                     $EM_Event->previous_status = 1;
                 } else {
                     $EM_Event->event_id = $event_id;
                     // -- Remove old images in case of event's update
                     if (get_option('ess_feed_import_images') && intval($EM_Event->post_id) > 0) {
                         ESS_Images::delete($EM_Event->post_id);
                     }
                 }
                 $EM_Event->post_status = strtolower($_POST['event_access']) == 'private' ? 'private' : ESS_Database::EVENT_STATUS_PUBLISH;
                 // == GENERAL
                 if (strlen($_POST['content']) > 0) {
                     if (get_option('ess_backlink_enabled')) {
                         $feed_uri = $FEED_['generals']['uri'];
                         $feed_uri_host = parse_url($feed_uri, PHP_URL_HOST);
                         $_POST['content'] .= "<h6>" . __("Source:", 'dbem') . " <a title=\"" . __("Source:", 'dbem') . " " . $feed_uri_host . "\" href=\"" . $feed_uri . "\">" . parse_url($feed_uri, PHP_URL_HOST) . "</a></h6>";
                     }
                 }
                 // == PLACE / LOCATION
                 //dd( $_POST['location_name'] );
                 if ($_POST['no_location'] === FALSE && strlen($_POST['location_name']) > 0 && get_option('dbem_locations_enabled')) {
                     $EM_Location = new EM_Location();
                     if ($EM_Location->can_manage('publish_locations') && $EM_Location->get_post(FALSE)) {
                         //d( $EM_Location );
                         // -- Search if this location already exists in the database
                         $similar_ = ESS_Import::load_similar_location(array('location_name' => $EM_Location->location_name, 'location_address' => $EM_Location->location_address, 'location_town' => $EM_Location->location_town, 'location_state' => $EM_Location->location_state, 'location_postcode' => $EM_Location->location_postcode, 'location_country' => $EM_Location->location_country));
                         //dd( $similar_ );
                         // if the location already exists use it instead.
                         if (@count($similar_) > 0 && $similar_ != NULL) {
                             foreach ($similar_ as $key => $val) {
                                 $EM_Location->{$key} = $val;
                             }
                         } else {
                             $EM_Location->post_status = 'publish';
                             $EM_Location->location_status = 1;
                             $EM_Location->post_content = '';
                         }
                         // -- Search & defines latitude / longitude if not set
                         if (FeedValidator::isValidLatitude((string) $_POST['location_latitude']) == FALSE || FeedValidator::isValidLongitude((string) $_POST['location_longitude']) == FALSE) {
                             require_once EM_ESS_DIR . "/inc/libs/geocoder/GoogleGeocode.php";
                             $geocode_ = GoogleGeocode::getGeocodeFromAddress(trim($EM_Location->location_address . " " . $EM_Location->location_town . " " . $EM_Location->location_postcode . " " . $EM_Location->location_country));
                             $lat = (string) $geocode_['results'][0]['geometry']['location']['lat'];
                             $lng = (string) $geocode_['results'][0]['geometry']['location']['lng'];
                             //echo "latitude: " .  $lat . " ==> ".((FeedValidator::isValidLatitude(  $lat ))?'TRUE':'FALSE')."<br/>";
                             //echo "longitude: " . $lng . " ==> ".((FeedValidator::isValidLongitude( $lng ))?'TRUE':'FALSE')."<br/>";
                             if (FeedValidator::isValidLatitude($lat) && FeedValidator::isValidLongitude($lng)) {
                                 $EM_Location->location_latitude = $lat;
                                 $EM_Location->location_longitude = $lng;
                             }
                         }
                         if ($EM_Location->save() === FALSE) {
                             $ESS_Notices->add_error($EM_Location->get_errors());
                         }
                         $EM_Event->location_id = $EM_Location->location_id;
                     } else {
                         $ESS_Notices->add_error($EM_Location->get_errors());
                     }
                 }
                 // end add location
                 //dd( $EM_Location );
                 // == PRICE / TICKETS
                 //dd( $_POST['em_tickets'] );
                 if (@count($_POST['em_tickets']) > 0 && get_option('dbem_rsvp_enabled')) {
                     $EM_Tickets = new EM_Tickets($EM_Event);
                     $ticket_data = NULL;
                     // Create tickets only if they doesn't exists
                     if (@count($EM_Tickets->tickets) <= 0) {
                         foreach ($_POST['em_tickets'] as $ticket_data) {
                             $EM_Ticket = new EM_Ticket();
                             $EM_Ticket->get_post($ticket_data);
                             $EM_Tickets->tickets[] = $EM_Ticket;
                         }
                     }
                     if ($ticket_data != NULL) {
                         $EM_Event->event_rsvp = TRUE;
                         $EM_Event->event_rsvp_date = $ticket_data['event_rsvp_date'];
                         $EM_Event->event_rsvp_time = $ticket_data['event_rsvp_time'];
                         $EM_Event->event_spaces = $ticket_data['event_spaces'];
                         $EM_Event->rsvp_time = $ticket_data['event_rsvp_time'];
//.........这里部分代码省略.........
开发者ID:vnatale,项目名称:wordpress-events-manager-ess,代码行数:101,代码来源:ESS_Import.php


注:本文中的EM_Event::get_errors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。