PluginProbe
Presto Player / 1.8.0
Presto Player v1.8.0
4.5.0 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.4 4.2.3 4.2.2 4.2.0 4.2.1 trunk 1.10.0 1.10.1 1.10.2 1.11.0 1.12.0 1.13.0 1.14.0 1.14.1 1.5.10 1.5.11 1.5.12 1.5.13 All 126 releases
presto-player / presto-player.php

presto-player.php in Presto Player 1.8.0, at presto-player.php

62 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Presto Player
5 * Plugin URI: http://prestoplayer.com
6 * Description: A beautiful, fast media player for WordPress.
7 * Version: 1.8.0
8 * Author: Presto Made, Inc
9 * Text Domain: presto-player
10 * Tags: private, video, lms, hls
11 * Domain Path: languages
12 */
13
14 use PrestoPlayer\Factory;
15 use PrestoPlayer\Controller;
16 use PrestoPlayer\Requirements;
17 use PrestoPlayer\Dice\Dice as Container;
18
19 // Don't do anything if called directly.
20 if (!\defined('ABSPATH') || !\defined('WPINC')) {
21 exit;
22 }
23
24 if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) {
25 require_once dirname(__FILE__) . '/vendor/autoload.php';
26 }
27
28 /**
29 * The code that runs during plugin activation
30 */
31 register_activation_hook(__FILE__, function () {
32 PrestoPlayer\Activator::activate();
33 });
34
35 register_uninstall_hook(__FILE__, 'presto_player_uninstall');
36
37 function presto_player_uninstall()
38 {
39 PrestoPlayer\Deactivator::uninstall();
40 }
41
42 // plugin constants
43 define('PRESTO_PLAYER_PLUGIN_FILE', __FILE__);
44 define('PRESTO_PLAYER_PLUGIN_URL', plugin_dir_url(__FILE__));
45 define('PRESTO_PLAYER_PLUGIN_DIR', plugin_dir_path(__FILE__));
46
47 if (!function_exists('presto_player_plugin')) {
48 function presto_player_plugin()
49 {
50 // Check plugin requirements.
51 $requirements = new Requirements();
52 if ($requirements->check()) {
53 $container = new Container();
54 $factory = new Factory($container);
55 $container = $container->addRules($factory->getRules());
56 $plugin = $container->create(Controller::class);
57 $plugin->run();
58 }
59 }
60 presto_player_plugin();
61 }
62