aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeckyel <heckyel@openmailbox.org>2017-01-30 16:28:46 -0500
committerHeckyel <heckyel@openmailbox.org>2017-01-30 16:28:46 -0500
commite3b9b1b4a0fd9f5e2dd25bd8c16677a7af96c8c2 (patch)
treecace831584629d1bfbacaaf7bca4601d110b5818
parent2bdf007567e7bf2285ca09023314ad0823b6e116 (diff)
downloadlibrevideojs-html5-player-e3b9b1b4a0fd9f5e2dd25bd8c16677a7af96c8c2.tar.lz
librevideojs-html5-player-e3b9b1b4a0fd9f5e2dd25bd8c16677a7af96c8c2.tar.xz
librevideojs-html5-player-e3b9b1b4a0fd9f5e2dd25bd8c16677a7af96c8c2.zip
efficiency
-rw-r--r--librevideojs-html5-player.php5
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;
}
}