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/admin/class-lp-modal-search-items.php +6 -2 4.1.7.3 → 4.4.9 View file →
@@ -104,8 +104,12 @@
104 104 'posts_per_page' => $this->_options['limit'],
105 105 'offset' => ( $paged - 1 ) * $this->_options['limit'],
106 106 );
107 107
108 + if ( 'order-items' === $context ) {
109 + $context_id = false;
110 + }
111 +
108 112 $context_id = apply_filters( 'learn-press/modal-search-items/context-id', $context_id, $context );
109 113 if ( $context_id ) {
110 114 // Admin can get all items
111 115 if ( ! user_can( $user_id, 'administrator' ) ) {
@@ -349,10 +353,10 @@
349 353 /**
350 354 * @return bool|LP_Modal_Search_Items
351 355 */
352 356 public static function instance() {
353 - static $instance = false;
354 - if ( ! $instance ) {
357 + static $instance;
358 + if ( is_null( $instance ) ) {
355 359 $instance = new self();
356 360 }
357 361
358 362 return $instance;