@@ -105,7 +105,6 @@ public function register_blocks() {
105
105
],
106
106
Sensei ()->assets ->src_path ( 'blocks/course-outline/lesson-block ' )
107
107
);
108
-
109
108
}
110
109
111
110
/**
@@ -174,7 +173,7 @@ public function get_block_structure() {
174
173
$ context = 'edit ' ;
175
174
}
176
175
177
- $ structure = Sensei_Course_Structure::instance ( $ post ->ID )->get ( $ context );
176
+ $ structure = Sensei_Course_Structure::instance ( $ post ->ID )->get ( $ context, wp_using_ext_object_cache () );
178
177
179
178
$ this ->add_block_attributes ( $ structure );
180
179
@@ -183,7 +182,6 @@ public function get_block_structure() {
183
182
'attributes ' => $ attributes ,
184
183
'blocks ' => $ structure ,
185
184
];
186
-
187
185
}
188
186
189
187
/**
@@ -233,7 +231,6 @@ public function render_course_outline_block( $attributes ) {
233
231
234
232
$ this ->block_content = $ this ->course ->render_course_outline_block ( $ outline );
235
233
return $ this ->block_content ;
236
-
237
234
}
238
235
239
236
/**
@@ -251,7 +248,7 @@ public function frontend_notices() {
251
248
}
252
249
253
250
$ course_id = $ post ->ID ;
254
- $ structure = Sensei_Course_Structure::instance ( $ course_id )->get ( 'view ' );
251
+ $ structure = Sensei_Course_Structure::instance ( $ course_id )->get ( 'view ' , wp_using_ext_object_cache () );
255
252
$ has_draft = $ this ->has_draft ( $ structure );
256
253
$ can_edit_course = Sensei_Course::can_current_user_edit_course ( $ course_id );
257
254
@@ -333,5 +330,4 @@ public function frontend_notices() {
333
330
Sensei ()->notices ->add_notice ( $ message , 'info ' , 'sensei-course-outline-drafts ' );
334
331
}
335
332
}
336
-
337
333
}
0 commit comments