File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ static function ( $classes ) {
182182 array ( rest_get_route_for_post_type_items ( 'attachment ' ), 'OPTIONS ' ),
183183 array ( rest_get_route_for_post_type_items ( 'page ' ), 'OPTIONS ' ),
184184 '/wp/v2/types?context=view ' ,
185- '/wp/v2/_wp_static_template ?context=edit ' ,
185+ '/wp/v2/wp_registered_template ?context=edit ' ,
186186 '/wp/v2/types/wp_template?context=edit ' ,
187187 '/wp/v2/types/wp_template_part?context=edit ' ,
188188 '/wp/v2/templates?context=edit&per_page=-1 ' ,
@@ -245,7 +245,9 @@ static function ( $classes ) {
245245 );
246246 }
247247 }
248- } else {
248+ } else if ( isset ( $ _GET ['p ' ] ) && '/ ' !== $ _GET ['p ' ] ) {
249+ // Only prefetch for the root. If we preload it for all pages and it's not
250+ // used it won't be possible to invalidate.
249251 $ preload_paths [] = '/wp/v2/templates/lookup?slug=front-page ' ;
250252 $ preload_paths [] = '/wp/v2/templates/lookup?slug=home ' ;
251253}
You can’t perform that action at this time.
0 commit comments