PluginProbe
Image Hub – Free Images from Unsplash, Pixabay, Pexels, Openverse & Giphy / 1.0.8
Image Hub – Free Images from Unsplash, Pixabay, Pexels, Openverse & Giphy v1.0.8
1.2.0 trunk 1.0.11 1.0.8 1.0.9 1.1.0
image-hub / image-hub.php

image-hub.php in Image Hub – Free Images from Unsplash, Pixabay, Pexels, Openverse & Giphy 1.0.8, at image-hub.php

57 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Image Hub
4 * Plugin URI: https://wpimagehub.com
5 * Description: Use free images provided by Pexels, Unsplash, Pixabay, Openverse, and Giphy directly from Gutenberg editor.
6 * Version: 1.0.8
7 * Author: ExtendThemes
8 * Author URI: https://extendthemes.com
9 * Text Domain: image-hub
10 * Domain Path: /lang
11 * License: GPL-3.0+
12 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13 * Requires PHP: 7.4
14 * Requires at least: 6.5
15 */
16
17 if (! defined('ABSPATH')) {
18 exit; // Exit if accessed directly
19 }
20
21
22 define('IMAGE_HUB_ENTRY_FILE', __FILE__ );
23 define('IMAGE_HUB_ROOT_DIR', plugin_dir_path( __FILE__ ) );
24 define('IMAGE_HUB_ROOT_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
25 define("IMAGE_HUB_SERVICE_URL", "https://api.wpimagehub.com");
26 define("IMAGE_HUB_VERSION", "1.0.8");
27 define("IMAGE_HUB_PLUGIN_NAME", "Image Hub");
28
29 require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
30
31 use ImageHub\Admin;
32 use ImageHub\MediaModal;
33 use ImageHub\Settings;
34
35
36
37 function image_hub_init() {
38
39 global $image_hub;
40 if (! isset($image_hub) && is_admin()) {
41
42
43
44 $settings_instance = new Settings();
45 $admin_instance = new Admin($settings_instance->settings);
46 $media_instance = new MediaModal($settings_instance->settings);
47 $image_hub = array(
48 'settings' => $settings_instance,
49 'admin' => $admin_instance,
50 'media' => $media_instance,
51 );
52 }
53 return $image_hub;
54 }
55
56 image_hub_init();
57