| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Sharing Image |
| 4 |
* Description: Create sharing image for Facebook, VK.com, Telegram and other social networks |
| 5 |
* Version: 2.0.17 |
| 6 |
* Requires at least: 5.3 |
| 7 |
* Requires PHP: 5.5 |
| 8 |
* Plugin URI: https://wpset.org/sharing-image/ |
| 9 |
* Author: Anton Lukin |
| 10 |
* Author URI: https://wpset.org/ |
| 11 |
* Text Domain: sharing-image |
| 12 |
* |
| 13 |
* @package sharing-image |
| 14 |
* @author Anton Lukin |
| 15 |
*/ |
| 16 |
|
| 17 |
/** |
| 18 |
* If this file is called directly, abort. |
| 19 |
*/ |
| 20 |
if ( ! defined( 'ABSPATH' ) ) { |
| 21 |
die; |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* Plugin version. |
| 26 |
*/ |
| 27 |
define( 'SHARING_IMAGE_VERSION', '2.0.17' ); |
| 28 |
|
| 29 |
/** |
| 30 |
* Main plugin file. |
| 31 |
*/ |
| 32 |
define( 'SHARING_IMAGE_FILE', __FILE__ ); |
| 33 |
|
| 34 |
/** |
| 35 |
* Shortcut constant to the path of this file. |
| 36 |
*/ |
| 37 |
define( 'SHARING_IMAGE_DIR', plugin_dir_path( __FILE__ ) ); |
| 38 |
|
| 39 |
/** |
| 40 |
* Plugin dir url. |
| 41 |
*/ |
| 42 |
define( 'SHARING_IMAGE_URL', plugin_dir_url( __FILE__ ) ); |
| 43 |
|
| 44 |
if ( ! function_exists( 'sharing_image_plugin' ) ) { |
| 45 |
/** |
| 46 |
* Run main plugin function. |
| 47 |
*/ |
| 48 |
function sharing_image_plugin() { |
| 49 |
require_once SHARING_IMAGE_DIR . 'vendor/autoload.php'; |
| 50 |
|
| 51 |
$classes = array( |
| 52 |
'Sharing_Image\Meta', |
| 53 |
'Sharing_Image\Settings', |
| 54 |
'Sharing_Image\Widget', |
| 55 |
); |
| 56 |
|
| 57 |
/** |
| 58 |
* Filters list of automatically initialized classes. |
| 59 |
* |
| 60 |
* @param array $classes List of classes. |
| 61 |
*/ |
| 62 |
$classes = apply_filters( 'sharing_image_plugin_classes', $classes ); |
| 63 |
|
| 64 |
foreach ( $classes as $class ) { |
| 65 |
( new $class() )->init(); |
| 66 |
} |
| 67 |
|
| 68 |
include SHARING_IMAGE_DIR . 'functions.php'; |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
add_action( 'plugins_loaded', 'sharing_image_plugin' ); |
| 73 |
|