PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.0.7
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.0.7
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / public / wp / class-page.php

class-page.php in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.0.7, at public/wp/class-page.php

34 lines 773 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Leadin\wp;
4
5 /**
6 * Static function that wraps WordPress utility functions for WordPress pages.
7 */
8 class Page {
9 /**
10 * Return true if the current page has Gutenberg active.
11 */
12 public static function is_gutenberg_page() {
13 if ( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) {
14 // The Gutenberg plugin is on.
15 return true;
16 }
17
18 $current_screen = get_current_screen();
19 if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) {
20 // Gutenberg page on 5+.
21 return true;
22 }
23 return false;
24 }
25
26 /**
27 * Return true if the current page is the WP Admin dashboard.
28 */
29 public static function is_dashboard() {
30 $screen = get_current_screen();
31 return 'dashboard' === $screen->id;
32 }
33 }
34