From 03542d373a016a9388f56a0616975ed39f755f00 Mon Sep 17 00:00:00 2001 From: Heckyel Date: Wed, 8 Feb 2017 09:41:14 -0500 Subject: smart shortcode --- librevideojs-html5-player.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'librevideojs-html5-player.php') diff --git a/librevideojs-html5-player.php b/librevideojs-html5-player.php index c012125..0232548 100644 --- a/librevideojs-html5-player.php +++ b/librevideojs-html5-player.php @@ -83,16 +83,15 @@ if (!class_exists('LIBREVIDEOJS_HTML5_PLAYER')) { } function librevideojs_html5_player_enqueue_scripts() { - global $post; + global $post, $plugin_url; + $plugin_url = plugins_url('', __FILE__); if (is_home() || is_single() && strpos($post->post_content, '[librevideojs_video') !== false){ - $plugin_url = plugins_url('', __FILE__); wp_enqueue_style('lvjs-mix-master', $plugin_url . '/librevideojs/css/mix-material/master.css', array(), '1.4'); wp_enqueue_style('lvjs-material', $plugin_url . '/librevideojs/css/librevideojs-material/master.css', array(), '1.4'); wp_enqueue_style('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.css', array(), '1.4'); wp_enqueue_script('lvjs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', array(), L_VERSION); wp_enqueue_script('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.js', array(), L_VERSION); } else if (is_page() && strpos($post->post_content, '[librevideojs_video') !== false){ - $plugin_url = plugins_url('', __FILE__); wp_enqueue_style('lvjs-mix-master', $plugin_url . '/librevideojs/css/mix-material/master.css', array(), '1.4'); wp_enqueue_style('lvjs-material', $plugin_url . '/librevideojs/css/librevideojs-material/master.css', array(), '1.4'); wp_enqueue_style('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.css', array(), '1.4'); -- cgit v1.2.3