Gravity_Forms\Gravity_Forms\Splash_Page\GF_Splash_Page
Class GF_Splash_Page
Since: 2.6 (Displays a splash page when a user updates to a new version.)
Source: includes/splash-page/class-gf-splash-page.php:21
Details
- Kind:
class - Namespace:
Gravity_Forms\Gravity_Forms\Splash_Page
Properties
| Property | Type | Description |
|---|---|---|
$about_version | string | The latest version that has a splash page. |
$tags | Splash_Page_Template_Tags\GF_Splash_Page_Template_Tags | The class that generates template tags. |
$img_dir | string | The directory where splash page images are stored. |
Methods
| Method | Description |
|---|---|
__construct() | GF_Splash_Page_Constructor |
is_splash_page() | Conditional test for if we're on the splash page. |
splash_page_styles() | Enqueue splash page styles. |
body_class() | Add a body class to the splash page. |
admin_title() | Add "About" to the title tag. |
set_upgrade_transient() | Set a transient if we need to show the splash page. |
need_splash_page() | Determine whether we need to display a splash page. |
system_status_link() | Add a link to the splash page in the system status menu. |
about_page() | Display the splash page. |
about_page_modal() | Display the splash page as a modal. |
should_display() | Whether the splash page should display. |
Method Reference
__construct()
public function __construct( $tags )
GF_Splash_Page_Constructor
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tags | Splash_Page_Template_Tags\GF_Splash_Page_Template_Tags |
Source: includes/splash-page/class-gf-splash-page.php:49
is_splash_page()
public function is_splash_page()
Conditional test for if we're on the splash page.
Returns
bool
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:64
splash_page_styles()
public function splash_page_styles()
Enqueue splash page styles.
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:77
body_class()
public function body_class( $classes )
Add a body class to the splash page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$classes |
Returns
string
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:94
admin_title()
public function admin_title( $title )
Add "About" to the title tag.
If you add a submenu page without a parent page, it doesn't get a title, so we need to add one manually.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$title |
Returns
mixed|string
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:112
set_upgrade_transient()
public function set_upgrade_transient( $version, $from_db_version, $force_upgrade )
Set a transient if we need to show the splash page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$version | |||
$from_db_version | |||
$force_upgrade |
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:129
need_splash_page()
public function need_splash_page( $old_version, $new_version, $about_version )
Determine whether we need to display a splash page.
If the old version is earlier than $this->about_version, and the new version is the same or later than $this->about_version, we need to show the splash page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$old_version | |||
$new_version | |||
$about_version |
Returns
bool
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:153
system_status_link()
public function system_status_link( $subviews )
Add a link to the splash page in the system status menu.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$subviews | array |
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:166
about_page()
public function about_page()
Display the splash page.
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:180
about_page_modal()
public function about_page_modal()
Display the splash page as a modal.
Returns
string
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:197
should_display()
public function should_display()
Whether the splash page should display.
Returns
bool
Since: 2.6
Source: includes/splash-page/class-gf-splash-page.php:216