embedpress
Last commit date
EmbedPress
7 years ago
Gutenberg
7 years ago
assets
7 years ago
languages
7 years ago
vendor
7 years ago
CONTRIBUTING.md
7 years ago
PROVIDERS.md
7 years ago
autoloader.php
7 years ago
embedpress.php
7 years ago
includes.php
7 years ago
index.html
7 years ago
providers.php
7 years ago
readme.txt
7 years ago
embedpress.php
58 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: EmbedPress |
| 4 | * Plugin URI: https://embedpress.com/ |
| 5 | * Description: WordPress supports around 35 embed sources, but PublishPress Embeds adds over 40 more, including |
| 6 | * Facebook, Google Maps, Google Docs, UStream! Just use the URL! |
| 7 | * Author:EmbedPress |
| 8 | * Author URI:http://embedpress.com |
| 9 | * Version: 2.3.0 |
| 10 | * Text Domain: embedpress |
| 11 | * Domain Path: /languages |
| 12 | * |
| 13 | * Copyright (c) 2018 EmbedPress |
| 14 | * |
| 15 | * EmbedPress plugin bootstrap file. |
| 16 | * |
| 17 | * @package EmbedPress |
| 18 | * @author EmbedPress <help@embedpress.com> |
| 19 | * @copyright Copyright (C) 2018 EmbedPress. All rights reserved. |
| 20 | * @license GPLv2 or later |
| 21 | * @since 1.0.0 |
| 22 | */ |
| 23 | |
| 24 | use EmbedPress\Compatibility; |
| 25 | |
| 26 | defined('ABSPATH') or die("No direct script access allowed."); |
| 27 | |
| 28 | require_once plugin_dir_path(__FILE__) . 'includes.php'; |
| 29 | |
| 30 | include_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 31 | |
| 32 | if ( ! defined('EMBEDPRESS_IS_LOADED')) { |
| 33 | return; |
| 34 | } |
| 35 | |
| 36 | function onPluginActivationCallback() |
| 37 | { |
| 38 | \EmbedPress\Core::onPluginActivationCallback(); |
| 39 | } |
| 40 | |
| 41 | function onPluginDeactivationCallback() |
| 42 | { |
| 43 | \EmbedPress\Core::onPluginDeactivationCallback(); |
| 44 | } |
| 45 | |
| 46 | register_activation_hook(__FILE__, 'onPluginActivationCallback'); |
| 47 | register_deactivation_hook(__FILE__, 'onPluginDeactivationCallback'); |
| 48 | |
| 49 | if ( ! is_plugin_active('gutenberg/gutenberg.php')) { |
| 50 | if (Compatibility::isWordPress5() && ! Compatibility::isClassicalEditorActive()) { |
| 51 | $embedPressPlugin = new \EmbedPress\Core(); |
| 52 | } else { |
| 53 | $embedPressPlugin = new \EmbedPress\CoreLegacy(); |
| 54 | } |
| 55 | |
| 56 | $embedPressPlugin->initialize(); |
| 57 | } |
| 58 |