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


PHP em_add_get_params函数代码示例

本文整理汇总了PHP中em_add_get_params函数的典型用法代码示例。如果您正苦于以下问题:PHP em_add_get_params函数的具体用法?PHP em_add_get_params怎么用?PHP em_add_get_params使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: em_admin_locations

function em_admin_locations($message = '', $fill_fields = false)
{
    global $current_site;
    ?>
		<div class='wrap'>
			<div id='icon-edit' class='icon32'>
				<br/>
			</div>
 	 		<h2>
 	 			<?php 
    _e('Locations', 'dbem');
    ?>
 	 			<span><a href="<?php 
    echo em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'edit'));
    ?>
" class="button add-new-h2"><?php 
    _e('Add New', 'dbem');
    ?>
</a></span>
 	 		</h2>   
			<?php 
    em_locate_template('tables/locations.php', true, array('url' => $_SERVER['REQUEST_URI']));
    ?>
		</div>
  	<?php 
}
开发者ID:rajankz,项目名称:webspace,代码行数:26,代码来源:em-ms-locations.php

示例2: em_debug_notification

    function em_debug_notification()
    {
        ?>
<div class="error"><p><strong><?php 
        echo sprintf(__('You are in Events Manager debug mode. To turn debug mode off, go to the <a href="%s">settings</a> page.', 'events-manager'), em_add_get_params($_SERVER['REQUEST_URI'], array('dbem_debug_off' => 1)));
        ?>
</strong></p></div><?php 
    }
开发者ID:interfisch,项目名称:lm,代码行数:8,代码来源:em-debug.php

示例3: get_bookings_url

 function get_bookings_url()
 {
     if (get_option('dbem_edit_bookings_page') && (!is_admin() || !empty($_REQUEST['is_public']))) {
         $my_bookings_page = get_permalink(get_option('dbem_edit_bookings_page'));
         $bookings_link = em_add_get_params($my_bookings_page, array('person_id' => $this->ID, 'event_id' => null, 'ticket_id' => null, 'booking_id' => null), false);
     } else {
         $bookings_link = EM_ADMIN_URL . "&page=events-manager-bookings&person_id=" . $this->ID;
     }
     return apply_filters('em_person_get_bookings_url', $bookings_link, $this);
 }
开发者ID:pcco,项目名称:portal-redesign,代码行数:10,代码来源:em-person.php

示例4: em_admin_event_actions

