src/admin/class-wordlift-admin-post-edit-page.php 1 location
|
@@ 88-101 (lines=14) @@
|
| 85 |
|
* @return bool True if G'berg is used otherwise false. |
| 86 |
|
* @since 3.22.3 |
| 87 |
|
*/ |
| 88 |
|
function is_gutenberg_page() { |
| 89 |
|
if ( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) { |
| 90 |
|
// The Gutenberg plugin is on. |
| 91 |
|
return TRUE; |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
$current_screen = get_current_screen(); |
| 95 |
|
if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) { |
| 96 |
|
// Gutenberg page on 5+. |
| 97 |
|
return TRUE; |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
return FALSE; |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
/** |
| 104 |
|
* Check if we're in UX builder. |
src/admin/class-wordlift-admin.php 1 location
|
@@ 301-317 (lines=17) @@
|
| 298 |
|
|
| 299 |
|
} |
| 300 |
|
|
| 301 |
|
public static function is_gutenberg() { |
| 302 |
|
if ( function_exists( 'is_gutenberg_page' ) && |
| 303 |
|
is_gutenberg_page() |
| 304 |
|
) { |
| 305 |
|
// The Gutenberg plugin is on. |
| 306 |
|
return true; |
| 307 |
|
} |
| 308 |
|
$current_screen = get_current_screen(); |
| 309 |
|
if ( method_exists( $current_screen, 'is_block_editor' ) && |
| 310 |
|
$current_screen->is_block_editor() |
| 311 |
|
) { |
| 312 |
|
// Gutenberg page on 5+. |
| 313 |
|
return true; |
| 314 |
|
} |
| 315 |
|
|
| 316 |
|
return false; |
| 317 |
|
} |
| 318 |
|
|
| 319 |
|
/** |
| 320 |
|
* Return the settings array by applying filters. |