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