function em_admin_event_actions()
{
    if (current_user_can(EM_MIN_CAPABILITY) && !empty($_GET['page']) && $_GET['page'] == 'events-manager-event' && !empty($_REQUEST['action'])) {
        global $wpdb;
        global $EM_Event;
        //if dealing with new event, we still want an event object
        if (!is_object($EM_Event)) {
            $EM_Event = new EM_Event();
        }
        // UPDATE or CREATE action
        if ($_REQUEST['action'] == 'save') {
            $validation = $EM_Event->get_post();
            if ($validation) {
                //EM_Event gets the event if submitted via POST and validates it (safer than to depend on JS)
                //Save
                if ($EM_Event->save()) {
                    $page = !empty($_REQUEST['pno']) ? $_REQUEST['pno'] : '';
                    $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope'] : '';
                    wp_redirect(get_bloginfo('wpurl') . '/wp-admin/admin.php?page=events-manager&p=' . $page . '&scope=' . $scope . '&message=' . urlencode($EM_Event->feedback_message));
                }
            }
            //errors added automatically to event global object
        }
        //Copy the event
        if ($_REQUEST['action'] == 'duplicate') {
            global $EZSQL_ERROR;
            $EM_Event = $EM_Event->duplicate();
            if ($EM_Event === false) {
                $redirect_url = em_add_get_params($_SERVER['HTTP_REFERER'], array('error' => __('There was an error duplicating the event. Try again maybe?', 'dbem'), 'message' => ''), false);
                wp_redirect($redirect_url);
            } else {
                $page = !empty($_REQUEST['pno']) ? $_REQUEST['pno'] : '';
                $scope = !empty($_REQUEST['scope']) ? $_REQUEST['scope'] : '';
                wp_redirect(get_bloginfo('wpurl') . '/wp-admin/admin.php?page=events-manager-event&event_id=' . $EM_Event->id . '&p=' . $page . '&scope=' . $scope . '&message=' . urlencode($EM_Event->feedback_message));
            }
        }
    }
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:38,代码来源:em-event.php

示例5: em_bookings_person_table


//.........这里部分代码省略.........
						<?php 
        $rowno = 0;
        $event_count = 0;
        foreach ($bookings as $EM_Booking) {
            $EM_Event = $events[$EM_Booking->event_id];
            if ($EM_Event->can_manage('edit_events', 'edit_others_events') && ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0)) {
                $rowno++;
                ?>
								<tr>
									<th scope="row" class="check-column" style="padding:7px 0px 7px;"><input type='checkbox' value='<?php 
                echo $EM_Booking->id;
                ?>
' name='bookings[]'/></th>
									<td><a class="row-title" href="<?php 
                bloginfo('wpurl');
                ?>
/wp-admin/admin.php?page=events-manager-bookings&amp;event_id=<?php 
                echo $EM_Event->id;
                ?>
"><?php 
                echo $EM_Event->name;
                ?>
</a></td>
									<td><?php 
                echo $EM_Booking->get_spaces();
                ?>
</td>
									<td><?php 
                echo $EM_Booking->status_array[$EM_Booking->status];
                ?>
									</td>
									<td>
										<?php 
                $unapprove_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'bookings_unapprove', 'bookings' => $EM_Booking->id));
                $approve_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'bookings_approve', 'bookings' => $EM_Booking->id));
                $reject_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'bookings_reject', 'bookings' => $EM_Booking->id));
                $delete_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'bookings_delete', 'bookings' => $EM_Booking->id));
                ?>
										<?php 
                if (get_option('dbem_bookings_approval') && $EM_Booking->status == 0) {
                    ?>
										<a class="em-bookings-approve" href="<?php 
                    echo $approve_url;
                    ?>
"><?php 
                    _e('Approve', 'dbem');
                    ?>
</a> |
										<?php 
                }
                ?>
										<?php 
                if (get_option('dbem_bookings_approval') && $EM_Booking->status == 1) {
                    ?>
										<a class="em-bookings-unapprove" href="<?php 
                    echo $unapprove_url;
                    ?>
"><?php 
                    _e('Unapprove', 'dbem');
                    ?>
</a> |
										<?php 
                }
                ?>
										<?php 
                if ($EM_Booking->status == 2) {
开发者ID:hypenotic,项目名称:slowfood,代码行数:67,代码来源:em-person.php

示例6: date_i18n

									<td><?php 
                echo date_i18n(get_option('date_format'), $EM_Event->start);
                ?>
</td>
									<td><?php 
                echo $EM_Booking->get_spaces();
                ?>
</td>
									<td>
										<?php 
                echo apply_filters('em_my_bookings_booking_status', $EM_Booking->status_array[$EM_Booking->status], $EM_Booking);
                ?>
									</td>
									<td>
										<?php 
                $cancel_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'booking_cancel', 'booking_id' => $EM_Booking->id, '_wpnonce' => $nonce));
                $cancel_link = '<a class="em-bookings-cancel" href="' . $cancel_url . '" onclick="if( !confirm(\'' . __('Are you sure you want to cancel your booking?', 'dbem') . '\') ){ return false; }">' . __('Cancel', 'dbem') . '</a>';
                echo apply_filters('em_my_bookings_booking_actions', $cancel_link, $EM_Booking);
                ?>
									</td>
								</tr>								
								<?php 
            }
            do_action('em_my_bookings_booking_loop', $EM_Booking);
            $event_count++;
        }
        ?>
					</tbody>
				</table>
				</div>
				<?php 
