| 1 |
<?php |
| 2 |
/** |
| 3 |
* The plugin bootstrap file |
| 4 |
* |
| 5 |
* @link https://create.studio/ |
| 6 |
* @since 1.9.16 |
| 7 |
* |
| 8 |
* @wordpress-plugin |
| 9 |
* Plugin Name: Create |
| 10 |
* Plugin URI: https://create.studio/plugin |
| 11 |
* Description: Create custom recipe and how to cards to be displayed in posts. |
| 12 |
* Version: 2.6.4 |
| 13 |
* Requires at least: 6.5 |
| 14 |
* Requires PHP: 7.4 |
| 15 |
* |
| 16 |
* Author: Mischief Marmot |
| 17 |
* Author URI: https://create.studio/ |
| 18 |
* License: GPL-2.0+ |
| 19 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 20 |
* Text Domain: mediavine-create |
| 21 |
* Domain Path: /languages |
| 22 |
*/ |
| 23 |
|
| 24 |
// Prevent direct access |
| 25 |
if ( ! defined( 'ABSPATH' ) ) { |
| 26 |
exit( 'This plugin requires WordPress' ); |
| 27 |
} |
| 28 |
|
| 29 |
// First-party classmap autoloader (Composer is dev-only; not shipped). |
| 30 |
require_once __DIR__ . '/lib/autoload.php'; |
| 31 |
|
| 32 |
// Environment. |
| 33 |
define( 'MV_CREATE_URL', plugin_dir_url( __FILE__ ) ); |
| 34 |
define( 'MV_CREATE_DIR', plugin_dir_path( __FILE__ ) ); |
| 35 |
define( 'MV_CREATE_PLUGIN_FILE', plugin_basename( __FILE__ ) ); |
| 36 |
define( 'MV_CREATE_BASENAME_DIR', plugin_basename( __DIR__ ) ); |
| 37 |
|
| 38 |
// Add hooks regardless of compatibility. |
| 39 |
add_filter( 'plugin_action_links_' . MV_CREATE_PLUGIN_FILE, 'mv_create_add_action_links' ); |
| 40 |
add_filter( 'plugin_row_meta', 'mv_create_plugin_info_links', 10, 2 ); |
| 41 |
add_action( 'admin_notices', 'mv_create_incompatible_notice' ); |
| 42 |
add_action( 'admin_notices', 'mv_create_permalink_check' ); |
| 43 |
add_action( 'admin_head', 'mv_create_throw_warnings' ); |
| 44 |
|
| 45 |
if ( mv_create_is_compatible() ) { |
| 46 |
\Mediavine\Create\Plugin::get_instance(); |
| 47 |
|
| 48 |
// Stable handle for integrations (create-studio-dev) so they don't depend on |
| 49 |
// the legacy Mediavine namespace, and renaming it stays non-breaking. |
| 50 |
class_alias( \Mediavine\Create\Plugin::class, 'Create\Plugin' ); |
| 51 |
} |
| 52 |
|