Permalink
Browse files
Extended the search for lectures too. Switched to the core
- Loading branch information...
|
@@ -64,7 +64,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Assignments', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'assignment',
|
|
|
'hierarchical' => false,
|
|
@@ -675,4 +675,4 @@ function load_editor() { |
|
|
wp_enqueue_style( 'datetimepicker' );
|
|
|
}
|
|
|
}
|
|
|
-?>
|
|
|
+?>
|
|
@@ -60,7 +60,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Bibliography', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'bib',
|
|
|
'hierarchical' => false,
|
|
@@ -827,4 +827,4 @@ function add_www( $entry, $post_id = null ) { |
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-?>
|
|
|
+?>
|
|
@@ -49,7 +49,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Courses', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'course',
|
|
|
'hierarchical' => false,
|
|
|
|
@@ -48,7 +48,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Gradebook', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'gradebook',
|
|
|
'hierarchical' => false,
|
|
|
|
@@ -210,18 +210,18 @@ function extend_search( $groups, $params ) { |
|
|
$all_groups = groups_get_groups( array( 'type' => 'alphabetical' ) );
|
|
|
foreach( $all_groups['groups'] as $group ) {
|
|
|
// Search posts from current $group
|
|
|
- $results = BPSP_WordPress::get_posts(
|
|
|
+ $results = get_posts(
|
|
|
array(
|
|
|
- 'group_id' => $group->id
|
|
|
- ),
|
|
|
- array(
|
|
|
- 'assignment',
|
|
|
- 'course',
|
|
|
- 'schedule',
|
|
|
- ),
|
|
|
- $params['search_terms']
|
|
|
+ 'group_id' => $group->id,
|
|
|
+ 'post_type' => array(
|
|
|
+ 'assignment',
|
|
|
+ 'course',
|
|
|
+ 'schedule',
|
|
|
+ 'lecture'
|
|
|
+ ),
|
|
|
+ 's' => $params['search_terms']
|
|
|
+ )
|
|
|
);
|
|
|
-
|
|
|
// Merge posts to $groups if new found
|
|
|
if( !empty( $results ) ) {
|
|
|
if( !in_array( $group, $groups['groups'] ) ) {
|
|
@@ -326,4 +326,4 @@ function bpsp_media_library_tab( $action_url ) { |
|
|
return $action_url;
|
|
|
}
|
|
|
}
|
|
|
-?>
|
|
|
+?>
|
|
@@ -50,7 +50,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Lectures', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'lecture',
|
|
|
'hierarchical' => true,
|
|
|
|
@@ -61,7 +61,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Responses', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'response',
|
|
|
'hierarchical' => false,
|
|
|
|
@@ -52,7 +52,7 @@ function register_post_types() { |
|
|
'description' => __( 'BuddyPress ScholarPress Courseware Schedules', 'bpsp' ),
|
|
|
'public' => BPSP_DEBUG,
|
|
|
'publicly_queryable' => false,
|
|
|
- 'exclude_from_search' => false,
|
|
|
+ 'exclude_from_search' => true,
|
|
|
'show_ui' => BPSP_DEBUG,
|
|
|
'capability_type' => 'schedule',
|
|
|
'hierarchical' => false,
|
|
@@ -717,4 +717,4 @@ function toICS() { |
|
|
die( $cal->returnCalendar() );
|
|
|
}
|
|
|
}
|
|
|
-?>
|
|
|
+?>
|
0 comments on commit
73fb5ec