开发者ID:hypenotic,项目名称:slowfood,代码行数:31,代码来源:my-bookings.php

示例7: em_bookings_rejected_table


//.........这里部分代码省略.........
							<th class='manage-column' scope='col'>&nbsp;</th>
						</tr>
					</thead>
					<tbody>
						<?php 
        $rowno = 0;
        $event_count = 0;
        foreach ($EM_Bookings->bookings as $EM_Booking) {
            if (($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0)) {
                $rowno++;
                ?>
								<tr>
									<th scope="row" class="check-column" style="padding:7px 0px 7px;"><input type='checkbox' value='<?php 
                echo $EM_Booking->booking_id;
                ?>
' name='bookings[]'/></th>
									<td><a href="<?php 
                echo EM_ADMIN_URL;
                ?>
&amp;page=events-manager-bookings&amp;person_id=<?php 
                echo $EM_Booking->person->ID;
                ?>
"><?php 
                echo $EM_Booking->person->get_name();
                ?>
</a></td>
									<td><?php 
                echo $EM_Booking->person->user_email;
                ?>
</td>
									<td><?php 
                echo $EM_Booking->person->phone;
                ?>
</td>
									<td><?php 
                echo $EM_Booking->get_spaces();
                ?>
</td>
									<td>
										<?php 
                $approve_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'bookings_approve', 'booking_id' => $EM_Booking->booking_id));
                $delete_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => 'bookings_delete', 'booking_id' => $EM_Booking->booking_id));
                $edit_url = em_add_get_params($_SERVER['REQUEST_URI'], array('booking_id' => $EM_Booking->booking_id, 'em_ajax' => null, 'em_obj' => null));
                ?>
										<a class="em-bookings-approve" href="<?php 
                echo $approve_url;
                ?>
"><?php 
                _e('Approve', 'events-manager');
                ?>
</a> |
										<a class="em-bookings-edit" href="<?php 
                echo $edit_url;
                ?>
"><?php 
                _e('Edit/View', 'events-manager');
                ?>
</a> |
										<span class="trash"><a class="em-bookings-delete" href="<?php 
                echo $delete_url;
                ?>
"><?php 
                _e('Delete', 'events-manager');
                ?>
</a></span>
									</td>
								</tr>
								<?php 
            }
            $event_count++;
        }
        ?>
					</tbody>
				</table>
				</div>
				<?php 
    } else {
        ?>
					<?php 
        _e('No rejected bookings.', 'events-manager');
        ?>
				<?php 
    }
    ?>
			</form>
			<?php 
    if (!empty($bookings_nav) && $EM_Bookings >= $limit) {
        ?>
			<div class='tablenav'>
				<?php 
        echo $bookings_nav;
        ?>
				<div class="clear"></div>
			</div>
			<?php 
    }
    ?>
		</div>	
	<?php 
}
开发者ID:mjrobison,项目名称:FirstCareCPR,代码行数:101,代码来源:em-rejected.php

示例8: isset

' <?php 
    echo isset($_GET['view']) && $_GET['view'] == 'draft' ? 'class="current"' : '';
    ?>
><?php 
    _e('Draft', 'dbem');
    ?>
 <span class="count">(<?php 
    echo $draft_count;
    ?>
)</span></a> &nbsp;|&nbsp;
				<?php 
}
?>

				<a href='<?php 
echo em_add_get_params($_SERVER['REQUEST_URI'], $default_params + array('view' => 'past'));
?>
' <?php 
echo isset($_GET['view']) && $_GET['view'] == 'past' ? 'class="current"' : '';
?>
><?php 
_e('Past Events', 'dbem');
?>
 <span class="count">(<?php 
echo $past_count;
?>
)</span></a>
			</div>
			<p class="search-box">
				<label class="screen-reader-text" for="post-search-input"><?php 
_e('Search Events', 'dbem');
开发者ID:pcco,项目名称:portal-redesign,代码行数:31,代码来源:events.php

