PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | inc/custom-post-types/quiz.php +10 -3 4.4.8 → 4.4.9 View file →
@@ -271,8 +271,12 @@
271 271 return $posts;
272 272 }
273 273
274 274 // Check screen
275 + if ( ! function_exists( 'get_current_screen' ) ) {
276 + return $posts;
277 + }
278 +
275 279 $curren_screen = get_current_screen();
276 280 if ( ! $curren_screen || $curren_screen->id !== 'edit-' . LP_QUIZ_CPT ) {
277 281 return $posts;
278 282 }
@@ -296,12 +300,15 @@
296 300 $orderby = LP_Request::get_param( 'orderby', '', 'key' );
297 301 $order = LP_Request::get_param( 'order', '', 'key' );
298 302
299 303 $filter = new QuizPostFilter();
300 - $filter->only_fields = [ 'p.ID', 'p.post_title', 'p.post_author', 'p.post_date', 'p.post_date_gmt' ];
304 + $filter->only_fields = array_map(
305 + function ( $field ) {
306 + return "p.{$field}";
307 + },
308 + $filter->all_fields
309 + );
301 310 $filter->field_count = 'p.ID';
302 - $filter->page = $paged;
303 - $filter->limit = $posts_per_page;
304 311 $post_db = PostDB::getInstance();
305 312
306 313 if ( ! empty( $status ) ) {
307 314 $filter->post_status = array( $status );