| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: MaxButtons |
| 4 |
Plugin URI: http://maxbuttons.com |
| 5 |
Description: The best WordPress button generator. This is the free version; the Pro version <a href="http://maxbuttons.com/?ref=mbfree">can be found here</a>. |
| 6 |
Version: 9.7.7 |
| 7 |
Author: Max Foundry |
| 8 |
Author URI: http://maxfoundry.com |
| 9 |
Text Domain: maxbuttons |
| 10 |
Domain Path: /languages |
| 11 |
|
| 12 |
Copyright 2023 Max Foundry, LLC (http://maxfoundry.com) |
| 13 |
*/ |
| 14 |
namespace MaxButtons; |
| 15 |
|
| 16 |
if (! defined('MAXBUTTONS_ROOT_FILE')) |
| 17 |
define("MAXBUTTONS_ROOT_FILE", __FILE__); |
| 18 |
if (! defined('MAXBUTTONS_VERSION_NUM')) |
| 19 |
define('MAXBUTTONS_VERSION_NUM', '9.7.7'); |
| 20 |
|
| 21 |
define('MAXBUTTONS_RELEASE',"21 January 2023"); |
| 22 |
|
| 23 |
if (! function_exists('MaxButtons\maxbutton_double_load')) |
| 24 |
{ |
| 25 |
function maxbutton_double_load() |
| 26 |
{ |
| 27 |
$message = __("Already found an instance of MaxButtons running. Please check if you are trying to activate two MaxButtons plugins and deactivate one. ","maxbuttons" ); |
| 28 |
echo "<div class='error'><h4>$message</h4></div>"; |
| 29 |
return; |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
if (function_exists("MaxButtons\MB")) |
| 34 |
{ |
| 35 |
add_action('admin_notices', 'MaxButtons\maxbutton_double_load'); |
| 36 |
return; |
| 37 |
} |
| 38 |
|
| 39 |
if (! function_exists('MaxButtons\maxbuttons_php56_nono')) |
| 40 |
{ |
| 41 |
function maxbuttons_php56_nono() |
| 42 |
{ |
| 43 |
$message = sprintf( __("MaxButtons requires at least PHP 7 . You are running version: %s ","maxbuttons"), PHP_VERSION); |
| 44 |
echo"<div class='error'> <h4>$message</h4></div>"; |
| 45 |
return; |
| 46 |
} |
| 47 |
} |
| 48 |
if ( version_compare(PHP_VERSION, '7', '<' ) ) { |
| 49 |
|
| 50 |
add_action( 'admin_notices', 'MaxButtons\maxbuttons_php56_nono' ); |
| 51 |
return; |
| 52 |
} |
| 53 |
|
| 54 |
// In case of development, copy this to wp-config.php |
| 55 |
// define("MAXBUTTONS_DEBUG", true); |
| 56 |
// define("MAXBUTTONS_BENCHMARK",true); |
| 57 |
|
| 58 |
require_once( trailingslashit(dirname(MAXBUTTONS_ROOT_FILE)) . "classes/maxbuttons-class.php"); |
| 59 |
|
| 60 |
// runtime. |
| 61 |
if (! function_exists("MaxButtons\MB")) { |
| 62 |
function MB() |
| 63 |
{ |
| 64 |
|
| 65 |
return maxButtonsPlugin::getInstance(); |
| 66 |
} |
| 67 |
} |
| 68 |
$maxbuttons = new maxButtonsPlugin(); |
| 69 |
|
| 70 |
|
| 71 |
do_action('maxbuttons/plugin/init' , $maxbuttons); |
| 72 |
|
| 73 |
// Activation / deactivation |
| 74 |
register_activation_hook(__FILE__, array(maxUtils::namespaceit("maxInstall"),'activation_hook') ); |
| 75 |
register_deactivation_hook(__FILE__,array(maxUtils::namespaceit("maxInstall"), 'deactivation_hook') ); |
| 76 |
|