| 1 |
<?php |
| 2 |
/** |
| 3 |
* Primary file for MCP. |
| 4 |
* |
| 5 |
* @category WordPress_Plugin |
| 6 |
* @package Mediavine Control Panel |
| 7 |
* @author Mediavine |
| 8 |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License |
| 9 |
* @link https://www.mediavine.com |
| 10 |
* |
| 11 |
* Plugin Name: Mediavine Control Panel |
| 12 |
* Plugin URI: https://www.mediavine.com/ |
| 13 |
* Description: Manage your ads, analytics and more with our lightweight plugin! |
| 14 |
* Version: 2.10.12 |
| 15 |
* Requires at least: 5.2 |
| 16 |
* Requires PHP: 7.3 |
| 17 |
* Author: Mediavine |
| 18 |
* Author URI: https://www.mediavine.com |
| 19 |
* Text Domain: mcp |
| 20 |
* License: GPL2 |
| 21 |
*/ |
| 22 |
|
| 23 |
// Prevent direct access. |
| 24 |
if ( ! defined( 'ABSPATH' ) ) { |
| 25 |
exit( 'This plugin requires WordPress' ); |
| 26 |
} |
| 27 |
|
| 28 |
// Autoload via Composer. |
| 29 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 30 |
|
| 31 |
add_action( 'admin_notices', '\Mediavine\MCP\VersionCheck::mcp_incompatible_notice' ); |
| 32 |
|
| 33 |
if ( \Mediavine\MCP\VersionCheck::mcp_is_compatible() ) { |
| 34 |
// @todo: Refactor to include trailing slash to be consistent with MCP_PLUGIN_URL. |
| 35 |
if ( ! defined( 'MCP_PLUGIN_DIR' ) ) { |
| 36 |
define( 'MCP_PLUGIN_DIR', __DIR__ ); |
| 37 |
} |
| 38 |
if ( ! defined( 'MCP_PLUGIN_FILE' ) ) { |
| 39 |
define( 'MCP_PLUGIN_FILE', __FILE__ ); |
| 40 |
} |
| 41 |
// Gets set as {directory-name}/mediavine-control-panel.php. |
| 42 |
if ( ! defined( 'MCP_PLUGIN_BASENAME' ) ) { |
| 43 |
define( 'MCP_PLUGIN_BASENAME', plugin_basename( MCP_PLUGIN_FILE ) ); |
| 44 |
} |
| 45 |
// Public facing URL for the plugin, with trailing slash. |
| 46 |
if ( ! defined( 'MCP_PLUGIN_URL' ) ) { |
| 47 |
define( 'MCP_PLUGIN_URL', plugin_dir_url( MCP_PLUGIN_FILE ) ); |
| 48 |
} |
| 49 |
|
| 50 |
if ( class_exists( '\Mediavine\MCP\MV_Control_Panel' ) ) { |
| 51 |
// instantiate the plugin class. |
| 52 |
\Mediavine\MCP\MV_Control_Panel::get_instance(); |
| 53 |
} |
| 54 |
} |
| 55 |
|