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


PHP EM_Object::get_default_search方法代码示例

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


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

示例1: array

 function get_default_search($array = array())
 {
     $defaults = array('orderby' => get_option('dbem_events_default_orderby'), 'order' => get_option('dbem_events_default_order'), 'rsvp' => false, 'status' => 1, 'format_header' => '', 'format_footer' => '', 'town' => false, 'state' => false, 'country' => false, 'region' => false, 'blog' => get_current_blog_id());
     if (is_multisite()) {
         global $bp;
         //echo "<pre>"; print_r($bp); echo "</pre>";
         if (!empty($bp->current_component) && $bp->current_component == 'events' && !empty($bp->current_action)) {
             $array['blog'] = false;
             //This is the buddypress root blog so we also show all event data
         } elseif (!is_main_site()) {
             //not the main blog, force single blog search
             $array['blog'] = get_current_blog_id();
         } elseif (empty($array['blog']) && get_site_option('dbem_ms_global_events')) {
             $array['blog'] = false;
         }
     }
     if (is_admin()) {
         //figure out default owning permissions
         $defaults['owner'] = !current_user_can('edit_others_events') ? get_current_user_id() : false;
         if (!array_key_exists('status', $array) && current_user_can('edit_others_events')) {
             $defaults['status'] = false;
             //by default, admins see pending and live events
         }
     }
     return apply_filters('em_events_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:26,代码来源:em-events.php

示例2: array

 function get_default_search($array = array())
 {
     $defaults = array('orderby' => get_option('dbem_categories_default_orderby'), 'order' => get_option('dbem_categories_default_order'), 'hide_empty' => false, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(), 'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '', 'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', 'pad_counts' => false, 'offset' => '', 'search' => '', 'cache_domain' => 'core');
     return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:5,代码来源:em-categories.php

示例3: get_default_search

 public static function get_default_search($array_or_defaults = array(), $array = array())
 {
     $defaults = array('orderby' => get_option('dbem_categories_default_orderby'), 'order' => get_option('dbem_categories_default_order'), 'hide_empty' => false, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(), 'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '', 'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', 'pad_counts' => false, 'offset' => '', 'search' => '', 'cache_domain' => 'core');
     //sort out whether defaults were supplied or just the array of search values
     if (empty($array)) {
         $array = $array_or_defaults;
     } else {
         $defaults = array_merge($defaults, $array_or_defaults);
     }
     return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:11,代码来源:em-categories.php

示例4: get_default_search

 public static function get_default_search($array_or_defaults = array(), $array = array())
 {
     self::$context = EM_POST_TYPE_LOCATION;
     $defaults = array('eventful' => false, 'eventless' => false, 'orderby' => 'location_name', 'town' => false, 'state' => false, 'country' => false, 'region' => false, 'status' => 1, 'scope' => 'all', 'blog' => get_current_blog_id(), 'private' => current_user_can('read_private_locations'), 'private_only' => false, 'post_id' => false);
     //sort out whether defaults were supplied or just the array of search values
     if (empty($array)) {
         $array = $array_or_defaults;
     } else {
         $defaults = array_merge($defaults, $array_or_defaults);
     }
     //specific functionality
     if (EM_MS_GLOBAL) {
         if (get_site_option('dbem_ms_mainblog_locations')) {
             //when searching in MS Global mode with all locations being stored on the main blog, blog_id becomes redundant as locations are stored in one blog table set
             $array['blog'] = false;
         } elseif ((!is_admin() || defined('DOING_AJAX')) && empty($array['blog']) && is_main_site() && get_site_option('dbem_ms_global_locations')) {
             //if enabled, by default we display all blog locations on main site
             $array['blog'] = false;
         }
     }
     $array['eventful'] = !empty($array['eventful']) && $array['eventful'] == true;
     $array['eventless'] = !empty($array['eventless']) && $array['eventless'] == true;
     if (is_admin() && !defined('DOING_AJAX')) {
         $defaults['owner'] = !current_user_can('read_others_locations') ? get_current_user_id() : false;
     }
     return apply_filters('em_locations_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:KhanMaytok,项目名称:events-manager,代码行数:27,代码来源:em-locations.php

示例5: array

 function get_default_search($array = array())
 {
     $defaults = array('orderby' => get_option('dbem_events_default_orderby'), 'order' => get_option('dbem_events_default_order'), 'bookings' => false, 'status' => 1, 'format_header' => '', 'format_footer' => '', 'town' => false, 'state' => false, 'country' => false, 'region' => false, 'blog' => get_current_blog_id(), 'private' => current_user_can('read_private_events'), 'private_only' => false, 'post_id' => false);
     if (EM_MS_GLOBAL && !is_admin()) {
         if (empty($array['blog']) && is_main_site() && get_site_option('dbem_ms_global_events')) {
             $array['blog'] = false;
         }
     }
     if (is_admin()) {
         //figure out default owning permissions
         $defaults['owner'] = !current_user_can('edit_others_events') ? get_current_user_id() : false;
         if (!array_key_exists('status', $array) && current_user_can('edit_others_events')) {
             $defaults['status'] = false;
             //by default, admins see pending and live events
         }
     }
     return apply_filters('em_events_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:18,代码来源:em-events.php

示例6: array

 function get_default_search($array = array())
 {
     $defaults = array('scope' => false, 'eventful' => false, 'eventless' => false);
     if (is_admin()) {
         //by default, we only get categories the owner can manage
         switch (get_option('dbem_permissions_categories')) {
             case 0:
                 $defaults['owner'] = get_current_user_id();
                 break;
             case 1:
                 $wp_user_search = new WP_User_Search(null, null, 'administrator');
                 $users = $wp_user_search->get_results();
                 $users[] = get_current_user_id();
                 $users[] = 0;
                 $defaults['owner'] = implode(',', $users);
                 break;
             case 2:
                 $defaults['owner'] = false;
                 break;
         }
         $defaults['owner'] = em_verify_admin() ? false : $defaults['owner'];
     }
     return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:24,代码来源:em-categories.php

示例7: array

 function get_default_search($array = array())
 {
     $defaults = array('orderby' => get_option('dbem_events_default_orderby'), 'order' => get_option('dbem_events_default_order'), 'rsvp' => false);
     if (is_admin()) {
         //figure out default owning permissions
         switch (get_option('dbem_permissions_events')) {
             case 0:
                 $defaults['owner'] = get_current_user_id();
                 break;
             case 1:
                 $defaults['owner'] = false;
                 break;
         }
         $defaults['owner'] = em_verify_admin() ? false : $defaults['owner'];
     }
     return apply_filters('em_events_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:17,代码来源:em-events.php

示例8: get_default_search

 public static function get_default_search($array_or_defaults = array(), $array = array())
 {
     //These defaults aren't for db queries, but flags for what to display in calendar output
     $defaults = array('full' => 0, 'long_events' => 0, 'scope' => false, 'status' => 1, 'town' => false, 'state' => false, 'country' => false, 'region' => false, 'blog' => get_current_blog_id(), 'orderby' => get_option('dbem_display_calendar_orderby'), 'order' => get_option('dbem_display_calendar_order'), 'number_of_weeks' => false, 'limit' => get_option('dbem_display_calendar_events_limit'));
     //sort out whether defaults were supplied or just the array of search values
     if (empty($array)) {
         $array = $array_or_defaults;
     } else {
         $defaults = array_merge($defaults, $array_or_defaults);
     }
     //specific functionality
     if (is_multisite()) {
         global $bp;
         if (!is_main_site() && !array_key_exists('blog', $array)) {
             //not the main blog, force single blog search
             $array['blog'] = get_current_blog_id();
         } elseif (empty($array['blog']) && get_site_option('dbem_ms_global_events')) {
             $array['blog'] = false;
         }
     }
     $atts = parent::get_default_search($defaults, $array);
     $atts['full'] = $atts['full'] == true ? 1 : 0;
     $atts['long_events'] = $atts['long_events'] == true ? 1 : 0;
     return apply_filters('em_calendar_get_default_search', $atts, $array, $defaults);
 }
开发者ID:KhanMaytok,项目名称:events-manager,代码行数:25,代码来源:em-calendar.php

示例9: array

 function get_default_search($array = array())
 {
     $defaults = array('status' => false, 'person' => true);
     if (true || is_admin()) {
         //figure out default owning permissions
         if (!current_user_can('edit_others_events')) {
             $defaults['owner'] = get_current_user_id();
         } else {
             $defaults['owner'] = false;
         }
     }
     return apply_filters('em_bookings_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:13,代码来源:em-bookings.php

示例10: array

 function get_default_search($array = array())
 {
     $defaults = array('scope' => false, 'eventful' => false, 'eventless' => false);
     return apply_filters('em_people_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:5,代码来源:em-people.php

示例11: get_default_search

 public static function get_default_search($array_or_defaults = array(), $array = array())
 {
     $defaults = array('sitewide' => 'enabled', 'eventwide' => 'enabled', 'code' => false, 'ids' => false);
     //also accepts event, blog, array
     //sort out whether defaults were supplied or just the array of search values
     if (empty($array)) {
         $array = $array_or_defaults;
     } else {
         $defaults = array_merge($defaults, $array_or_defaults);
     }
     return apply_filters('em_events_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:12,代码来源:coupons.php

示例12: array

 function get_default_search($array = array())
 {
     return apply_filters('em_categories_get_default_search', parent::get_default_search(array(), $array), $array, array());
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:4,代码来源:em-categories.php

示例13: array

 function get_default_search($array = array())
 {
     self::$context = EM_POST_TYPE_LOCATION;
     $defaults = array('eventful' => false, 'eventless' => false, 'orderby' => 'location_name', 'town' => false, 'state' => false, 'country' => false, 'region' => false, 'status' => 1, 'scope' => 'all', 'blog' => get_current_blog_id(), 'private' => current_user_can('read_private_locations'), 'private_only' => false, 'post_id' => false);
     if (EM_MS_GLOBAL && get_site_option('dbem_ms_mainblog_locations')) {
         //when searching in MS Global mode with all locations being stored on the main blog, blog_id becomes redundant as locations are stored in one blog table set
         $array['blog'] = false;
     }
     $array['eventful'] = !empty($array['eventful']) && $array['eventful'] == true;
     $array['eventless'] = !empty($array['eventless']) && $array['eventless'] == true;
     if (is_admin()) {
         $defaults['owner'] = !current_user_can('read_others_locations') ? get_current_user_id() : false;
     }
     return apply_filters('em_locations_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:batruji,项目名称:metareading,代码行数:15,代码来源:em-locations.php

示例14: array

 function get_default_search($array = array())
 {
     $defaults = array('status' => false, 'person' => true);
     if (true || is_admin()) {
         //figure out default owning permissions
         switch (get_option('dbem_permissions_events')) {
             case 0:
                 $defaults['owner'] = get_current_user_id();
                 break;
             case 1:
                 $defaults['owner'] = false;
                 break;
         }
         $defaults['owner'] = em_verify_admin() ? false : $defaults['owner'];
     }
     return apply_filters('em_bookings_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:17,代码来源:em-bookings.php

示例15: array

 function get_default_search($array = array())
 {
     $defaults = array('status' => false, 'person' => true);
     $defaults['owner'] = !current_user_can('manage_others_bookings') ? get_current_user_id() : false;
     return apply_filters('em_tickets_bookings_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
 }
开发者ID:rajankz,项目名称:webspace,代码行数:6,代码来源:em-tickets-bookings.php


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