video-playlist-for-youtube
Last commit date
includes
1 year ago
index.php
1 year ago
readme.txt
1 year ago
video-playlist-ytb-plugin.php
1 year ago
vpfy-api-playlist-shortcode.php
1 year ago
vpfy-settings-pg.php
1 year ago
vpfy-vplaylist-functions.php
1 year ago
vpfy-vplaylist-functions.php
41 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | /*Register css and Js for Admin/back end*/ |
| 6 | add_action('admin_enqueue_scripts','vpfy_vplay_admin_enque'); |
| 7 | function vpfy_vplay_admin_enque(){ |
| 8 | wp_register_script('vpfyt-vplay-repeatmeta', VID_PLYLST_PLUGINURL.'includes/js/vpfy-vplay-metabox.js', array('jquery'), time(), false ); |
| 9 | wp_register_script('vpfyt-vplay-settngpg', VID_PLYLST_PLUGINURL.'includes/js/vpfy-settings-page.js', array('jquery'), time(), false ); |
| 10 | |
| 11 | wp_register_style('vpfy-vplay-adminstyle', VID_PLYLST_PLUGINURL.'includes/css/vpfy-vplaylist-admin-style.css', array(), time(), 'all' ); |
| 12 | wp_register_style('vpfy-vplay-settings', VID_PLYLST_PLUGINURL.'includes/css/vpfy-settings-page.css', array(), time(), 'all' ); |
| 13 | } |
| 14 | |
| 15 | /*Register CSS and JS for front end*/ |
| 16 | add_action('wp_enqueue_scripts','vpfy_vplaylist_frontend_display_gallery'); |
| 17 | function vpfy_vplaylist_frontend_display_gallery(){ |
| 18 | if (!empty(get_option('vpfy_vid_length')) && get_option('vpfy_vid_length') == 1){ |
| 19 | $showlen = 'yes'; |
| 20 | } |
| 21 | else{ |
| 22 | $showlen = 'no'; |
| 23 | } |
| 24 | |
| 25 | wp_register_script('vpfy-playlist-min', VID_PLYLST_PLUGINURL.'includes/js/vpfy-vplay-playlist-min.js', array('jquery'), time(), false); |
| 26 | wp_register_script('vpfy-playlist-video', VID_PLYLST_PLUGINURL.'includes/js/vpfy-vplay-playlist-video.js', array('jquery'), time(), false ); |
| 27 | wp_register_script('vpfy-unitegallery-video', VID_PLYLST_PLUGINURL.'includes/js/vpfy-unitegallery.min.js', array('jquery'), time(), true ); |
| 28 | |
| 29 | wp_localize_script( 'vpfy-playlist-video', 'yt_ajx_obj', |
| 30 | array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'vpfyshow_length' => $showlen ) ); |
| 31 | |
| 32 | wp_register_style('vpfy-vplay-galcss', VID_PLYLST_PLUGINURL.'includes/css/vpfu-vplaylist-gallery.css', array(), time(), 'all' ); |
| 33 | wp_register_style('vpfy-playlist-ryt-no-thumb', VID_PLYLST_PLUGINURL.'includes/css/vpfy-vplaylist-skin-right-no-thumb.css', array(), time(), 'all' ); |
| 34 | wp_register_style('vpfy-playlist-ryt-thumb', VID_PLYLST_PLUGINURL.'includes/css/vpfy-vplaylist-skin-right-thumb.css', array(), time(), 'all' ); |
| 35 | wp_register_style('vpfy-playlist-ryt-ttl-only', VID_PLYLST_PLUGINURL.'includes/css/vpfy-vplaylist-skin-right-title-only.css', array(), time(), 'all' ); |
| 36 | |
| 37 | } |
| 38 | |
| 39 | |
| 40 | |
| 41 |