[], 'version' => PLUME_VERSION, ]; wp_enqueue_script( 'plume-editor', PLUME_URL . 'assets/editor/index.js', array_merge( $asset['dependencies'], [ 'wp-element', 'wp-plugins', 'wp-edit-post', 'wp-i18n', 'wp-api-fetch', 'wp-data', 'wp-block-editor' ] ), $asset['version'], true ); wp_localize_script( 'plume-editor', 'plumeData', [ 'nonce' => \wp_create_nonce( 'wp_rest' ), 'restUrl' => \esc_url_raw( \rest_url( 'plume/v1' ) ), 'currentPostId' => isset( $GLOBALS['post'] ) ? (int) $GLOBALS['post']->ID : ( isset( $_GET['post'] ) ? \absint( $_GET['post'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only post ID for editor sidebar; no form processing. 'isPaid' => TierManager::is_paid(), 'siteTitle' => \get_bloginfo( 'name' ), ] ); wp_enqueue_style( 'plume-editor', PLUME_URL . 'assets/editor/index.css', [ 'wp-components' ], $asset['version'] ); } }