diff options
-rw-r--r-- | librevideojs-html5-player.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/librevideojs-html5-player.php b/librevideojs-html5-player.php index 3541b31..94ccaf1 100644 --- a/librevideojs-html5-player.php +++ b/librevideojs-html5-player.php @@ -84,7 +84,8 @@ if (!class_exists('LIBREVIDEOJS_HTML5_PLAYER')) { } function librevideojs_html5_player_enqueue_scripts() { - if (!is_admin()) { + global $post; + if (strpos($post->post_content, '[librevideojs_video') && !is_home()){ $plugin_url = plugins_url('', __FILE__); wp_register_script('librevideojs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', array(), LIBREVIDEOJS_HTML5_PLAYER_VERSION); wp_enqueue_script('librevideojs'); @@ -98,6 +99,8 @@ function librevideojs_html5_player_enqueue_scripts() { wp_enqueue_script('librevideojs-selector'); wp_register_style('librevideojs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.css', array(), $ver = '1.4'); wp_enqueue_style('librevideojs-selector'); + } else{ + return false; } } |