Skip to content

Commit afc29c1

Browse files
authored
Merge branch 'develop' into ari/fix-pro/135
2 parents 802a689 + c522144 commit afc29c1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

assets/js/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const PrplRenderPageTypeSelector = () => {
7171
value: wp.data.useSelect( ( select ) => {
7272
const pageTypeArr =
7373
select( 'core/editor' ).getEditedPostAttribute( TAXONOMY );
74-
return 0 < pageTypeArr.length
74+
return pageTypeArr && 0 < pageTypeArr.length
7575
? parseInt( pageTypeArr[ 0 ] )
7676
: parseInt( progressPlannerEditor.defaultPageType );
7777
}, [] ),

classes/admin/class-editor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ public function __construct() {
2727
public function enqueue_editor_script() {
2828
// Bail early when we're on the site-editor.php page.
2929
$request = \filter_input( INPUT_SERVER, 'REQUEST_URI' );
30-
if ( false !== \strpos( (string) $request, '/site-editor.php' ) ) {
30+
if ( ! $request && isset( $_SERVER['REQUEST_URI'] ) ) {
31+
$request = \sanitize_text_field( \wp_unslash( $_SERVER['REQUEST_URI'] ) );
32+
}
33+
if ( $request && str_contains( $request, 'site-editor.php' ) ) {
3134
return;
3235
}
3336

package-lock.json

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)