@copyright Copyright 2010 Silvia Pfeiffer
@license http://www.gnu.org/licenses/gpl.txt GPL 2.0
@version 0.1
@link http://www.gingertech.net/
*/
global $features_3_0;
$features_3_0 = false;
if (version_compare($wp_version,"3.0",">=")) {
$features_3_0 = true;
}
require_once(ABSPATH . 'wp-admin/includes/taxonomy.php');
require_once(WP_PLUGIN_DIR . '/external-videos/ev-helpers.php');
require_once(WP_PLUGIN_DIR . '/external-videos/ev-video_sites.php');
require_once(WP_PLUGIN_DIR . '/external-videos/ev-widget.php');
require_once(WP_PLUGIN_DIR . '/external-videos/ev-shortcode.php');
require_once(WP_PLUGIN_DIR . '/external-videos/simple_html_dom.php');
require_once(WP_PLUGIN_DIR . '/external-videos/vimeo_library.php');
if ($features_3_0) {
require_once(WP_PLUGIN_DIR . '/external-videos/ev-media-gallery.php');
}
/// *** Pulling Videos From Diverse Sites *** ///
function save_video($video) {
// See if video exists
$the_query = new WP_Query(array(
'post_type' => 'external-videos',
'meta_key' => 'video_id',
'meta_value' => $video['video_id']
));
while($the_query->have_posts()) {
$query_video = $the_query->next_post();
if (get_post_meta($query_video->ID, 'host_id', true)) {
return false;
}
}
// put content together
$video_content .= "
".$video['videourl'];
$video_content .= "\n
".$video['description']."
"; if ($video['category'] != '') { $video_content .= "Category: ".$video['category'];
$video_content .= "
";
}
$video_content .= "Uploaded by: ".$video['authorname']."";
$video_content .= "
";
$video_content .= "Hosted: ".$video['host_id']."";
$video_content .= "
Next automatic update scheduled for:
Be careful with this option - you will lose all links you have built between blog posts and the video pages. This is really only meant as a reset option.