Skip to content

Commit a2161cd

Browse files
Layout Directory: Resolve Issue with fetching page 2
1 parent f30f341 commit a2161cd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

inc/admin-layouts.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ public function action_get_prebuilt_layouts() {
255255
}
256256

257257
$cache = get_transient( 'siteorigin_panels_layouts_directory_' . $directory_id .'_page_' . $page_num );
258+
258259
if ( empty( $search ) && ! empty( $cache ) ) {
259260
$return = $cache;
260261
} else {
@@ -265,7 +266,7 @@ public function action_get_prebuilt_layouts() {
265266
}
266267

267268
$url = apply_filters( 'siteorigin_panels_layouts_directory_url', $url );
268-
$response = wp_remote_get( esc_url( $url ) );
269+
$response = wp_remote_get( esc_url_raw( $url ) );
269270

270271
if (
271272
! is_wp_error( $response ) &&

siteorigin-panels.php

+3
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ public function version_check() {
682682
if ( empty( $active_version ) || $active_version !== SITEORIGIN_PANELS_VERSION ) {
683683
do_action( 'siteorigin_panels_version_changed' );
684684
update_option( 'siteorigin_panels_active_version', SITEORIGIN_PANELS_VERSION );
685+
686+
// Clear layout directory cache after update to account for bug in versions 2.29.18 and below.
687+
delete_transient( 'siteorigin_panels_layouts_directory_siteorigin_page_2' );
685688
}
686689
}
687690

0 commit comments

Comments
 (0)