This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
videojs.plugin('playlist', function (options) { | |
var id = this.el().id; | |
var tracks = document.querySelectorAll("#" + id + "-vjs-playlist .vjs-track"), | |
trackCount = tracks.length, | |
player = this, | |
currentTrack = tracks[0], | |
index = 0, | |
play = true, | |
onTrackSelected = options.onTrackSelected; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($type == 'youtube'){ | |
$playlist_id = $_POST['convert']; | |
if($old !== 'Data'){ | |
$url = "https://gdata.youtube.com/feeds/api/playlists/".$playlist_id."?v=2&alt=json&max-results=50"; | |
$data = json_decode(file_get_contents($url),true); | |
$info = $data["feed"]; | |
$video = $info["entry"]; | |
for($i=0;$i<count($video);$i++){ | |
if($video[$i]['link'][0]['href'] != ""){ | |
$text_title = str_replace("'", '', $video[$i]['title']['$t']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress Export Administration API | |
* | |
* @package WordPress | |
* @subpackage Administration | |
*/ | |
/** | |
* Version number for the export format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Backup the database of a given WordPress site. | |
using http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/ | |
*/ | |
$site_url = 'http://yoursite.com'; //The URL of the online wordpress site | |
$username = 'admin'; // Admin username | |
$password = 'not_my_password'; // Admin password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_meta_boxes() { | |
wp_enqueue_style( 'mytabs-css', get_bloginfo( 'stylesheet_directory' ). '/tab/metabox-tabs.css'); | |
wp_enqueue_script( 'mytabs', get_bloginfo( 'stylesheet_directory' ). '/tab/mytabs.js', array( 'jquery-ui-tabs' ) ); | |
add_meta_box( | |
'repeatable-fields', | |
'Playlist', | |
'repeatable_meta_box_display', | |
'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('.repeatable-add').click(function() { | |
field = jQuery(this).closest('td').find('.custom_repeatable li:last').clone(true); | |
fieldLocation = jQuery(this).closest('td').find('.custom_repeatable li:last'); | |
jQuery('input', field).val('').attr('name', function(index, name) { | |
return name.replace(/(\d+)/, function(fullMatch, n) { | |
return Number(n) + 1; | |
}); | |
}) | |
field.insertAfter(fieldLocation, jQuery(this).closest('td')) | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_meta_boxes() { | |
wp_enqueue_style( 'mytabs-css', get_bloginfo( 'stylesheet_directory' ). '/tab/metabox-tabs.css'); | |
wp_enqueue_script( 'mytabs', get_bloginfo( 'stylesheet_directory' ). '/tab/mytabs.js', array( 'jquery-ui-tabs' ) ); | |
add_meta_box( | |
'repeatable-fields', | |
'Playlist', | |
'repeatable_meta_box_display', | |
'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
$('.metabox_submit').click(function(e) { | |
e.preventDefault(); | |
$('#publish').click(); | |
}); | |
$('#add-row').on('click', function() { | |
var row = $('.empty-row.screen-reader-text').clone(true); | |
row.removeClass('empty-row screen-reader-text'); | |
row.insertBefore('#repeatable-fieldset-one tbody>tr:last'); | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_meta_boxes() { | |
wp_enqueue_style( 'mytabs-css', get_bloginfo( 'stylesheet_directory' ). '/tab/metabox-tabs.css'); | |
wp_enqueue_script( 'mytabs', get_bloginfo( 'stylesheet_directory' ). '/tab/mytabs.js', array( 'jquery-ui-tabs' ) ); | |
add_meta_box( | |
'repeatable-fields', | |
'Playlist', | |
'repeatable_meta_box_display', | |
'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_init', 'add_meta_boxes', 1); | |
function add_meta_boxes() { | |
add_meta_box( 'repeatable-fields', 'Audio Playlist', 'repeatable_meta_box_display', 'post', 'normal', 'high'); | |
} | |
function repeatable_meta_box_display() { | |
global $post; |
NewerOlder