PluginProbe
Enable CORS / 1.2.4
Enable CORS v1.2.4
2.1.0 2.0.4 trunk 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.0.2 2.0.3
enable-cors / enable-cors.php

enable-cors.php in Enable CORS 1.2.4, at enable-cors.php

65 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Enable CORS
4 *
5 * @package Enable\Cors
6 * @author Dev Kabir
7 * @copyright 2023 Dev Kabir
8 * @license GPL-2.0-or-later
9 *
10 * @wordpress-plugin
11 * Plugin Name: Enable CORS
12 * Plugin URI: https://www.fiverr.com/share/7kXeLW
13 * Description: Enable Cross-Origin Resource Sharing for any or specific origin.
14 * Version: 1.2.4
15 * Requires at least: 4.7
16 * Requires PHP: 7.1
17 * Author: Dev Kabir
18 * Author URI: https://devkabir.github.io/
19 * Text Domain: enable-cors
20 * License: GPL v2 or later
21 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
22 */
23
24 /*
25 |--------------------------------------------------------------------------
26 | If this file is called directly, abort.
27 |--------------------------------------------------------------------------
28 */
29 if ( ! defined( 'WPINC' ) ) {
30 exit;
31 }
32
33 /*
34 |--------------------------------------------------------------------------
35 | Load class autoloader
36 |--------------------------------------------------------------------------
37 */
38 require_once __DIR__ . '/vendor/autoload.php';
39
40 use Enable\Cors\Plugin;
41
42 /*
43 |--------------------------------------------------------------------------
44 | Define default constants
45 |--------------------------------------------------------------------------
46 */
47 define( 'Enable\Cors\SLUG', 'enable-cors' );
48 define( 'Enable\Cors\VERSION', '1.2.4' );
49 define( 'Enable\Cors\FILE', __FILE__ );
50
51 /*
52 |--------------------------------------------------------------------------
53 | Activation, deactivation and uninstall event.
54 |--------------------------------------------------------------------------
55 */
56 register_activation_hook( __FILE__, array( Plugin::class, 'activate' ) );
57 register_deactivation_hook( __FILE__, array( Plugin::class, 'deactivate' ) );
58 register_uninstall_hook( __FILE__, array( Plugin::class, 'deactivate' ) );
59
60 /*
61 |--------------------------------------------------------------------------
62 | Start the plugin
63 |--------------------------------------------------------------------------
64 */
65 add_action('plugins_loaded', array(Plugin::class, 'init'));