PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
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 4.2.0 All 139 releases
← All changes | inc/Gutenberg/GutenbergHandleMain.php +4 -6 4.4.04.4.8 View file →
@@ -51,9 +51,9 @@
51 51 return $flag;
52 52 }
53 53
54 54 $wp_screen = get_current_screen();
55 - if ( $wp_screen->id === 'edit-lp_order' ) {
55 + if ( ! empty( $wp_screen->id ) && $wp_screen->id === 'edit-lp_order' ) {
56 56 $flag = false;
57 57 }
58 58
59 59 return $flag;
@@ -141,9 +141,9 @@
141 141 * @param mixed $template_type wp_template or wp_template_part.
142 142 *
143 143 * @return array
144 144 * @since 4.2.2.3
145 - * @version 1.0.6
145 + * @version 1.0.7
146 146 */
147 147 public function set_blocks_template( array $query_result, array $query, $template_type ): array {
148 148 if ( $template_type === 'wp_template_part' ) { // Template not Template part
149 149 return $query_result;
@@ -174,10 +174,9 @@
174 174 * Because don't have slug 'single-lp_course_item'.
175 175 * Slug 'single-lp_course_item' is for save content of block template.
176 176 */
177 177 $singleCourseItemBlockTemplate->slug = 'single-lp_course';
178 - $query_result[] = $singleCourseItemBlockTemplate;
179 - return $query_result;
178 + return [ $singleCourseItemBlockTemplate ];
180 179 }
181 180 }
182 181 // End check course item.
183 182
@@ -196,10 +195,9 @@
196 195 $singleCourseOfflineBlockTemplate->content = traverse_and_serialize_blocks( parse_blocks( $block_custom->post_content ) );
197 196 }
198 197
199 198 $singleCourseOfflineBlockTemplate->slug = 'single-lp_course';
200 - $query_result[] = $singleCourseOfflineBlockTemplate;
201 - return $query_result;
199 + return [ $singleCourseOfflineBlockTemplate ];
202 200 }
203 201 }
204 202 }
205 203 // End check course offline.