示例9: output


//.........这里部分代码省略.........
                             $replace = str_replace(']]>', ']]&gt;', $replace);
                             $replace = wp_trim_words($replace, $excerpt_length, $excerpt_more);
                         }
                     }
                 }
                 break;
             case '#_LOCATIONIMAGEURL':
             case '#_LOCATIONIMAGE':
                 if ($this->get_image_url() != '') {
                     $image_url = esc_url($this->get_image_url());
                     if ($result == '#_LOCATIONIMAGEURL') {
                         $replace = $this->get_image_url();
                     } else {
                         if (empty($placeholders[3][$key])) {
                             $replace = "<img src='" . $image_url . "' alt='" . esc_attr($this->location_name) . "'/>";
                         } else {
                             $image_size = explode(',', $placeholders[3][$key]);
                             if (self::array_is_numeric($image_size) && count($image_size) > 1) {
                                 if (EM_MS_GLOBAL && get_current_blog_id() != $this->blog_id) {
                                     //get a thumbnail
                                     if (get_option('dbem_disable_thumbnails')) {
                                         $image_attr = '';
                                         $image_args = array();
                                         if (empty($image_size[1]) && !empty($image_size[0])) {
                                             $image_attr = 'width="' . $image_size[0] . '"';
                                             $image_args['w'] = $image_size[0];
                                         } elseif (empty($image_size[0]) && !empty($image_size[1])) {
                                             $image_attr = 'height="' . $image_size[1] . '"';
                                             $image_args['h'] = $image_size[1];
                                         } elseif (!empty($image_size[0]) && !empty($image_size[1])) {
                                             $image_attr = 'width="' . $image_size[0] . '" height="' . $image_size[1] . '"';
                                             $image_args = array('w' => $image_size[0], 'h' => $image_size[1]);
                                         }
                                         $replace = "<img src='" . esc_url(em_add_get_params($image_url, $image_args)) . "' alt='" . esc_attr($this->location_name) . "' {$image_attr} />";
                                     } else {
                                         //location belongs to another blog, so switch blog then call the default wp fucntion
                                         if (EM_MS_GLOBAL && get_current_blog_id() != $this->blog_id) {
                                             switch_to_blog($this->blog_id);
                                             $switch_back = true;
                                         }
                                         $replace = get_the_post_thumbnail($this->ID, $image_size);
                                         if (!empty($switch_back)) {
                                             restore_current_blog();
                                         }
                                     }
                                 } else {
                                     $replace = get_the_post_thumbnail($this->ID, $image_size);
                                 }
                             } else {
                                 $replace = "<img src='" . $image_url . "' alt='" . esc_attr($this->location_name) . "'/>";
                             }
                         }
                     }
                 }
                 break;
             case '#_LOCATIONURL':
             case '#_LOCATIONLINK':
             case '#_LOCATIONPAGEURL':
                 //Depricated
                 $link = esc_url($this->get_permalink());
                 $replace = $result == '#_LOCATIONURL' || $result == '#_LOCATIONPAGEURL' ? $link : '<a href="' . $link . '" title="' . esc_attr($this->location_name) . '">' . esc_html($this->location_name) . '</a>';
                 break;
             case '#_LOCATIONEDITURL':
             case '#_LOCATIONEDITLINK':
                 if ($this->can_manage('edit_locations', 'edit_others_locations')) {
                     $link = esc_url($this->get_edit_url());
开发者ID:javipaur,项目名称:TiendaVirtual,代码行数:67,代码来源:em-location.php

示例10: em_user_action_links

function em_user_action_links($actions, $user)
{
    if (!is_network_admin() && current_user_can('manage_others_bookings')) {
        if (get_option('dbem_edit_bookings_page') && (!is_admin() || !empty($_REQUEST['is_public']))) {
            $my_bookings_page = get_permalink(get_option('dbem_edit_bookings_page'));
            $bookings_link = em_add_get_params($my_bookings_page, array('person_id' => $user->ID), false);
        } else {
            $bookings_link = EM_ADMIN_URL . "&page=events-manager-bookings&person_id=" . $user->ID;
        }
        $actions['bookings'] = "<a href='{$bookings_link}'>" . __('Bookings', 'events-manager') . "</a>";
    }
    return $actions;
}
开发者ID:mjrobison,项目名称:FirstCareCPR,代码行数:13,代码来源:em-admin.php

示例11: em_locations_admin

/**
 * Outputs table of locations belonging to user
 * @param array $args
 */
function em_locations_admin($args = array())
{
    global $EM_Location;
    if (is_user_logged_in() && current_user_can('edit_locations')) {
        if (!empty($_GET['action']) && $_GET['action'] == 'edit') {
            if (empty($_REQUEST['redirect_to'])) {
                $_REQUEST['redirect_to'] = em_add_get_params($_SERVER['REQUEST_URI'], array('action' => null, 'location_id' => null));
            }
            em_location_form();
        } else {
            if (get_option('dbem_css_editors')) {
                echo '<div class="css-locations-admin">';
            }
            $limit = !empty($_REQUEST['limit']) ? $_REQUEST['limit'] : 20;
            //Default limit
            $page = !empty($_REQUEST['pno']) ? $_REQUEST['pno'] : 1;
            $offset = $page > 1 ? ($page - 1) * $limit : 0;
            $order = !empty($_REQUEST['order']) ? $_REQUEST['order'] : 'ASC';
            if (array_key_exists('status', $_REQUEST)) {
                $status = $_REQUEST['status'] ? 1 : 0;
            } else {
                $status = false;
            }
            $blog = false;
            if (EM_MS_GLOBAL && !get_site_option('dbem_ms_mainblog_locations') && !is_main_site()) {
                //set current blog id if not on main site and using global mode whilst not forcing all locations to be on main blog
                $blog = get_current_blog_id();
            }
            $args = array('limit' => $limit, 'offset' => $offset, 'status' => $status, 'blog' => $blog);
            //count locations
            $locations_mine_count = EM_Locations::count(array('owner' => get_current_user_id(), 'blog' => $blog, 'status' => false));
            $locations_all_count = current_user_can('read_others_locations') ? EM_Locations::count(array('blog' => $blog, 'status' => false, 'owner' => false)) : 0;
            //get set of locations
            if (!empty($_REQUEST['view']) && $_REQUEST['view'] == 'others' && current_user_can('read_others_locations')) {
                $locations = EM_Locations::get($args);
                $locations_count = $locations_all_count;
            } else {
                $locations = EM_Locations::get(array_merge($args, array('owner' => get_current_user_id())));
                $locations_count = $locations_mine_count;
            }
            em_locate_template('tables/locations.php', true, array('args' => $args, 'locations' => $locations, 'locations_count' => $locations_count, 'locations_mine_count' => $locations_mine_count, 'locations_all_count' => $locations_all_count, 'page' => $page, 'limit' => $limit, 'offset' => $offset, 'show_add_new' => true));
            if (get_option('dbem_css_editors')) {
                echo '</div>';
            }
        }
    } else {
        if (get_option('dbem_css_editors')) {
            echo '<div class="css-locations-admin">';
        }
        echo '<div class="css-locations-admin-login">' . __("You must log in to view and manage your locations.", 'dbem') . '</div>';
        if (get_option('dbem_css_editors')) {
            echo '</div>';
        }
    }
}
开发者ID:eresyyl,项目名称:mk,代码行数:59,代码来源:em-template-tags.php

示例12: bookings_table_actions

 /**
  * Customize Booking Table Actions
  * @since 1.3
  * @version 1.0
  */
 function bookings_table_actions($actions, $EM_Booking)
 {
     if ($EM_Booking->booking_status == 1 && $this->uses_gateway($EM_Booking)) {
         return array('reject' => '<a class="em-bookings-reject" href="' . em_add_get_params($url, array('action' => 'bookings_reject', 'booking_id' => $EM_Booking->booking_id)) . '">' . __('Reject', 'mycred') . '</a>', 'delete' => '<span class="trash"><a class="em-bookings-delete" href="' . em_add_get_params($url, array('action' => 'bookings_delete', 'booking_id' => $EM_Booking->booking_id)) . '">' . __('Delete', 'mycred') . '</a></span>', 'edit' => '<a class="em-bookings-edit" href="' . em_add_get_params($EM_Booking->get_event()->get_bookings_url(), array('booking_id' => $EM_Booking->booking_id, 'em_ajax' => null, 'em_obj' => null)) . '">' . __('Edit/View', 'mycred') . '</a>');
     }
     return $actions;
 }
开发者ID:socialray,项目名称:surfied-2-0,代码行数:12,代码来源:mycred-eventsmanager-pro.php

示例13: em_init

/**
 * Perform init actions
 */
function em_init()
{
    //Hard Links
    global $EM_Mailer, $wp_rewrite;
    if (get_option("dbem_events_page") > 0) {
        define('EM_URI', get_permalink(get_option("dbem_events_page")));
        //PAGE URI OF EM
    } else {
        if ($wp_rewrite->using_permalinks()) {
            define('EM_URI', trailingslashit(home_url()) . EM_POST_TYPE_EVENT_SLUG . '/');
            //PAGE URI OF EM
        } else {
            define('EM_URI', trailingslashit(home_url()) . '?post_type=' . EM_POST_TYPE_EVENT);
            //PAGE URI OF EM
        }
    }
    if ($wp_rewrite->using_permalinks()) {
        define('EM_RSS_URI', trailingslashit(home_url()) . EM_POST_TYPE_EVENT_SLUG . '/feed/');
        //RSS PAGE URI via CPT archives page
    } else {
        define('EM_RSS_URI', em_add_get_params(home_url(), array('post_type' => EM_POST_TYPE_EVENT, 'feed' => 'rss2')));
        //RSS PAGE URI
    }
    $EM_Mailer = new EM_Mailer();
    //Upgrade/Install Routine
    if (is_admin() && current_user_can('list_users')) {
        if (EM_VERSION > get_option('dbem_version', 0) || is_multisite() && !EM_MS_GLOBAL && get_option('em_ms_global_install')) {
            require_once dirname(__FILE__) . '/em-install.php';
            em_install();
        }
    }
    //add custom functions.php file
    locate_template('plugins/events-manager/functions.php', true);
}
开发者ID:mpaskew,项目名称:isc-dev,代码行数:37,代码来源:events-manager.php

示例14: get_pagination_links

 /**
  * Generates pagination for classes like EM_Events based on supplied arguments and whether AJAX is enabled.
  * 
  * @param array $args The arguments being searched for
  * @param integer $count The number of total items to paginate through
  * @param string $search_action The name of the action query var used to trigger a search - used in AJAX requests and normal searches
  * @param array $default_args The default arguments and values this object accepts, used to compare against $args to create a querystring
  * @param array $accepted_args Variables that can be passed on via a querystring and should be added to pagination links, objects should make use of this since the default may be EM_Object::get_default_search() due to late static binding issues
  * @return string
  * @uses em_paginate()
  */
 public static function get_pagination_links($args, $count, $search_action, $default_args = array())
 {
     $limit = !empty($args['limit']) && is_numeric($args['limit']) ? $args['limit'] : false;
     $page = !empty($args['page']) && is_numeric($args['page']) ? $args['page'] : 1;
     $pno = !empty($args['page_queryvar']) ? $args['page_queryvar'] : 'pno';
     $default_pag_args = array($pno => '%PAGE%', 'page' => null, 'search' => null, 'action' => null, 'pagination' => null);
     //clean out the bad stuff, set up page number template
     $page_url = $_SERVER['REQUEST_URI'];
     //$default_args are values that can be added to the querystring for use in searching events in pagination either in searches or ajax pagination
     if (!empty($_REQUEST['action']) && $_REQUEST['action'] == $search_action && empty($default_args)) {
         //due to late static binding issues in PHP, this'll always return EM_Object::get_default_search so this is a fall-back
         $default_args = self::get_default_search();
     }
     //go through default arguments (if defined) and build a list of unique non-default arguments that should go into the querystring
     $unique_args = array();
     //this is the set of unique arguments we'll add to the querystring
     $ignored_args = array('offset', 'ajax', 'array', 'pagination', 'format', 'format_header', 'format_footer');
     foreach ($default_args as $arg_key => $arg_default_val) {
         if (array_key_exists($arg_key, $args) && !in_array($arg_key, $ignored_args)) {
             //if array exists, implode it in case one value is already imploded for matching purposes
             $arg_val = is_array($args[$arg_key]) ? implode(',', $args[$arg_key]) : $args[$arg_key];
             $arg_default_val = is_array($arg_default_val) ? implode(',', $arg_default_val) : $arg_default_val;
             if ($arg_val != $arg_default_val) {
                 $unique_args[$arg_key] = $arg_val;
             }
         }
     }
     if (!empty($unique_args['search'])) {
         $unique_args['em_search'] = $unique_args['search'];
         //special case, since em_search is used in links rather than search, which we remove below
         unset($unique_args['search']);
     }
     //build general page link with all arguments
     $pag_args = array_merge($unique_args, $default_pag_args);
     //if we're using ajax or already did an events search via a form, add the action here for pagination links
     if (!empty($args['ajax']) || !empty($_REQUEST['action']) && $_REQUEST['action'] == $search_action) {
         $unique_args['action'] = $pag_args['action'] = $search_action;
     }
     //if we're in an ajax call, make sure we aren't calling admin-ajax.php
     if (defined('DOING_AJAX')) {
         $page_url = wp_get_referer();
     }
     //finally, glue the url with querystring and pass onto pagination function
     $page_link_template = em_add_get_params($page_url, $pag_args, false);
     //don't html encode, so em_paginate does its thing;
     if (empty($args['ajax']) || defined('DOING_AJAX')) {
         $unique_args = array();
     }
     //don't use data method if ajax is disabled or if we're already in an ajax request (SERP irrelevenat)
     $return = apply_filters('em_object_get_pagination_links', em_paginate($page_link_template, $count, $limit, $page, $unique_args), $page_link_template, $count, $limit, $page);
     //if PHP is 5.3 or later, you can specifically filter by class e.g. em_events_output_pagination - this replaces the old filter originally located in the actual child classes
     if (function_exists('get_called_class')) {
         $return = apply_filters(strtolower(get_called_class()) . '_output_pagination', $return, $page_link_template, $count, $limit, $page);
     }
     return $return;
 }
开发者ID:pcco,项目名称:portal-redesign,代码行数:67,代码来源:em-object.php

示例15: do_action

    }
    ?>
				<?php 
}
?>
			</div>
			
			<?php 
do_action('em_front_event_form_footer');
?>
		</div>
		<p class="submit">
			<input type="submit" name="events_update" value="<?php 
_e('Submit Event', 'dbem');
?>
 &raquo;" />
		</p>
		<input type="hidden" name="event_id" value="<?php 
echo $EM_Event->id;
?>
" />
		<input type="hidden" name="_wpnonce" value="<?php 
echo wp_create_nonce('wpnonce_event_save');
?>
" />
		<input type="hidden" name="action" value="event_save" />
		<input type="hidden" name="redirect_to" value="<?php 
echo em_add_get_params($_SERVER['REQUEST_URI'], array('successful' => '1'));
?>
" />
	</form>
开发者ID:hypenotic,项目名称:slowfood,代码行数:31,代码来源:event-editor-guest.php


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