9 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
18 esc_html__(
'GravityView requires PHP [php_required_version] or newer.',
'gk-gravityview' ),
19 esc_html__(
'You are using version [php_installed_version].',
'gk-gravityview' ),
20 esc_html__(
'Please ask your host to upgrade PHP on the server.',
'gk-gravityview' ),
23 foreach ( $php_notices as &$notice ) {
28 '[php_installed_version]' => phpversion()
33 if (
'cli' === php_sapi_name() ) {
34 printf( join(
' ', $php_notices ) );
36 add_action(
'admin_notices',
function () use ( $php_notices ) {
37 $floaty_image = plugins_url(
'assets/images/astronaut-200x263.png',
GRAVITYVIEW_FILE );
38 $floaty_image_alt = esc_attr__(
'The GravityKit Astronaut Says:',
'gk-gravityview' );
40 list( $requires, $installed, $call_to_action ) = $php_notices;
44 <div style=
"margin-top: 1em;">
45 <img src=
"{$floaty_image}" alt=
"{$floaty_image_alt}" style=
"float: left; height: 5em; margin-right: 1em;" />
46 <h3 style=
"font-size:16px; margin: 0 0 8px 0;">
50 <p>{$call_to_action}</p>
const GRAVITYVIEW_DIR
"GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory, with trailing slash ...
const GRAVITYVIEW_FILE
Full path to the GravityView file "GRAVITYVIEW_FILE" "./gravityview.php".
static register( $plugin_file)
Registers class instance.
const GV_MIN_PHP_VERSION
GravityView requires at least this version of PHP to function properly.