llms_is_editor_block_rendering()
Determine if the current request is a block rendering request in the editor.
Return Return
(bool)
Source Source
File: includes/llms.functions.core.php
function llms_is_editor_block_rendering() {
if ( ! defined( 'REST_REQUEST' ) || ! is_user_logged_in() ) {
return false;
}
global $wp;
if ( ! $wp instanceof WP || empty( $wp->query_vars['rest_route'] ) ) {
return false;
}
$route = $wp->query_vars['rest_route'];
return false !== strpos( $route, '/block-renderer/' );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.2.0 | Introduced. |