-
Notifications
You must be signed in to change notification settings - Fork 71
/
ultimate-addons-for-gutenberg.php
56 lines (51 loc) · 1.97 KB
/
ultimate-addons-for-gutenberg.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Plugin Name: Ultimate Addons for Gutenberg
* Plugin URI: https://www.brainstormforce.com
* Author: Brainstorm Force
* Author URI: https://www.brainstormforce.com
* Version: 1.13.1
* Description: The Ultimate Addons for Gutenberg extends the Gutenberg functionality with several unique and feature-rich blocks that help build websites faster.
* Text Domain: ultimate-addons-for-gutenberg
*
* @package UAGB
*/
define( 'UAGB_FILE', __FILE__ );
define( 'UAGB_ROOT', dirname( plugin_basename( UAGB_FILE ) ) );
if ( ! version_compare( PHP_VERSION, '5.6', '>=' ) ) {
add_action( 'admin_notices', 'uagb_fail_php_version' );
} elseif ( ! version_compare( get_bloginfo( 'version' ), '4.7', '>=' ) ) {
add_action( 'admin_notices', 'uagb_fail_wp_version' );
} else {
require_once 'classes/class-uagb-loader.php';
}
/**
* Ultimate Addons for Gutenberg admin notice for minimum PHP version.
*
* Warning when the site doesn't have the minimum required PHP version.
*
* @since 1.8.1
*
* @return void
*/
function uagb_fail_php_version() {
/* translators: %s: PHP version */
$message = sprintf( esc_html__( 'Ultimate Addons for Gutenberg requires PHP version %s+, plugin is currently NOT RUNNING.', 'ultimate-addons-for-gutenberg' ), '5.6' );
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
echo wp_kses_post( $html_message );
}
/**
* Ultimate Addons for Gutenberg admin notice for minimum WordPress version.
*
* Warning when the site doesn't have the minimum required WordPress version.
*
* @since 1.8.1
*
* @return void
*/
function uagb_fail_wp_version() {
/* translators: %s: WordPress version */
$message = sprintf( esc_html__( 'Ultimate Addons for Gutenberg requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'ultimate-addons-for-gutenberg' ), '4.7' );
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
echo wp_kses_post( $html_message );
}