PluginProbe
Groundhogg — CRM, Newsletters, and Marketing Automation / 4.7.2
Groundhogg — CRM, Newsletters, and Marketing Automation v4.7.2
4.7.2 4.7 4.7.1 4.6 4.6.1 4.5.15 4.5.14 4.5.13 4.5.12 4.5.11 4.5.10 4.5.9 4.5.8 4.5.7 4.5.6 4.5.5 4.5.4 4.5.3 4.5.1 4.5.2 3.7.1 3.7.2 3.7.3 3.7.3.1 3.7.3.2 All 404 releases
groundhogg / groundhogg.php

groundhogg.php in Groundhogg — CRM, Newsletters, and Marketing Automation 4.7.2, at groundhogg.php

105 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Plugin Name: Groundhogg
4 * Plugin URI: https://groundhogg.io/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
5 * Description: CRM and marketing automation for WordPress
6 * Version: 4.7.2
7 * Author: Groundhogg Inc.
8 * Author URI: https://groundhogg.io/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
9 * Text Domain: groundhogg
10 * Domain Path: /languages
11 * License: GPLv3
12 * License URI: https://www.gnu.org/licenses/gpl.md
13 *
14 * Groundhogg is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * any later version.
18 *
19 * Groundhogg is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 */
24
25 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
26
27 define( 'GROUNDHOGG_VERSION', '4.7.2' );
28 define( 'GROUNDHOGG_PREVIOUS_STABLE_VERSION', '4.7.1' );
29
30 define( 'GROUNDHOGG__FILE__', __FILE__ );
31 define( 'GROUNDHOGG_PLUGIN_BASE', plugin_basename( GROUNDHOGG__FILE__ ) );
32 define( 'GROUNDHOGG_PATH', plugin_dir_path( GROUNDHOGG__FILE__ ) );
33 define( 'GROUNDHOGG_URL', plugins_url( '/', GROUNDHOGG__FILE__ ) );
34
35 define( 'GROUNDHOGG_ASSETS_PATH', GROUNDHOGG_PATH . 'assets/' );
36 define( 'GROUNDHOGG_ASSETS_URL', GROUNDHOGG_URL . 'assets/' );
37
38 add_action( 'plugins_loaded', 'groundhogg_load_plugin_textdomain' );
39
40 define( 'GROUNDHOGG_TEXT_DOMAIN', 'groundhogg' );
41 define( 'GROUNDHOGG_MINIMUM_PHP_VERSION', '7.4' );
42 define( 'GROUNDHOGG_MINIMUM_WORDPRESS_VERSION', '6.9' );
43
44 if ( ! version_compare( PHP_VERSION, GROUNDHOGG_MINIMUM_PHP_VERSION, '>=' ) ) {
45 add_action( 'admin_notices', 'groundhogg_fail_php_version' );
46 } elseif ( ! version_compare( get_bloginfo( 'version' ), GROUNDHOGG_MINIMUM_WORDPRESS_VERSION, '>=' ) ) {
47 add_action( 'admin_notices', 'groundhogg_fail_wp_version' );
48 } else {
49 require __DIR__ . '/includes/plugin.php';
50 }
51
52 /**
53 * Groundhogg loaded.
54 *
55 * Fires when Groundhogg was fully loaded and instantiated.
56 *
57 * @since 1.0.0
58 */
59 do_action( 'groundhogg/loaded' );
60
61 /**
62 * Load Groundhogg textdomain.
63 *
64 * Load gettext translate for Groundhogg text domain.
65 *
66 * @return void
67 * @since 1.0.0
68 *
69 */
70 function groundhogg_load_plugin_textdomain() {
71 load_plugin_textdomain( 'groundhogg', false, basename( __DIR__ ) . '/languages' );
72 }
73
74 /**
75 * Groundhogg admin notice for minimum PHP version.
76 *
77 * Warning when the site doesn't have the minimum required PHP version.
78 *
79 * @return void
80 * @since 2.0
81 *
82 */
83 function groundhogg_fail_php_version() {
84 /* translators: %s: PHP version */
85 $message = sprintf( esc_html__( 'Groundhogg requires PHP version %s+, plugin is currently NOT RUNNING.', 'groundhogg' ), GROUNDHOGG_MINIMUM_PHP_VERSION );
86 $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
87 echo wp_kses_post( $html_message );
88 }
89
90 /**
91 * Groundhogg admin notice for minimum WordPress version.
92 *
93 * Warning when the site doesn't have the minimum required WordPress version.
94 *
95 * @return void
96 * @since 2.0
97 *
98 */
99 function groundhogg_fail_wp_version() {
100 /* translators: %s: WordPress version */
101 $message = sprintf( esc_html__( 'Groundhogg requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'groundhogg' ), GROUNDHOGG_MINIMUM_WORDPRESS_VERSION );
102 $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
103 echo wp_kses_post( $html_message );
104 }
105