Version Description
- Maintenance: Using new website for video download link
- Maintenance: README updated with new compatibility details and modified FAQs
- Bug: Fixed a bug where some option screen text was not displaying
- Bug: Fixed the feature pointer, which was no longer working
- Enhancement: Added profile options to allow you to switch on video download link, as well as style the output
Download this release
Release Info
Developer | dartiss |
Plugin | YouTube Embed |
Version | 2.7 |
Comparing to | |
See all releases |
Code changes from version 2.5.1 to 2.7
- css/aye-admin UNCOMPRESSED.css +0 -17
- css/aye-admin-3.1.css +47 -0
- css/aye-admin-3.1.min.css +1 -0
- css/aye-admin.css +50 -1
- css/aye-admin.min.css +1 -0
- css/{aye-dynamic UNCOMPRESSED.css → aye-main.css} +0 -0
- css/{aye-dynamic.css → aye-main.min.css} +0 -0
- css/aye-tinymce-button UNCOMPRESSED.css +0 -6
- css/aye-tinymce-button-3.1 UNCOMPRESSED.css +0 -3
- css/aye-tinymce-button-3.1.css +0 -1
- css/aye-tinymce-button.css +0 -1
- images/Facebook.png +0 -0
- images/Google+.png +0 -0
- images/RSS.png +0 -0
- images/Thumbs.db +0 -0
- images/Twitter.png +0 -0
- images/themefuse_banner.jpg +0 -0
- includes/artiss-plugin-ads.php +172 -0
- includes/aye-add-mce-button.php +12 -3
- includes/aye-add-scripts.php +28 -9
- includes/aye-add-to-admin-bar.php +54 -43
- includes/aye-admin-config.php +105 -97
- includes/aye-deprecated.php +1 -1
- includes/aye-display-about.php +29 -17
- includes/aye-display-instructions.php +31 -0
- includes/aye-display-readme.php +0 -26
- includes/aye-function-calls.php +7 -7
- includes/aye-generate-download-code.php +6 -3
- includes/aye-generate-embed-code.php +631 -620
- includes/aye-generate-shorturl-code.php +2 -2
- includes/aye-generate-thumbnail-code.php +16 -10
- includes/aye-generate-transcript-code.php +2 -2
- includes/aye-generate-widgets.php +133 -133
- includes/aye-options-general.php +176 -109
- includes/aye-options-lists.php +26 -20
- includes/aye-options-profiles.php +195 -168
- includes/aye-options-widgets.php +37 -43
- includes/aye-set-defaults.php +96 -36
- includes/aye-shared-functions.php +71 -15
- includes/aye-shortcodes.php +7 -7
- js/aye-ga-tracker UNCOMPRESSED.js +0 -3
- js/aye-ga-tracker.js +0 -1
- js/aye-mce-button.js +0 -1
- js/aye-mce-button.min.php +3 -0
- js/{aye-mce-button UNCOMPRESSED.js → aye-mce-button.php} +11 -1
- languages/youtube-embed.mo +0 -0
- languages/youtube-embed.po +530 -359
- readme.txt +160 -24
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
- uninstall.php +18 -3
- youtube-embed.php +19 -14
css/aye-admin UNCOMPRESSED.css
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
.ytbox_grey {
|
2 |
-
background-color: #f1f1f1;
|
3 |
-
padding: 10px;
|
4 |
-
border: 1px solid #ddd;
|
5 |
-
}
|
6 |
-
.yt_heading {
|
7 |
-
font-weight: bold;
|
8 |
-
font-size: 1.1em;
|
9 |
-
}
|
10 |
-
|
11 |
-
#np-notepad ul {
|
12 |
-
list-style: disc;
|
13 |
-
}
|
14 |
-
|
15 |
-
#np-notepad ul, ol {
|
16 |
-
margin-left: 60px;
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/aye-admin-3.1.css
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/* Administration screen styles */
|
3 |
+
|
4 |
+
.ytbox_grey {
|
5 |
+
background-color: #f1f1f1;
|
6 |
+
padding: 10px;
|
7 |
+
border: 1px solid #ddd;
|
8 |
+
}
|
9 |
+
.yt_heading {
|
10 |
+
font-weight: bold;
|
11 |
+
font-size: 1.1em;
|
12 |
+
}
|
13 |
+
|
14 |
+
#np-notepad ul {
|
15 |
+
list-style: disc;
|
16 |
+
}
|
17 |
+
|
18 |
+
#np-notepad ul, ol {
|
19 |
+
margin-left: 60px;
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
/* Video dynamic resizing */
|
24 |
+
|
25 |
+
.ye-container {
|
26 |
+
position: relative;
|
27 |
+
padding-bottom: 56.25%;
|
28 |
+
padding-top: 30px;
|
29 |
+
height: 0;
|
30 |
+
overflow: hidden;
|
31 |
+
}
|
32 |
+
|
33 |
+
.ye-container iframe,
|
34 |
+
.ye-container object,
|
35 |
+
.ye-container embed {
|
36 |
+
position: absolute;
|
37 |
+
top: 0;
|
38 |
+
left: 0;
|
39 |
+
width: 100%;
|
40 |
+
height: 100%;
|
41 |
+
}
|
42 |
+
|
43 |
+
/* TinyMCE button 3.1 */
|
44 |
+
|
45 |
+
.wp_themeSkin span.mce_YouTube {
|
46 |
+
background:url('../images/youtube_button_colour.png') no-repeat 0 0;
|
47 |
+
}
|
css/aye-admin-3.1.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.ytbox_grey{background-color:#f1f1f1;padding:10px;border:1px solid #ddd;}.yt_heading{font-weight:bold;font-size:1.1em;}#np-notepad ul{list-style:disc;}#np-notepad ul,ol{margin-left:60px;}.ye-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden;}.ye-container iframe,.ye-container object,.ye-container embed{position:absolute;top:0;left:0;width:100%;height:100%;}.wp_themeSkin span.mce_YouTube{background:url('../images/youtube_button_colour.png') no-repeat 0 0;}
|
css/aye-admin.css
CHANGED
@@ -1 +1,50 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/* Administration screen styles */
|
3 |
+
|
4 |
+
.ytbox_grey {
|
5 |
+
background-color: #f1f1f1;
|
6 |
+
padding: 10px;
|
7 |
+
border: 1px solid #ddd;
|
8 |
+
}
|
9 |
+
.yt_heading {
|
10 |
+
font-weight: bold;
|
11 |
+
font-size: 1.1em;
|
12 |
+
}
|
13 |
+
|
14 |
+
#np-notepad ul {
|
15 |
+
list-style: disc;
|
16 |
+
}
|
17 |
+
|
18 |
+
#np-notepad ul, ol {
|
19 |
+
margin-left: 60px;
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
/* Video dynamic resizing */
|
24 |
+
|
25 |
+
.ye-container {
|
26 |
+
position: relative;
|
27 |
+
padding-bottom: 56.25%;
|
28 |
+
padding-top: 30px;
|
29 |
+
height: 0;
|
30 |
+
overflow: hidden;
|
31 |
+
}
|
32 |
+
|
33 |
+
.ye-container iframe,
|
34 |
+
.ye-container object,
|
35 |
+
.ye-container embed {
|
36 |
+
position: absolute;
|
37 |
+
top: 0;
|
38 |
+
left: 0;
|
39 |
+
width: 100%;
|
40 |
+
height: 100%;
|
41 |
+
}
|
42 |
+
|
43 |
+
/* TinyMCE button */
|
44 |
+
|
45 |
+
.wp_themeSkin span.mce_YouTube {
|
46 |
+
background:url('../images/youtube_button_b&w.png') no-repeat 0 0;
|
47 |
+
}
|
48 |
+
.wp_themeSkin span.mce_YouTube:hover {
|
49 |
+
background:url('../images/youtube_button_colour.png') no-repeat 0 0;
|
50 |
+
}
|
css/aye-admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.ytbox_grey{background-color:#f1f1f1;padding:10px;border:1px solid #ddd;}.yt_heading{font-weight:bold;font-size:1.1em;}#np-notepad ul{list-style:disc;}#np-notepad ul,ol{margin-left:60px;}.ye-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden;}.ye-container iframe,.ye-container object,.ye-container embed{position:absolute;top:0;left:0;width:100%;height:100%;}.wp_themeSkin span.mce_YouTube{background:url('../images/youtube_button_b&w.png') no-repeat 0 0;}.wp_themeSkin span.mce_YouTube:hover{background:url('../images/youtube_button_colour.png') no-repeat 0 0;}
|
css/{aye-dynamic UNCOMPRESSED.css → aye-main.css}
RENAMED
File without changes
|
css/{aye-dynamic.css → aye-main.min.css}
RENAMED
File without changes
|
css/aye-tinymce-button UNCOMPRESSED.css
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
.wp_themeSkin span.mce_YouTube {
|
2 |
-
background:url('../images/youtube_button_b&w.png') no-repeat 0 0;
|
3 |
-
}
|
4 |
-
.wp_themeSkin span.mce_YouTube:hover {
|
5 |
-
background:url('../images/youtube_button_colour.png') no-repeat 0 0;
|
6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
css/aye-tinymce-button-3.1 UNCOMPRESSED.css
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
.wp_themeSkin span.mce_YouTube {
|
2 |
-
background:url('../images/youtube_button_colour.png') no-repeat 0 0;
|
3 |
-
}
|
|
|
|
|
|
css/aye-tinymce-button-3.1.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.wp_themeSkin span.mce_YouTube{background:url('../images/youtube_button_colour.png') no-repeat 0 0;}
|
|
css/aye-tinymce-button.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.wp_themeSkin span.mce_YouTube{background:url('../images/youtube_button_b&w.png') no-repeat 0 0;}.wp_themeSkin span.mce_YouTube:hover{background:url('../images/youtube_button_colour.png') no-repeat 0 0;}
|
|
images/Facebook.png
DELETED
Binary file
|
images/Google+.png
DELETED
Binary file
|
images/RSS.png
DELETED
Binary file
|
images/Thumbs.db
ADDED
Binary file
|
images/Twitter.png
DELETED
Binary file
|
images/themefuse_banner.jpg
DELETED
Binary file
|
includes/artiss-plugin-ads.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Artiss Plugin Ads (1.3)
|
4 |
+
*
|
5 |
+
* Generate an advert - intended for use within Artiss plugin administration screens/
|
6 |
+
* All output is responsive and is image based.
|
7 |
+
* No data is sent back to an external website (unless links are clicked on).
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Generate Ad Code
|
13 |
+
*
|
14 |
+
* Combine 2 ads and add additional information
|
15 |
+
*
|
16 |
+
* @param string trans Translation name
|
17 |
+
* @param string width Width of output
|
18 |
+
* @uses artiss_fetch_ad_code Get a random advert
|
19 |
+
*/
|
20 |
+
|
21 |
+
function artiss_plugin_ads( $trans, $width = 750 ) {
|
22 |
+
|
23 |
+
$advertisers = 5;
|
24 |
+
|
25 |
+
// Get first advert
|
26 |
+
|
27 |
+
$ad_array = artiss_fetch_ad_code( rand( 1, $advertisers ) );
|
28 |
+
$code1 = $ad_array[ 'code' ];
|
29 |
+
|
30 |
+
// Now choose another advertiser
|
31 |
+
|
32 |
+
$next_ad = $ad_array[ 'ad' ] + 1;
|
33 |
+
if ( $next_ad > $advertisers ) { $next_ad = 1; }
|
34 |
+
|
35 |
+
// Get a second advert
|
36 |
+
|
37 |
+
$ad_array = artiss_fetch_ad_code( $next_ad );
|
38 |
+
$code2 = $ad_array[ 'code' ];
|
39 |
+
|
40 |
+
// Generate the advert code
|
41 |
+
|
42 |
+
$newline = "\n";
|
43 |
+
|
44 |
+
$code = '<p><div style="width: ' . $width . 'px; height: 125px; border: 1px solid #ddd; padding: 10px;">' . $newline;
|
45 |
+
$code .= $code1 . $newline . $code2 . $newline;
|
46 |
+
$code .= '<span style="font-weight: bold">' . __( 'Donate', $trans ) . '</span>' . $newline;
|
47 |
+
$code .= '<br/>' . __( 'If you like this plugin and appreciate the effort being put into it, <a href="http://www.artiss.co.uk/donate">please consider donating</a>.', $trans ) . '<br/>' . $newline;
|
48 |
+
$code .= '<br/><span style="font-weight: bold">' . __( 'Follow Me', $trans ) . '</span>' . $newline;
|
49 |
+
$code .= '<br/>' . __( 'Please stay in touch with the latest news via one of the following social streams...', $trans ) . '<br/>' . $newline;
|
50 |
+
$code .= '<div align="center" style="padding-top: 10px;">' . $newline;
|
51 |
+
$code .= '<a href="http://www.twitter.com/artiss_tech"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/Twitter.png" alt="' . __( 'Follow Artiss.co.uk on Twitter', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on Twitter', $trans ) . '" style="margin-right: 20px;"></a>' . $newline;
|
52 |
+
$code .= '<a href="http://www.facebook.com/artiss.co.uk"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/Facebook.png" alt="' . __( 'Follow Artiss.co.uk on Facebook', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on Facebook', $trans ) . '" style="margin-right: 20px;"></a>' . $newline;
|
53 |
+
$code .= '<a href="https://plus.google.com/108446415028687420620?rel=author"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/Google%2B.png" alt="' . __( 'Follow Artiss.co.uk on Google+', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on Google+', $trans ) . '" style="margin-right: 20px;"></a>' . $newline;
|
54 |
+
$code .= '<a href="http://www.artiss.co.uk/feed"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/RSS.png" alt="' . __( 'Follow Artiss.co.uk on RSS feed', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on RSS feed', $trans ) . '"></a>' . $newline;
|
55 |
+
$code .= '</div></div></p>' . $newline;
|
56 |
+
|
57 |
+
echo $code;
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get a random advert
|
63 |
+
*
|
64 |
+
* Picks a random advert and generated the code for it
|
65 |
+
*
|
66 |
+
* @return array Code and advert numbers
|
67 |
+
*/
|
68 |
+
|
69 |
+
function artiss_fetch_ad_code( $ad_number ) {
|
70 |
+
|
71 |
+
$sub_ad = '';
|
72 |
+
|
73 |
+
// iThemes
|
74 |
+
|
75 |
+
if ( $ad_number == 1 ) {
|
76 |
+
|
77 |
+
$sub_ad = rand( 1, 9 );
|
78 |
+
|
79 |
+
if ( $sub_ad == 1 ) { $ad_code = '<a rel="nofollow" href="http://ithemes.com/member/go.php?r=32106&i=b0"><img src="http://ithemes.com/wp-content/uploads/2008/02/ithemes125ad.gif" border=0 alt="WordPress Themes" width=125 height=125></a>'; }
|
80 |
+
|
81 |
+
if ( $sub_ad == 2 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b1"><img src="http://ithemes.com/wp-content/uploads/2008/11/ithemes-ad1.jpg" border=0 alt="WordPress Themes" width=125 height=125></a>'; }
|
82 |
+
|
83 |
+
if ( $sub_ad == 3 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b2"><img src="http://ithemes.com/wp-content/uploads/2009/02/flexx125x125.jpg" border=0 alt="Flexx WP Blog Theme" width=125 height=125></a>'; }
|
84 |
+
|
85 |
+
if ( $sub_ad == 4 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b5"><img src="http://ithemes.com/graphics/allaccessad1.jpg" border=0 alt="All Access Pass - 30+ WP Themes" width=125 height=125></a>'; }
|
86 |
+
|
87 |
+
if ( $sub_ad == 5 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b15"><img src="http://ithemes.com/graphics/backupbuddy-125.gif" border=0 alt="Backup WordPress Easily" width=125 height=125></a>'; }
|
88 |
+
|
89 |
+
if ( $sub_ad == 6 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b17"><img src="http://ithemes.com/graphics/pluginbuddy_ads/pb-mobile-static.png" border=0 alt="PluginBuddy Mobile" width=125 height=125></a>'; }
|
90 |
+
|
91 |
+
if ( $sub_ad == 7 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b23"><img src="http://ithemes.com/graphics/builder-ads/builderforum125.png" border=0 alt="iThemes Builder" width=125 height=125></a>'; }
|
92 |
+
|
93 |
+
if ( $sub_ad == 8 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b25"><img src="http://ithemes.com/graphics/pluginbuddy_ads/ebuddy-125.png" border=0 alt="EmailBuddy" width=125 height=125></a>'; }
|
94 |
+
|
95 |
+
if ( $sub_ad == 9 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b27"><img src="http://affiliates.ithemes.com/files/2010/11/fxEa.loopbuddy125.png" border=0 alt="LoopBuddy from PluginBuddy.com" width=125 height=125></a>'; }
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
// Tribulant
|
100 |
+
|
101 |
+
if ( $ad_number == 2 ) {
|
102 |
+
|
103 |
+
$sub_ad = rand( 1, 7 );
|
104 |
+
|
105 |
+
if ( $sub_ad == 1 ) { $ad_code = '<a href="http://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin?a_aid=artisscouk&a_bid=67d9e505" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/shopping-cart-small.jpg" alt="wordpress-shopping-cart-plugin" title="wordpress-shopping-cart-plugin" width="125" height="125" /></a>'; }
|
106 |
+
|
107 |
+
if ( $sub_ad == 2 ) { $ad_code = '<a href="http://tribulant.com/plugins/view/1/wordpress-mailing-list-plugin?a_aid=artisscouk&a_bid=48d79f09" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/newsletter-small.jpg" alt="wordpress-newsletters-plugin" title="wordpress-newsletters-plugin" width="125" height="125" /></a>'; }
|
108 |
+
|
109 |
+
if ( $sub_ad == 3 ) { $ad_code = '<a href="http://tribulant.com/products/view/12/wordpress-whois-plugin?a_aid=artisscouk&a_bid=4d629414" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/domain-whois-small.jpg" alt="wordpress-whois-plugin" title="wordpress-whois-plugin" width="125" height="125" /></a>'; }
|
110 |
+
|
111 |
+
if ( $sub_ad == 4 ) { $ad_code = '<a href="http://tribulant.com/products/view/9/wordpress-lightbox-plugin?a_aid=artisscouk&a_bid=9acc8d37" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/lightbox-js-small.jpg" alt="wordpress-lightbox-js-plugin" title="wordpress-lightbox-js-plugin" width="125" height="125" /></a>'; }
|
112 |
+
|
113 |
+
if ( $sub_ad == 5 ) { $ad_code = '<a href="http://tribulant.com/plugins/view/8/wordpress-faqs-plugin?a_aid=artisscouk&a_bid=b9082471" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/questions-small.jpg" alt="wordpress-faqs-plugin" title="wordpress-faqs-plugin" width="125" height="125" /></a>'; }
|
114 |
+
|
115 |
+
if ( $sub_ad == 6 ) { $ad_code = '<a href="http://tribulant.com/plugins/view/7/wordpress-custom-fields-plugin?a_aid=artisscouk&a_bid=38fc0021" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/custom-fields-small.jpg" alt="wordpress-custom-fields-plugin" title="wordpress-custom-fields-plugin" width="125" height="125" /></a>'; }
|
116 |
+
|
117 |
+
if ( $sub_ad == 7 ) { $ad_code = '<a href="http://tribulant.com/plugins/view/2/wordpress-banner-rotator-plugin?a_aid=artisscouk&a_bid=418973f2" target=""><img src="http://tribulant.postaffiliatepro.com/accounts/default1/banners/banner-rotator-small.jpg" alt="wordpress-banners-plugin" title="wordpress-banners-plugin" width="125" height="125" /></a>'; }
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
// WP Download Manager
|
122 |
+
|
123 |
+
if ( $ad_number == 3 ) {
|
124 |
+
|
125 |
+
$sub_ad = rand( 1, 3 );
|
126 |
+
|
127 |
+
$ad_code = '<a href="http://www.wpdownloadmanager.com/?affid=dartiss" target="_top"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/webMkt_banner_125x125_' . $sub_ad . '.jpg" alt="WP Download Manager" title="WP Download Manager" width="125" height="125" /></a>';
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
// Solostream
|
132 |
+
|
133 |
+
if ( $ad_number == 4 ) {
|
134 |
+
|
135 |
+
$sub_ad = rand( 1, 2 );
|
136 |
+
|
137 |
+
if ( $sub_ad == 1 ) { $ad_code = '<a href="http://www.solostream.com/amember/go.php?r=7855&i=b0"><img src="http://www.solostream.com/images/solo-banner-125-1.gif" border=0 alt="Premium WordPress Themes" width=125 height=125 /></a>'; }
|
138 |
+
|
139 |
+
if ( $sub_ad == 2 ) { $ad_code = '<a href="http://www.solostream.com/amember/go.php?r=7855&i=b1"><img src="http://www.solostream.com/images/solo-banner-125-2.gif" border=0 alt="Premium WordPress Themes" width=125 height=125 /></a>'; }
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
// ManageWP
|
144 |
+
|
145 |
+
if ( $ad_number == 5 ) {
|
146 |
+
|
147 |
+
$sub_ad = rand( 1, 2 );
|
148 |
+
|
149 |
+
if ( $sub_ad == 1 ) { $ad_code = '<a href="https://managewp.com/?utm_source=A&utm_medium=Banner&utm_content=mwp_banner_4_125x125&utm_campaign=A&utm_mrl=52"><img src="https://managewp.com/banners/affiliate/mwp_banner_4_125x125.jpg" /></a>'; }
|
150 |
+
|
151 |
+
if ( $sub_ad == 2 ) { $ad_code = '<a href="https://managewp.com/?utm_source=A&utm_medium=Banner&utm_content=mwp_banner_5_125x125&utm_campaign=A&utm_mrl=52"><img src="https://managewp.com/banners/affiliate/mwp_banner_5_125x125.jpg" /></a>'; }
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
// Add NOFOLLOW to the ad
|
156 |
+
|
157 |
+
$ad_code = '<a rel="nofollow"' . substr( $ad_code, 2 );
|
158 |
+
|
159 |
+
// Add STYLE to image
|
160 |
+
|
161 |
+
$pos = strpos( $ad_code, '<img ' );
|
162 |
+
$ad_code = substr( $ad_code, 0, $pos + 5 ) . 'style="float: left; padding-right: 10px;" ' . substr( $ad_code, $pos + 5 );
|
163 |
+
|
164 |
+
// Add the details into an array and return it
|
165 |
+
|
166 |
+
$return[ 'code' ] = $ad_code;
|
167 |
+
$return[ 'ad' ] = $ad_number;
|
168 |
+
$return[ 'sub-ad' ] = $sub_ad;
|
169 |
+
|
170 |
+
return $return;
|
171 |
+
}
|
172 |
+
?>
|
includes/aye-add-mce-button.php
CHANGED
@@ -19,10 +19,19 @@
|
|
19 |
|
20 |
function youtube_embed_button() {
|
21 |
|
22 |
-
|
|
|
|
|
|
|
23 |
$options = aye_set_general_defaults();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
if ( ( get_user_option( 'rich_editing' ) == 'true' ) && ( $options[ 'editor_button' ] != '' ) ) {
|
26 |
add_filter( 'mce_external_plugins', 'add_youtube_embed_mce_plugin' );
|
27 |
add_filter( 'mce_buttons', 'register_youtube_embed_button' );
|
28 |
}
|
@@ -58,7 +67,7 @@ function register_youtube_embed_button( $buttons ) {
|
|
58 |
*/
|
59 |
|
60 |
function add_youtube_embed_mce_plugin( $plugin_array ) {
|
61 |
-
$plugin_array[ 'YouTube' ] = plugins_url() . '/youtube-embed/js/aye-mce-button.
|
62 |
return $plugin_array;
|
63 |
}
|
64 |
?>
|
19 |
|
20 |
function youtube_embed_button() {
|
21 |
|
22 |
+
// Ensure user is in rich editor and button option is switched on
|
23 |
+
|
24 |
+
if ( get_user_option( 'rich_editing' ) == 'true' ) {
|
25 |
+
|
26 |
$options = aye_set_general_defaults();
|
27 |
+
if ( $options[ 'editor_button' ] != '' ) {
|
28 |
+
|
29 |
+
// Ensure shortcode cookie is set
|
30 |
+
|
31 |
+
$editor_sc = aye_set_editor_sc();
|
32 |
+
|
33 |
+
// Add filters
|
34 |
|
|
|
35 |
add_filter( 'mce_external_plugins', 'add_youtube_embed_mce_plugin' );
|
36 |
add_filter( 'mce_buttons', 'register_youtube_embed_button' );
|
37 |
}
|
67 |
*/
|
68 |
|
69 |
function add_youtube_embed_mce_plugin( $plugin_array ) {
|
70 |
+
$plugin_array[ 'YouTube' ] = plugins_url() . '/youtube-embed/js/aye-mce-button.min.php';
|
71 |
return $plugin_array;
|
72 |
}
|
73 |
?>
|
includes/aye-add-scripts.php
CHANGED
@@ -7,6 +7,31 @@
|
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* Add scripts to theme
|
12 |
*
|
@@ -17,11 +42,9 @@
|
|
17 |
|
18 |
function aye_main_scripts() {
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
wp_register_style( 'aye_dynamic', plugins_url( '/youtube-embed/css/aye-dynamic.css' ) );
|
23 |
|
24 |
-
|
25 |
|
26 |
}
|
27 |
|
@@ -37,14 +60,10 @@ add_action( 'wp_enqueue_scripts', 'aye_main_scripts' );
|
|
37 |
|
38 |
function aye_admin_css() {
|
39 |
|
40 |
-
wp_enqueue_style( 'aye_admin', plugins_url() . '/youtube-embed/css/aye-admin.css' );
|
41 |
-
|
42 |
-
wp_enqueue_style( 'aye_dynamic', plugins_url() . '/youtube-embed/css/aye-dynamic.css' );
|
43 |
-
|
44 |
global $wp_version;
|
45 |
if ( ( float ) $wp_version >= 3.2 ) { $version = ''; } else { $version = '-3.1'; }
|
46 |
|
47 |
-
wp_enqueue_style( 'tinymce_button', plugins_url() . '/youtube-embed/css/aye-
|
48 |
|
49 |
}
|
50 |
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
10 |
+
// Switch on shortcodes in widgets, if requested
|
11 |
+
|
12 |
+
if ( !is_admin() ) {
|
13 |
+
$options = get_option( 'youtube_embed_general' );
|
14 |
+
if ( $options[ 'widgets' ] == 1 ) { add_filter( 'widget_text', 'do_shortcode', SHORTCODE_PRIORITY ); }
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Plugin initialisation
|
19 |
+
*
|
20 |
+
* Loads the plugin's translated strings and the plugins' JavaScript
|
21 |
+
*
|
22 |
+
* @since 2.5.5
|
23 |
+
*/
|
24 |
+
|
25 |
+
function aye_plugin_init() {
|
26 |
+
|
27 |
+
$language_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages/';
|
28 |
+
|
29 |
+
load_plugin_textdomain( 'youtube-embed', false, $language_dir );
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
add_action( 'init', 'aye_plugin_init' );
|
34 |
+
|
35 |
/**
|
36 |
* Add scripts to theme
|
37 |
*
|
42 |
|
43 |
function aye_main_scripts() {
|
44 |
|
45 |
+
wp_register_style( 'aye_dynamic', plugins_url( '/youtube-embed/css/aye-main.min.css' ) );
|
|
|
|
|
46 |
|
47 |
+
wp_enqueue_style( 'aye_dynamic' );
|
48 |
|
49 |
}
|
50 |
|
60 |
|
61 |
function aye_admin_css() {
|
62 |
|
|
|
|
|
|
|
|
|
63 |
global $wp_version;
|
64 |
if ( ( float ) $wp_version >= 3.2 ) { $version = ''; } else { $version = '-3.1'; }
|
65 |
|
66 |
+
wp_enqueue_style( 'tinymce_button', plugins_url() . '/youtube-embed/css/aye-admin' . $version . '.min.css' );
|
67 |
|
68 |
}
|
69 |
|
includes/aye-add-to-admin-bar.php
CHANGED
@@ -21,9 +21,9 @@
|
|
21 |
|
22 |
function aye_admin_bar_render_3_1() {
|
23 |
|
24 |
-
|
25 |
|
26 |
-
if ( current_user_can( '
|
27 |
|
28 |
$options = aye_set_general_defaults();
|
29 |
|
@@ -33,8 +33,8 @@ function aye_admin_bar_render_3_1() {
|
|
33 |
$wp_admin_bar -> add_menu( array(
|
34 |
'parent' => 'appearance',
|
35 |
'id' => 'aye-options',
|
36 |
-
'title' => __( 'YouTube Embed' ),
|
37 |
-
'href' => admin_url( 'admin.php?page=
|
38 |
'meta' => false ) );
|
39 |
}
|
40 |
}
|
@@ -55,52 +55,63 @@ add_action( 'wp_before_admin_bar_render', 'aye_admin_bar_render_3_1' );
|
|
55 |
|
56 |
function aye_admin_bar_render_3_3( $meta = TRUE ) {
|
57 |
|
58 |
-
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
if ( $options[ 'admin_bar' ] != '' ) {
|
65 |
-
|
66 |
-
global $wp_admin_bar;
|
67 |
-
|
68 |
-
if ( !is_user_logged_in() ) { return; }
|
69 |
-
if ( !is_super_admin() || !is_admin_bar_showing() ) { return; }
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
'title' => __( 'YouTube Embed' ) ) );
|
74 |
|
75 |
-
|
76 |
-
'parent' => 'aye-menu',
|
77 |
-
'id' => 'aye-options',
|
78 |
-
'title' => __( 'Options' ),
|
79 |
-
'href' => admin_url( 'admin.php?page=aye-general-options' ),
|
80 |
-
'meta' => array( 'target' => '_blank' ) ) );
|
81 |
|
82 |
-
|
83 |
-
'parent' => 'aye-menu',
|
84 |
-
'id' => 'aye-profile',
|
85 |
-
'title' => __( 'Profiles' ),
|
86 |
-
'href' => admin_url( 'admin.php?page=aye-profile-options' ),
|
87 |
-
'meta' => array( 'target' => '_blank' ) ) );
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
'id' => 'aye-lists',
|
92 |
-
'title' => __( 'Lists' ),
|
93 |
-
'href' => admin_url( 'admin.php?page=aye-list-options' ),
|
94 |
-
'meta' => array( 'target' => '_blank' ) ) );
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
105 |
|
106 |
add_action( 'admin_bar_menu', 'aye_admin_bar_render_3_3', 40 );
|
21 |
|
22 |
function aye_admin_bar_render_3_1() {
|
23 |
|
24 |
+
global $wp_version;
|
25 |
|
26 |
+
if ( current_user_can( 'delete_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
|
27 |
|
28 |
$options = aye_set_general_defaults();
|
29 |
|
33 |
$wp_admin_bar -> add_menu( array(
|
34 |
'parent' => 'appearance',
|
35 |
'id' => 'aye-options',
|
36 |
+
'title' => __( 'YouTube Embed', 'youtube-embed' ),
|
37 |
+
'href' => admin_url( 'admin.php?page=aye-profile-options' ),
|
38 |
'meta' => false ) );
|
39 |
}
|
40 |
}
|
55 |
|
56 |
function aye_admin_bar_render_3_3( $meta = TRUE ) {
|
57 |
|
58 |
+
global $wp_version;
|
59 |
|
60 |
+
if ( ( float ) $wp_version >= 3.3 ) {
|
61 |
|
62 |
+
$options = aye_set_general_defaults();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
$profile_access = $options[ 'profile_access' ];
|
65 |
+
$list_access = $options[ 'list_access' ];
|
|
|
66 |
|
67 |
+
if ( $options[ 'admin_bar' ] != '' ) {
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
global $wp_admin_bar;
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
if ( !is_user_logged_in() ) { return; }
|
72 |
+
if ( !is_admin_bar_showing() ) { return; }
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
$wp_admin_bar -> add_menu( array(
|
75 |
+
'id' => 'aye-menu',
|
76 |
+
'title' => __( 'YouTube Embed', 'youtube-embed' ) ) );
|
77 |
+
|
78 |
+
if ( function_exists( 'wp_readme_parser' ) ) {
|
79 |
+
$wp_admin_bar -> add_menu( array(
|
80 |
+
'parent' => 'aye-menu',
|
81 |
+
'id' => 'aye-readme',
|
82 |
+
'title' => __( 'Instructions', 'youtube-embed' ),
|
83 |
+
'href' => admin_url( 'admin.php?page=aye-support-instructions' ),
|
84 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( current_user_can( 'delete_plugins' ) ) {
|
88 |
+
$wp_admin_bar -> add_menu( array(
|
89 |
+
'parent' => 'aye-menu',
|
90 |
+
'id' => 'aye-options',
|
91 |
+
'title' => __( 'Options', 'youtube-embed' ),
|
92 |
+
'href' => admin_url( 'admin.php?page=aye-general-options' ),
|
93 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
94 |
+
}
|
95 |
+
|
96 |
+
if ( current_user_can( $profile_access ) ) {
|
97 |
+
$wp_admin_bar -> add_menu( array(
|
98 |
+
'parent' => 'aye-menu',
|
99 |
+
'id' => 'aye-profile',
|
100 |
+
'title' => __( 'Profiles', 'youtube-embed' ),
|
101 |
+
'href' => admin_url( 'admin.php?page=aye-profile-options' ),
|
102 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( current_user_can( $list_access ) ) {
|
106 |
+
$wp_admin_bar -> add_menu( array(
|
107 |
+
'parent' => 'aye-menu',
|
108 |
+
'id' => 'aye-lists',
|
109 |
+
'title' => __( 'Lists', 'youtube-embed' ),
|
110 |
+
'href' => admin_url( 'admin.php?page=aye-list-options' ),
|
111 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
}
|
116 |
|
117 |
add_action( 'admin_bar_menu', 'aye_admin_bar_render_3_3', 40 );
|
includes/aye-admin-config.php
CHANGED
@@ -26,7 +26,7 @@ function aye_add_settings_link( $links, $file ) {
|
|
26 |
if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); }
|
27 |
|
28 |
if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
|
29 |
-
$settings_link = '<a href="admin.php?page=aye-general-options">' . __( 'Settings' ) . '</a>';
|
30 |
array_unshift( $links, $settings_link );
|
31 |
}
|
32 |
|
@@ -51,9 +51,9 @@ function aye_set_plugin_meta( $links, $file ) {
|
|
51 |
|
52 |
if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
|
53 |
|
54 |
-
$links = array_merge( $links, array( '<a href="admin.php?page=aye-display-about">' . __( 'Support' ) . '</a>' ) );
|
55 |
|
56 |
-
$links = array_merge( $links, array( '<a href="http://www.artiss.co.uk/donate">' . __( 'Donate' ) . '</a>' ) );
|
57 |
}
|
58 |
|
59 |
return $links;
|
@@ -73,59 +73,65 @@ add_filter( 'plugin_row_meta', 'aye_set_plugin_meta', 10, 2 );
|
|
73 |
|
74 |
function aye_menu_initialise() {
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
|
|
|
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
-
|
103 |
|
104 |
-
|
105 |
|
106 |
-
|
107 |
|
108 |
-
|
109 |
|
110 |
-
|
111 |
|
112 |
-
|
113 |
|
114 |
-
|
115 |
|
116 |
-
|
117 |
-
add_submenu_page( 'aye-general-options', __( 'Artiss YouTube Embed README' ), __( 'README' ), 'edit_posts', 'aye-support-readme', 'aye_support_readme' );
|
118 |
-
}
|
119 |
|
120 |
-
|
121 |
|
122 |
-
|
123 |
|
124 |
-
$
|
125 |
|
126 |
-
|
127 |
|
128 |
-
|
129 |
|
130 |
}
|
131 |
|
@@ -143,19 +149,19 @@ add_action( 'admin_menu', 'aye_menu_initialise' );
|
|
143 |
|
144 |
function aye_contextual_help_type() {
|
145 |
|
146 |
-
|
147 |
|
148 |
-
|
149 |
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
|
158 |
-
|
159 |
}
|
160 |
|
161 |
/**
|
@@ -201,15 +207,17 @@ function aye_list_options() {
|
|
201 |
}
|
202 |
|
203 |
/**
|
204 |
-
* Include
|
205 |
*
|
206 |
-
*
|
207 |
*
|
208 |
* @since 2.4
|
209 |
*/
|
210 |
|
211 |
-
function
|
212 |
-
|
|
|
|
|
213 |
}
|
214 |
|
215 |
/**
|
@@ -238,12 +246,12 @@ function aye_support_about() {
|
|
238 |
|
239 |
function aye_add_options_help() {
|
240 |
|
241 |
-
|
242 |
-
|
243 |
|
244 |
-
|
245 |
|
246 |
-
|
247 |
}
|
248 |
|
249 |
/**
|
@@ -258,12 +266,12 @@ function aye_add_options_help() {
|
|
258 |
|
259 |
function aye_options_help() {
|
260 |
|
261 |
-
$help_text = '<p>' . __( 'This screen allows you to select non-specific options for the Artiss YouTube Embed plugin. For the default embedding settings, please select the <a href="admin.php?page=aye-profile-options">Profiles</a> administration option.' ) . '</p>';
|
262 |
-
$help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.' ) . '</p>';
|
263 |
-
$help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
264 |
-
|
265 |
-
|
266 |
-
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . '</h4>';
|
267 |
|
268 |
return $help_text;
|
269 |
}
|
@@ -280,12 +288,12 @@ function aye_options_help() {
|
|
280 |
|
281 |
function aye_add_profiles_help() {
|
282 |
|
283 |
-
|
284 |
-
|
285 |
|
286 |
-
|
287 |
|
288 |
-
|
289 |
}
|
290 |
|
291 |
/**
|
@@ -300,13 +308,13 @@ function aye_add_profiles_help() {
|
|
300 |
|
301 |
function aye_profiles_help() {
|
302 |
|
303 |
-
$help_text = '<p>' . __( 'This screen allows you to set the options for the default and additional profiles. If you don\'t specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required.' ) . '</p>';
|
304 |
-
$help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.' ) . '</p>';
|
305 |
$help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . '</h4>';
|
310 |
|
311 |
return $help_text;
|
312 |
}
|
@@ -323,18 +331,18 @@ function aye_profiles_help() {
|
|
323 |
|
324 |
function aye_add_lists_help() {
|
325 |
|
326 |
-
|
327 |
-
|
328 |
|
329 |
-
|
330 |
|
331 |
-
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
-
*
|
336 |
*
|
337 |
-
* Return help text for
|
338 |
*
|
339 |
* @since 2.5
|
340 |
*
|
@@ -343,12 +351,12 @@ function aye_add_lists_help() {
|
|
343 |
|
344 |
function aye_lists_help() {
|
345 |
|
346 |
-
$help_text = '<p>' . __( 'This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID.' ) . '</p>';
|
347 |
-
$help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.' ) . '</p>';
|
348 |
-
$help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
349 |
-
|
350 |
-
|
351 |
-
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . '</h4>';
|
352 |
|
353 |
return $help_text;
|
354 |
}
|
@@ -365,12 +373,12 @@ function aye_lists_help() {
|
|
365 |
|
366 |
function aye_add_about_help() {
|
367 |
|
368 |
-
|
369 |
-
|
370 |
|
371 |
-
|
372 |
|
373 |
-
|
374 |
}
|
375 |
|
376 |
/**
|
@@ -385,11 +393,11 @@ function aye_add_about_help() {
|
|
385 |
|
386 |
function aye_about_help() {
|
387 |
|
388 |
-
$help_text = '<p>' . __( 'This screen provides useful information about this plugin along with methods of support.' ) . '</p>';
|
389 |
-
$help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
390 |
-
|
391 |
-
|
392 |
-
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . '</h4>';
|
393 |
|
394 |
return $help_text;
|
395 |
}
|
@@ -416,9 +424,9 @@ global $wp_version;
|
|
416 |
|
417 |
if ( get_option( 'youtube_embed_activated' ) && ( ( float ) $wp_version >= 3.3 ) ) {
|
418 |
|
419 |
-
|
420 |
|
421 |
-
|
422 |
}
|
423 |
|
424 |
/**
|
@@ -431,10 +439,10 @@ if ( get_option( 'youtube_embed_activated' ) && ( ( float ) $wp_version >= 3.3 )
|
|
431 |
|
432 |
function aye_admin_enqueue_scripts() {
|
433 |
|
434 |
-
|
435 |
-
|
436 |
|
437 |
-
|
438 |
}
|
439 |
|
440 |
/**
|
@@ -447,17 +455,17 @@ function aye_admin_enqueue_scripts() {
|
|
447 |
|
448 |
function aye_admin_print_footer_scripts() {
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
?>
|
455 |
<script>
|
456 |
jQuery(function () {
|
457 |
var body = jQuery(document.body),
|
458 |
-
menu = jQuery('#
|
459 |
collapse = jQuery('#collapse-menu'),
|
460 |
-
yembed = menu.find("a[href='admin.php?page=
|
461 |
options = {
|
462 |
content: '<?php echo $pointer_content; ?>',
|
463 |
position: {
|
26 |
if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); }
|
27 |
|
28 |
if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
|
29 |
+
$settings_link = '<a href="admin.php?page=aye-general-options">' . __( 'Settings', 'youtube-embed' ) . '</a>';
|
30 |
array_unshift( $links, $settings_link );
|
31 |
}
|
32 |
|
51 |
|
52 |
if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
|
53 |
|
54 |
+
$links = array_merge( $links, array( '<a href="admin.php?page=aye-display-about">' . __( 'Support', 'youtube-embed' ) . '</a>' ) );
|
55 |
|
56 |
+
$links = array_merge( $links, array( '<a href="http://www.artiss.co.uk/donate">' . __( 'Donate', 'youtube-embed' ) . '</a>' ) );
|
57 |
}
|
58 |
|
59 |
return $links;
|
73 |
|
74 |
function aye_menu_initialise() {
|
75 |
|
76 |
+
// Get level access for profile and list screens.
|
77 |
|
78 |
+
$options = aye_set_general_defaults();
|
79 |
+
$profile_access = $options[ 'profile_access' ];
|
80 |
+
$list_access = $options[ 'list_access' ];
|
81 |
|
82 |
+
// Depending on WordPress version and available functions decide which (if any) contextual help system to use
|
83 |
|
84 |
+
$contextual_help = aye_contextual_help_type();
|
85 |
|
86 |
+
// Add main admin option
|
87 |
|
88 |
+
add_menu_page( __( 'About Artiss YouTube Embeds', 'youtube-embed' ), __( 'YouTube', 'youtube-embed' ), 'edit_posts', 'aye-support-about', 'aye_support_about', plugins_url() . '/youtube-embed/images/menu_icon.png' );
|
89 |
|
90 |
+
// Add about sub-menu
|
91 |
|
92 |
+
if ( $contextual_help == 'new' ) { global $aye_about_hook; }
|
93 |
|
94 |
+
$aye_about_hook = add_submenu_page( 'aye-support-about', __( 'About Artiss YouTube Embed', 'youtube-embed' ), __( 'About', 'youtube-embed' ), 'edit_posts', 'aye-support-about', 'aye_support_about' );
|
95 |
|
96 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_about_hook, 'aye_add_about_help' ); }
|
97 |
|
98 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_about_hook, aye_about_help() ); }
|
99 |
|
100 |
+
// Add instructions sub-menu
|
101 |
|
102 |
+
if ( function_exists( 'wp_readme_parser' ) ) {
|
103 |
+
add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Instructions', 'youtube-embed' ), __( 'Instructions', 'youtube-embed' ), 'edit_posts', 'aye-support-instructions', 'aye_support_instructions' );
|
104 |
+
}
|
105 |
+
|
106 |
+
// Add options sub-menu
|
107 |
+
|
108 |
+
if ( $contextual_help == 'new' ) { global $aye_options_hook; }
|
109 |
|
110 |
+
$aye_options_hook = add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Options', 'youtube-embed' ), __( 'Options', 'youtube-embed' ), 'delete_plugins', 'aye-general-options', 'aye_general_options' );
|
111 |
|
112 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_options_hook, 'aye_add_options_help' ); }
|
113 |
|
114 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_options_hook, aye_options_help() ); }
|
115 |
|
116 |
+
// Add profiles sub-menu
|
117 |
|
118 |
+
if ( $contextual_help == 'new' ) { global $aye_profiles_hook; }
|
119 |
|
120 |
+
$aye_profiles_hook = add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Profiles', 'youtube-embed' ), __( 'Profiles', 'youtube-embed' ), $profile_access, 'aye-profile-options', 'aye_profile_options' );
|
121 |
|
122 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_profiles_hook, 'aye_add_profiles_help' ); }
|
123 |
|
124 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_profiles_hook, aye_profiles_help() ); }
|
|
|
|
|
125 |
|
126 |
+
// Add lists sub-menu
|
127 |
|
128 |
+
if ( $contextual_help == 'new' ) { global $aye_lists_hook; }
|
129 |
|
130 |
+
$aye_lists_hook = add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Lists', 'youtube-embed' ), __( 'Lists', 'youtube-embed' ), $list_access, 'aye-list-options', 'aye_list_options' );
|
131 |
|
132 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_lists_hook, 'aye_add_lists_help' ); }
|
133 |
|
134 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_lists_hook, aye_lists_help() ); }
|
135 |
|
136 |
}
|
137 |
|
149 |
|
150 |
function aye_contextual_help_type() {
|
151 |
|
152 |
+
global $wp_version;
|
153 |
|
154 |
+
$type = false;
|
155 |
|
156 |
+
if ( ( float ) $wp_version >= 3.3 ) {
|
157 |
+
$type = 'new';
|
158 |
+
} else {
|
159 |
+
if ( function_exists( 'add_contextual_help' ) ) {
|
160 |
+
$type = 'old';
|
161 |
+
}
|
162 |
+
}
|
163 |
|
164 |
+
return $type;
|
165 |
}
|
166 |
|
167 |
/**
|
207 |
}
|
208 |
|
209 |
/**
|
210 |
+
* Include instructions screen
|
211 |
*
|
212 |
+
* Display the instructions
|
213 |
*
|
214 |
* @since 2.4
|
215 |
*/
|
216 |
|
217 |
+
function aye_support_instructions() {
|
218 |
+
|
219 |
+
include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-display-instructions.php' );
|
220 |
+
|
221 |
}
|
222 |
|
223 |
/**
|
246 |
|
247 |
function aye_add_options_help() {
|
248 |
|
249 |
+
global $aye_options_hook;
|
250 |
+
$screen = get_current_screen();
|
251 |
|
252 |
+
if ( $screen->id != $aye_options_hook ) { return; }
|
253 |
|
254 |
+
$screen -> add_help_tab( array( 'id' => 'aye-options-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_options_help() ) );
|
255 |
}
|
256 |
|
257 |
/**
|
266 |
|
267 |
function aye_options_help() {
|
268 |
|
269 |
+
$help_text = '<p>' . __( 'This screen allows you to select non-specific options for the Artiss YouTube Embed plugin. For the default embedding settings, please select the <a href="admin.php?page=aye-profile-options">Profiles</a> administration option.', 'youtube-embed' ) . '</p>';
|
270 |
+
$help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.', 'youtube-embed' ) . '</p>';
|
271 |
+
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
|
272 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
273 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
274 |
+
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
|
275 |
|
276 |
return $help_text;
|
277 |
}
|
288 |
|
289 |
function aye_add_profiles_help() {
|
290 |
|
291 |
+
global $aye_profiles_hook;
|
292 |
+
$screen = get_current_screen();
|
293 |
|
294 |
+
if ( $screen->id != $aye_profiles_hook ) { return; }
|
295 |
|
296 |
+
$screen -> add_help_tab( array( 'id' => 'aye-profiles-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_profiles_help() ) );
|
297 |
}
|
298 |
|
299 |
/**
|
308 |
|
309 |
function aye_profiles_help() {
|
310 |
|
311 |
+
$help_text = '<p>' . __( 'This screen allows you to set the options for the default and additional profiles. If you don\'t specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required.', 'youtube-embed' ) . '</p>';
|
312 |
+
$help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.', 'youtube-embed' ) . '</p>';
|
313 |
$help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
314 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
315 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
316 |
+
$help_text .= '<p><a href="http://embedplus.com/">' . __( 'EmbedPlus website', 'youtube-embed' ) . '</a></p>';
|
317 |
+
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
|
318 |
|
319 |
return $help_text;
|
320 |
}
|
331 |
|
332 |
function aye_add_lists_help() {
|
333 |
|
334 |
+
global $aye_lists_hook;
|
335 |
+
$screen = get_current_screen();
|
336 |
|
337 |
+
if ( $screen->id != $aye_lists_hook ) { return; }
|
338 |
|
339 |
+
$screen -> add_help_tab( array( 'id' => 'aye-lists-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_lists_help() ) );
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
+
* List Help
|
344 |
*
|
345 |
+
* Return help text for lists screen
|
346 |
*
|
347 |
* @since 2.5
|
348 |
*
|
351 |
|
352 |
function aye_lists_help() {
|
353 |
|
354 |
+
$help_text = '<p>' . __( 'This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID.', 'youtube-embed' ) . '</p>';
|
355 |
+
$help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.', 'youtube-embed' ) . '</p>';
|
356 |
+
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
|
357 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
358 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
359 |
+
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
|
360 |
|
361 |
return $help_text;
|
362 |
}
|
373 |
|
374 |
function aye_add_about_help() {
|
375 |
|
376 |
+
global $aye_about_hook;
|
377 |
+
$screen = get_current_screen();
|
378 |
|
379 |
+
if ( $screen->id != $aye_about_hook ) { return; }
|
380 |
|
381 |
+
$screen -> add_help_tab( array( 'id' => 'aye-about-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_about_help() ) );
|
382 |
}
|
383 |
|
384 |
/**
|
393 |
|
394 |
function aye_about_help() {
|
395 |
|
396 |
+
$help_text = '<p>' . __( 'This screen provides useful information about this plugin along with methods of support.', 'youtube-embed' ) . '</p>';
|
397 |
+
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
|
398 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
399 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
400 |
+
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
|
401 |
|
402 |
return $help_text;
|
403 |
}
|
424 |
|
425 |
if ( get_option( 'youtube_embed_activated' ) && ( ( float ) $wp_version >= 3.3 ) ) {
|
426 |
|
427 |
+
add_action( 'admin_enqueue_scripts', 'aye_admin_enqueue_scripts' );
|
428 |
|
429 |
+
delete_option( 'youtube_embed_activated' );
|
430 |
}
|
431 |
|
432 |
/**
|
439 |
|
440 |
function aye_admin_enqueue_scripts() {
|
441 |
|
442 |
+
wp_enqueue_style( 'wp-pointer' );
|
443 |
+
wp_enqueue_script( 'wp-pointer' );
|
444 |
|
445 |
+
add_action( 'admin_print_footer_scripts', 'aye_admin_print_footer_scripts' );
|
446 |
}
|
447 |
|
448 |
/**
|
455 |
|
456 |
function aye_admin_print_footer_scripts() {
|
457 |
|
458 |
+
$pointer_content = '<h3>' . __( 'Welcome to Artiss YouTube Embed', 'youtube-embed' ) . '</h3>';
|
459 |
+
$pointer_content .= '<p style="font-style:italic;">' . __( 'Thank you for installing this plugin.', 'youtube-embed' ) . '</p>';
|
460 |
+
$pointer_content .= '<p>' . __( 'These new menu options will allow you to configure your videos to just how you want them and provide links for help and support.', 'youtube-embed' ) . '</p>';
|
461 |
+
$pointer_content .= '<p>' . __( 'Even if you do nothing else, please visit the Profiles option to check your default video values.', 'youtube-embed' ) . '</p>';
|
462 |
?>
|
463 |
<script>
|
464 |
jQuery(function () {
|
465 |
var body = jQuery(document.body),
|
466 |
+
menu = jQuery('#toplevel_page_aye-support-about'),
|
467 |
collapse = jQuery('#collapse-menu'),
|
468 |
+
yembed = menu.find("a[href='admin.php?page=aye-profile-options']"),
|
469 |
options = {
|
470 |
content: '<?php echo $pointer_content; ?>',
|
471 |
position: {
|
includes/aye-deprecated.php
CHANGED
@@ -52,7 +52,7 @@ function youtube_playlist_embed( $content, $paras, $style = '' ) {
|
|
52 |
*/
|
53 |
|
54 |
function get_playlist_download( $id = '' ) {
|
55 |
-
echo aye_error( __( 'This function does not support playlists' ) );
|
56 |
return;
|
57 |
}
|
58 |
?>
|
52 |
*/
|
53 |
|
54 |
function get_playlist_download( $id = '' ) {
|
55 |
+
echo aye_error( __( 'This function does not support playlists', 'youtube-embed' ) );
|
56 |
return;
|
57 |
}
|
58 |
?>
|
includes/aye-display-about.php
CHANGED
@@ -11,41 +11,53 @@
|
|
11 |
<div class="wrap" style="width: 1010px;">
|
12 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
13 |
|
14 |
-
<h2><?php _e( 'About Artiss YouTube Embed' ); ?></h2>
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
<
|
|
|
|
|
|
|
|
|
19 |
|
20 |
<?php
|
21 |
|
22 |
-
echo '<h3>' . __( 'Copyrights' ) . '</h3>';
|
|
|
|
|
23 |
|
24 |
-
echo '<p>' . __( '
|
25 |
|
26 |
-
echo '<
|
27 |
|
28 |
-
echo '<
|
29 |
|
30 |
-
echo '<p>' . __( '
|
31 |
|
32 |
-
echo '<p>' . __( '
|
33 |
|
34 |
-
echo '<p>' . __( '
|
35 |
|
36 |
-
echo '<h3>' . __( 'Support Information' ) . '</h3>';
|
37 |
|
38 |
-
echo '<p>' . __( 'Useful support information and links can be found by clicking on the Help tab at the top of each of the Artiss YouTube Embed administration screens.' ) . '</p>';
|
39 |
|
40 |
-
echo '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . '</h4>';
|
41 |
|
42 |
-
echo '<h3>' . __( 'Stay in Touch' ) . '</h3>';
|
43 |
|
44 |
-
echo '<p>' . __( '<a href="http://www.artiss.co.uk/wp-plugins">See the full list</a> of Artiss plugins, including beta releases.' ) . '</p>';
|
45 |
|
46 |
-
echo '<p>' . __( '<a href="http://www.twitter.com/artiss_tech">Follow Artiss.co.uk</a> on Twitter.' ) . '</p>';
|
47 |
|
48 |
-
echo '<p>' . __( '<a href="http://www.artiss.co.uk/feed">Subscribe</a> to the Artiss.co.uk news feed.' ) . '</p>';
|
49 |
|
50 |
?>
|
51 |
</div>
|
11 |
<div class="wrap" style="width: 1010px;">
|
12 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
13 |
|
14 |
+
<h2><?php _e( 'About Artiss YouTube Embed', 'youtube-embed' ); ?></h2>
|
15 |
|
16 |
+
<?php
|
17 |
+
|
18 |
+
// Display ads
|
19 |
+
|
20 |
+
$options = aye_set_general_defaults();
|
21 |
+
if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
22 |
+
?>
|
23 |
|
24 |
+
<div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
|
25 |
+
|
26 |
+
<p><?php echo sprintf( __( 'You are using Artiss YouTube Embed version %s. It was written by David Artiss.', 'youtube-embed' ), youtube_embed_version ); ?></p>
|
27 |
+
|
28 |
+
<a href="http://www.youtube.com/"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/poweredby.png" alt="<?php _e( 'Powered by YouTube', 'youtube-embed' ); ?>" title="<?php _e( 'Powered by YouTube', 'youtube-embed' ); ?>" align="right" /></a>
|
29 |
|
30 |
<?php
|
31 |
|
32 |
+
echo '<h3>' . __( 'Copyrights', 'youtube-embed' ) . '</h3>';
|
33 |
+
|
34 |
+
echo '<p>' . __( 'YouTube, and all associated logos, is the copyright of Google Inc.', 'youtube-embed' ) . '</p>';
|
35 |
|
36 |
+
echo '<p>' . __( 'EmbedPlus is copyright. Read the <a href="http://embedplus.com/terms.aspx" target="_blank">Terms & Conditions of Use</a>.', 'youtube-embed' ) . '</p>';
|
37 |
|
38 |
+
echo '<h3>' . __( 'Acknowledgements', 'youtube-embed' ) . '</h3>';
|
39 |
|
40 |
+
echo '<p>' . __( 'Images have been compressed with <a href="http://www.smushit.com/ysmush.it/">Smush.it</a>.', 'youtube-embed' ) . '</p>';
|
41 |
|
42 |
+
echo '<p>' . __( 'JavaScript has been compressed with <a href="http://javascriptcompressor.com/">JavaScript Compressor</a>.', 'youtube-embed' ) . '</p>';
|
43 |
|
44 |
+
echo '<p>' . __( 'YouTube icons are from <a href="http://www.youtube.com/t/creators_downloads">YouTube</a>. Other icons are by <a href="http://p.yusukekamiyamane.com/">Yusuke Kamiyamane</a>.', 'youtube-embed' ) . '</p>';
|
45 |
|
46 |
+
echo '<p>' . __( 'Video downloads are courtesy of <a href="http://www.videodownloadx.com/">Videodownloadx</a>.', 'youtube-embed' ) . '</p>';
|
47 |
|
48 |
+
echo '<h3>' . __( 'Support Information', 'youtube-embed' ) . '</h3>';
|
49 |
|
50 |
+
echo '<p>' . __( 'Useful support information and links can be found by clicking on the Help tab at the top of each of the Artiss YouTube Embed administration screens.', 'youtube-embed' ) . '</p>';
|
51 |
|
52 |
+
echo '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
|
53 |
|
54 |
+
echo '<h3>' . __( 'Stay in Touch', 'youtube-embed' ) . '</h3>';
|
55 |
|
56 |
+
echo '<p>' . __( '<a href="http://www.artiss.co.uk/wp-plugins">See the full list</a> of Artiss plugins, including beta releases.', 'youtube-embed' ) . '</p>';
|
57 |
|
58 |
+
echo '<p>' . __( '<a href="http://www.twitter.com/artiss_tech">Follow Artiss.co.uk</a> on Twitter.', 'youtube-embed' ) . '</p>';
|
59 |
|
60 |
+
echo '<p>' . __( '<a href="http://www.artiss.co.uk/feed">Subscribe</a> to the Artiss.co.uk news feed.', 'youtube-embed' ) . '</p>';
|
61 |
|
62 |
?>
|
63 |
</div>
|
includes/aye-display-instructions.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instructions Page
|
4 |
+
*
|
5 |
+
* Display the instructions
|
6 |
+
*
|
7 |
+
* @package Artiss-YouTube-Embed
|
8 |
+
* @since 2.4
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<div class="wrap">
|
12 |
+
<div class="icon32" id="icon-edit-pages"></div>
|
13 |
+
|
14 |
+
<h2><?php _e( 'Artiss YouTube Embed Instructions', 'youtube-embed' ); ?></h2>
|
15 |
+
|
16 |
+
<?php
|
17 |
+
$options = aye_set_general_defaults();
|
18 |
+
if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
19 |
+
?>
|
20 |
+
|
21 |
+
<div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
|
22 |
+
|
23 |
+
<?php
|
24 |
+
if ( !function_exists( 'wp_readme_parser' ) ) {
|
25 |
+
echo '<p>You shouldn\'t be able to see this but I guess that odd things can happen!<p>';
|
26 |
+
echo '<p>To display the instructions you must install the <a href="http://wordpress.org/extend/plugins/wp-readme-parser/">README Parser plugin</a>.</p>';
|
27 |
+
} else {
|
28 |
+
echo wp_readme_parser( array( 'exclude' => 'meta,upgrade notice,screenshots,support,changelog,links,installation,licence', 'ignore' => 'For help with this plugin,,for more information and advanced options ' ), 'http://plugins.svn.wordpress.org/youtube-embed/tags/' . youtube_embed_version . '/readme.txt' );
|
29 |
+
}
|
30 |
+
?>
|
31 |
+
</div>
|
includes/aye-display-readme.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* README Page
|
4 |
-
*
|
5 |
-
* Display the README instructions
|
6 |
-
*
|
7 |
-
* @package Artiss-YouTube-Embed
|
8 |
-
* @since 2.4
|
9 |
-
*/
|
10 |
-
?>
|
11 |
-
<div class="wrap" style="width: 1010px;">
|
12 |
-
<div class="icon32" id="icon-edit-pages"></div>
|
13 |
-
|
14 |
-
<?php $plugin = 'Artiss YouTube Embed'; ?>
|
15 |
-
|
16 |
-
<h2><?php _e( $plugin . ' README' ); ?></h2>
|
17 |
-
|
18 |
-
<?php
|
19 |
-
if ( !function_exists( 'wp_readme_parser' ) ) {
|
20 |
-
echo '<p>You shouldn\'t be able to see this but I guess that odd things can happen!<p>';
|
21 |
-
echo '<p>To display the README you must install the <a href="http://wordpress.org/extend/plugins/wp-readme-parser/">README Parser plugin</a>.</p>';
|
22 |
-
} else {
|
23 |
-
echo wp_readme_parser( array( 'exclude' => 'meta,upgrade notice,screenshots,support,changelog,links,installation,licence', 'ignore' => 'For help with this plugin,,for more information and advanced options ' ), 'http://plugins.svn.wordpress.org/youtube-embed/tags/' . youtube_embed_version . '/readme.txt' );
|
24 |
-
}
|
25 |
-
?>
|
26 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/aye-function-calls.php
CHANGED
@@ -53,7 +53,6 @@ function youtube_video_embed( $content, $paras = '', $style = '' ) {
|
|
53 |
$color = aye_get_parameters( $paras, 'color' );
|
54 |
$theme = aye_get_parameters( $paras, 'theme' );
|
55 |
$https = aye_get_parameters( $paras, 'ssl' );
|
56 |
-
$title = aye_get_parameters( $paras, 'title' );
|
57 |
$dynamic = aye_get_parameters( $paras, 'dynamic' );
|
58 |
$search = aye_get_parameters( $paras, 'search' );
|
59 |
$user = aye_get_parameters( $paras, 'user' );
|
@@ -64,7 +63,7 @@ function youtube_video_embed( $content, $paras = '', $style = '' ) {
|
|
64 |
// Set up Autohide parameter
|
65 |
$autohide = aye_set_autohide( $autohide );
|
66 |
|
67 |
-
echo aye_generate_youtube_code( $content, $type, $width, $height, aye_convert( $fullscreen ), aye_convert( $related ), aye_convert( $autoplay ), aye_convert( $loop ), $start, aye_convert( $info ), aye_convert_3( $annotation ), aye_convert( $cc ), $style, aye_convert( $link ), aye_convert( $react ), $stop, aye_convert( $sweetspot ), aye_convert( $disablekb ), $ratio, $autohide,
|
68 |
return;
|
69 |
}
|
70 |
|
@@ -82,9 +81,10 @@ function youtube_video_embed( $content, $paras = '', $style = '' ) {
|
|
82 |
* @param string $paras Parameters
|
83 |
* @param string $style CSS information
|
84 |
* @param string $alt Alt text
|
|
|
85 |
*/
|
86 |
|
87 |
-
function youtube_thumb_embed( $content, $paras = '', $style = '', $alt = '' ) {
|
88 |
|
89 |
$class = aye_get_parameters( $paras, 'class' );
|
90 |
$rel = aye_get_parameters( $paras, 'rel' );
|
@@ -93,7 +93,7 @@ function youtube_thumb_embed( $content, $paras = '', $style = '', $alt = '' ) {
|
|
93 |
$height = aye_get_parameters( $paras, 'height' );
|
94 |
$version = aye_get_parameters( $paras, 'version' );
|
95 |
|
96 |
-
echo aye_generate_thumbnail_code( $content, $style, $class, $rel, $target, $width, $height, $alt, $version );
|
97 |
|
98 |
return;
|
99 |
}
|
@@ -159,7 +159,7 @@ function get_youtube_transcript_xml ( $id ) {
|
|
159 |
if ( strlen( $embed_type ) > 1 ) {
|
160 |
echo aye_error( $embed_type );
|
161 |
} else {
|
162 |
-
echo aye_error( sprintf( __( 'The YouTube ID of %s is invalid.' ), $id ) );
|
163 |
}
|
164 |
return;
|
165 |
}
|
@@ -170,7 +170,7 @@ function get_youtube_transcript_xml ( $id ) {
|
|
170 |
|
171 |
// Check success and return appropriate output
|
172 |
if ( $xml[ 'rc' ] > 0 ) {
|
173 |
-
echo aye_error( sprintf( __( 'Could not fetch the transcript file %s.' ), $id ) );
|
174 |
return;
|
175 |
} else {
|
176 |
return $xml;
|
@@ -220,7 +220,7 @@ function get_youtube_name( $id ) {
|
|
220 |
if ( strlen( $embed_type ) > 1 ) {
|
221 |
echo aye_error( $embed_type );
|
222 |
} else {
|
223 |
-
echo aye_error( sprintf( __ ( 'The YouTube ID of %s is invalid.' ), $id ) );
|
224 |
}
|
225 |
|
226 |
// Return the video title
|
53 |
$color = aye_get_parameters( $paras, 'color' );
|
54 |
$theme = aye_get_parameters( $paras, 'theme' );
|
55 |
$https = aye_get_parameters( $paras, 'ssl' );
|
|
|
56 |
$dynamic = aye_get_parameters( $paras, 'dynamic' );
|
57 |
$search = aye_get_parameters( $paras, 'search' );
|
58 |
$user = aye_get_parameters( $paras, 'user' );
|
63 |
// Set up Autohide parameter
|
64 |
$autohide = aye_set_autohide( $autohide );
|
65 |
|
66 |
+
echo aye_generate_youtube_code( $content, $type, $width, $height, aye_convert( $fullscreen ), aye_convert( $related ), aye_convert( $autoplay ), aye_convert( $loop ), $start, aye_convert( $info ), aye_convert_3( $annotation ), aye_convert( $cc ), $style, aye_convert( $link ), aye_convert( $react ), $stop, aye_convert( $sweetspot ), aye_convert( $disablekb ), $ratio, $autohide, $controls, $profile, $list, aye_convert( $audio ), $template, aye_convert( $hd ), $color, $theme, aye_convert( $https ), aye_convert( $dynamic ), aye_convert( $search ), aye_convert( $user ) );
|
67 |
return;
|
68 |
}
|
69 |
|
81 |
* @param string $paras Parameters
|
82 |
* @param string $style CSS information
|
83 |
* @param string $alt Alt text
|
84 |
+
* @parm string $nolink Whether to add a link or not
|
85 |
*/
|
86 |
|
87 |
+
function youtube_thumb_embed( $content, $paras = '', $style = '', $alt = '', $nolink = '' ) {
|
88 |
|
89 |
$class = aye_get_parameters( $paras, 'class' );
|
90 |
$rel = aye_get_parameters( $paras, 'rel' );
|
93 |
$height = aye_get_parameters( $paras, 'height' );
|
94 |
$version = aye_get_parameters( $paras, 'version' );
|
95 |
|
96 |
+
echo aye_generate_thumbnail_code( $content, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink );
|
97 |
|
98 |
return;
|
99 |
}
|
159 |
if ( strlen( $embed_type ) > 1 ) {
|
160 |
echo aye_error( $embed_type );
|
161 |
} else {
|
162 |
+
echo aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
|
163 |
}
|
164 |
return;
|
165 |
}
|
170 |
|
171 |
// Check success and return appropriate output
|
172 |
if ( $xml[ 'rc' ] > 0 ) {
|
173 |
+
echo aye_error( sprintf( __( 'Could not fetch the transcript file %s.', 'youtube-embed' ), $id ) );
|
174 |
return;
|
175 |
} else {
|
176 |
return $xml;
|
220 |
if ( strlen( $embed_type ) > 1 ) {
|
221 |
echo aye_error( $embed_type );
|
222 |
} else {
|
223 |
+
echo aye_error( sprintf( __ ( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
|
224 |
}
|
225 |
|
226 |
// Return the video title
|
includes/aye-generate-download-code.php
CHANGED
@@ -20,22 +20,25 @@
|
|
20 |
|
21 |
function aye_generate_download_code( $id ) {
|
22 |
|
23 |
-
if ( $id == '' ) { return aye_error( __ ( 'No YouTube ID was found.' ) ); }
|
24 |
|
25 |
// Extract the ID if a full URL has been specified
|
|
|
26 |
$id = aye_extract_id( $id );
|
27 |
|
28 |
// Check what type of video it is and whether it's valid
|
|
|
29 |
$embed_type = aye_validate_id( $id );
|
30 |
if ( $embed_type != 'v' ) {
|
31 |
if ( strlen( $embed_type ) > 1 ) {
|
32 |
return aye_error( $embed_type );
|
33 |
} else {
|
34 |
-
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.' ), $id ) );
|
35 |
}
|
36 |
}
|
37 |
|
38 |
// Create the link
|
39 |
-
|
|
|
40 |
}
|
41 |
?>
|
20 |
|
21 |
function aye_generate_download_code( $id ) {
|
22 |
|
23 |
+
if ( $id == '' ) { return aye_error( __ ( 'No YouTube ID was found.', 'youtube-embed' ) ); }
|
24 |
|
25 |
// Extract the ID if a full URL has been specified
|
26 |
+
|
27 |
$id = aye_extract_id( $id );
|
28 |
|
29 |
// Check what type of video it is and whether it's valid
|
30 |
+
|
31 |
$embed_type = aye_validate_id( $id );
|
32 |
if ( $embed_type != 'v' ) {
|
33 |
if ( strlen( $embed_type ) > 1 ) {
|
34 |
return aye_error( $embed_type );
|
35 |
} else {
|
36 |
+
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
|
37 |
}
|
38 |
}
|
39 |
|
40 |
// Create the link
|
41 |
+
|
42 |
+
return 'http://www.videodownloadx.com/?video=' . $id;
|
43 |
}
|
44 |
?>
|
includes/aye-generate-embed-code.php
CHANGED
@@ -1,622 +1,633 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Generate embed code
|
4 |
-
*
|
5 |
-
* Functions calls to generate the required YouTube code
|
6 |
-
*
|
7 |
-
* @package Artiss-YouTube-Embed
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Generate embed code
|
12 |
-
*
|
13 |
-
* Generate XHTML compatible YouTube embed code
|
14 |
-
*
|
15 |
-
* @since 2.0
|
16 |
-
*
|
17 |
-
* @uses aye_error Display an error
|
18 |
-
* @uses aye_extract_id Get the video ID
|
19 |
-
* @uses aye_validate_list Get the requested listr
|
20 |
-
* @uses aye_validate_id Validate the video ID
|
21 |
-
* @uses aye_validate_profile Get the requested profile
|
22 |
-
* @uses aye_set_general_defaults Get general options
|
23 |
-
* @uses aye_set_profile_defaults Set default profile options
|
24 |
-
*
|
25 |
-
* @param string $id Video ID
|
26 |
-
* @param string $type Embed type
|
27 |
-
* @param string $width Video width
|
28 |
-
* @param string $height Video height
|
29 |
-
* @param string $fullscreen Fullscreen button
|
30 |
-
* @param string $related Show related info.
|
31 |
-
* @param string $autoplay Start video automatically
|
32 |
-
* @param string $loop Loop video to start
|
33 |
-
* @param string $start Start in seconds
|
34 |
-
* @param string $info Show video info.
|
35 |
-
* @param string $annotation Annotations
|
36 |
* @param string $cc Closed captions
|
37 |
-
* @param string $style Stylesheet information
|
38 |
-
* @param string $link Link back to YouTube
|
39 |
-
* @param string $react Show EmbedPlus reactions
|
40 |
-
* @param string $stop Stop in seconds
|
41 |
-
* @param string $sweetspot Show EmbedPlus sweetspots
|
42 |
-
* @param string $disablekb Disable keyboard controls
|
43 |
-
* @param string $ratio Video size ratio
|
44 |
-
* @param string $autohide Autohide controls
|
45 |
-
* @param string $controls Display controls
|
46 |
-
* @param string $profile Which profile to use
|
47 |
-
* @param string $list_style How to use a list, if used
|
48 |
-
* @param string $audio Only show controls, for audio playback
|
49 |
-
* @param string $template Display template
|
50 |
-
* @param string $hd Use HD, if available
|
51 |
-
* @param string $color Progress bar colour
|
52 |
-
* @param string $theme Use dark or light theme
|
53 |
-
* @param string $https Use HTTPS for links
|
54 |
-
* @param string $
|
55 |
-
* @param string $
|
56 |
-
* @param string $
|
57 |
-
* @
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
$
|
184 |
-
|
185 |
-
$
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
if ( $
|
218 |
-
if ( $
|
219 |
-
if ( $
|
220 |
-
if ( $
|
221 |
-
if ( $
|
222 |
-
if ( $
|
223 |
-
if ( $
|
224 |
-
if ( $
|
225 |
-
if ( $
|
226 |
-
if ( $
|
227 |
-
if ( $
|
228 |
-
if ( $
|
229 |
-
if ( $
|
230 |
-
|
231 |
-
$
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
if (
|
239 |
-
|
240 |
-
//
|
241 |
-
|
242 |
-
if (
|
243 |
-
|
244 |
-
|
245 |
-
//
|
246 |
-
|
247 |
-
if ( ( $
|
248 |
-
|
249 |
-
// If
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
if ( $
|
267 |
-
|
268 |
-
//
|
269 |
-
|
270 |
-
if (
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
if ( $
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
$
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
$
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
if ( $
|
343 |
-
if ( $
|
344 |
-
if ( $
|
345 |
-
if ( $
|
346 |
-
if ( $
|
347 |
-
if (
|
348 |
-
if (
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
if ( $
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
if ( $
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
if ( $
|
365 |
-
if ( $
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
if ( $
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
$result .= "\t<param
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
if (
|
447 |
-
$result .=
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
if ( $
|
454 |
-
$result .= $tab .
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
*
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
$
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
}
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Generate embed code
|
4 |
+
*
|
5 |
+
* Functions calls to generate the required YouTube code
|
6 |
+
*
|
7 |
+
* @package Artiss-YouTube-Embed
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Generate embed code
|
12 |
+
*
|
13 |
+
* Generate XHTML compatible YouTube embed code
|
14 |
+
*
|
15 |
+
* @since 2.0
|
16 |
+
*
|
17 |
+
* @uses aye_error Display an error
|
18 |
+
* @uses aye_extract_id Get the video ID
|
19 |
+
* @uses aye_validate_list Get the requested listr
|
20 |
+
* @uses aye_validate_id Validate the video ID
|
21 |
+
* @uses aye_validate_profile Get the requested profile
|
22 |
+
* @uses aye_set_general_defaults Get general options
|
23 |
+
* @uses aye_set_profile_defaults Set default profile options
|
24 |
+
*
|
25 |
+
* @param string $id Video ID
|
26 |
+
* @param string $type Embed type
|
27 |
+
* @param string $width Video width
|
28 |
+
* @param string $height Video height
|
29 |
+
* @param string $fullscreen Fullscreen button
|
30 |
+
* @param string $related Show related info.
|
31 |
+
* @param string $autoplay Start video automatically
|
32 |
+
* @param string $loop Loop video to start
|
33 |
+
* @param string $start Start in seconds
|
34 |
+
* @param string $info Show video info.
|
35 |
+
* @param string $annotation Annotations
|
36 |
* @param string $cc Closed captions
|
37 |
+
* @param string $style Stylesheet information
|
38 |
+
* @param string $link Link back to YouTube
|
39 |
+
* @param string $react Show EmbedPlus reactions
|
40 |
+
* @param string $stop Stop in seconds
|
41 |
+
* @param string $sweetspot Show EmbedPlus sweetspots
|
42 |
+
* @param string $disablekb Disable keyboard controls
|
43 |
+
* @param string $ratio Video size ratio
|
44 |
+
* @param string $autohide Autohide controls
|
45 |
+
* @param string $controls Display controls
|
46 |
+
* @param string $profile Which profile to use
|
47 |
+
* @param string $list_style How to use a list, if used
|
48 |
+
* @param string $audio Only show controls, for audio playback
|
49 |
+
* @param string $template Display template
|
50 |
+
* @param string $hd Use HD, if available
|
51 |
+
* @param string $color Progress bar colour
|
52 |
+
* @param string $theme Use dark or light theme
|
53 |
+
* @param string $https Use HTTPS for links
|
54 |
+
* @param string $dynamic Show dynamic output
|
55 |
+
* @param string $search Perform a search
|
56 |
+
* @param string $user Look up user videos
|
57 |
+
* @return string Code output
|
58 |
+
*/
|
59 |
+
|
60 |
+
function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height = '', $fullscreen = '', $related = '', $autoplay = '', $loop = '', $start = '', $info = '', $annotation = '', $cc = '', $style = '', $link = '', $react = '', $stop = '', $sweetspot = '', $disablekb = '', $ratio = '', $autohide = '', $controls = '', $profile = '', $list_style = '', $audio = '', $template = '', $hd = '', $color = '', $theme = '', $https = '', $dynamic = '', $search = '', $user = '' ) {
|
61 |
+
|
62 |
+
// Ensure an ID is passed
|
63 |
+
|
64 |
+
if ( $id == '' ) { return aye_error( __( 'No video/playlist ID has been supplied', 'youtube-embed' ) ); }
|
65 |
+
|
66 |
+
// Get general options
|
67 |
+
|
68 |
+
$general = aye_set_general_defaults();
|
69 |
+
|
70 |
+
// Find the profile, if one is specified
|
71 |
+
|
72 |
+
$profile = aye_validate_profile( $profile, $general[ 'profile_no' ] );
|
73 |
+
|
74 |
+
// Get default values if no values are supplied
|
75 |
+
|
76 |
+
$options = aye_set_profile_defaults( $profile );
|
77 |
+
|
78 |
+
// If a user look-up or search has been requested, mis-out looking up list details and
|
79 |
+
// simple assign it as an IFRAME video
|
80 |
+
|
81 |
+
if ( ( $user == 0 ) && ( $search == 0 ) ) {
|
82 |
+
|
83 |
+
// Check it's not a list
|
84 |
+
|
85 |
+
$playlist_ids = '';
|
86 |
+
$list = aye_validate_list( $id, $general[ 'list_no' ] );
|
87 |
+
if ( !is_array( $list ) ) {
|
88 |
+
|
89 |
+
// Check if certain parameters are included in the URL
|
90 |
+
|
91 |
+
$width = aye_get_url_para( $id, 'w', $width );
|
92 |
+
$height = aye_get_url_para( $id, 'h', $height );
|
93 |
+
|
94 |
+
// Extract the ID if a full URL has been specified
|
95 |
+
|
96 |
+
$id = aye_extract_id( $id );
|
97 |
+
|
98 |
+
// Is it being previewed? In which case remove any cache
|
99 |
+
|
100 |
+
if ( ( preg_match( '/p=([0-9]*)&preview=true/', $_SERVER['QUERY_STRING'] ) == 1 ) && ( $general[ 'preview' ] == 1 ) ) {
|
101 |
+
delete_transient( 'aye_type_' . $id );
|
102 |
+
delete_transient( 'aye_title_' . $id );
|
103 |
+
}
|
104 |
+
|
105 |
+
// Check what type of video it is and whether it's valid
|
106 |
+
|
107 |
+
$return = aye_validate_id( $id, true );
|
108 |
+
$embed_type = $return[ 'type' ];
|
109 |
+
|
110 |
+
// If the video is invalid, output an appropriate error
|
111 |
+
|
112 |
+
if ( ( $embed_type == '' ) or ( strlen ( $embed_type ) != 1 ) ) {
|
113 |
+
if ( $embed_type == '' ) {
|
114 |
+
$error = sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id );
|
115 |
+
} else {
|
116 |
+
$error = $embed_type;
|
117 |
+
}
|
118 |
+
$result = "\n<!-- YouTube Embed v" . youtube_embed_version . " | http://www.artiss.co.uk/youtube-embed -->\n";
|
119 |
+
$result .= "<!-- " . $error . " -->\n" . aye_decode( $general[ 'error_message' ] ) . "\n<!-- End of YouTube Embed code -->\n";
|
120 |
+
return $result;
|
121 |
+
}
|
122 |
+
|
123 |
+
} else {
|
124 |
+
|
125 |
+
$return = '';
|
126 |
+
$embed_type = 'v';
|
127 |
+
|
128 |
+
// Randomize the video
|
129 |
+
|
130 |
+
if ( $list_style == 'random' ) { shuffle( $list ); }
|
131 |
+
|
132 |
+
// Extract one video randomly
|
133 |
+
|
134 |
+
if ( $list_style == 'single' ) {
|
135 |
+
$id = $list[ array_rand( $list, 1 ) ];
|
136 |
+
|
137 |
+
// Build the playlist
|
138 |
+
|
139 |
+
} else {
|
140 |
+
|
141 |
+
$id = $list [ 0 ];
|
142 |
+
|
143 |
+
// Build the playlist
|
144 |
+
|
145 |
+
if ( count( $list ) > 1 ) {
|
146 |
+
$loop = 1;
|
147 |
+
while ( $loop < count( $list ) ) {
|
148 |
+
if ( $playlist_ids != '' ) { $playlist_ids .= ','; }
|
149 |
+
$list_id = aye_extract_id( $list[ $loop ] );
|
150 |
+
$playlist_ids .= $list_id;
|
151 |
+
$loop ++;
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
// Generate a cache key for the above passed parameters
|
159 |
+
|
160 |
+
$cache_key = 'aye_video_' . md5( $id . $type . $width . $height . $fullscreen . $related . $autoplay . $loop . $start . $info . $annotation . $cc . $style . $link . $react . $stop . $sweetspot . $disablekb . $ratio . $autohide . $controls . $profile . $list_style . $audio . $template . $hd . $color . $theme . $https . $dynamic . $search . $user . serialize( $general ) . serialize( $options ) . serialize( $list ) . serialize( $return ) );
|
161 |
+
|
162 |
+
// Try and get the output from cache. If it exists, return the code
|
163 |
+
|
164 |
+
if ( ( $general[ 'embed_cache' ] != 0 ) && ( !is_feed() ) && ( $list_style != 'random' ) ) {
|
165 |
+
$result = get_transient( $cache_key );
|
166 |
+
if ( $result !== false) { return $result; }
|
167 |
+
}
|
168 |
+
|
169 |
+
$metadata = $general[ 'metadata' ];
|
170 |
+
|
171 |
+
// Work out correct protocol to use - HTTP or HTTPS
|
172 |
+
|
173 |
+
if ( $https == '' ) { $https = $options[ 'https' ]; }
|
174 |
+
if ( $https == 1 ) { $https = 's'; } else { $https = ''; }
|
175 |
+
|
176 |
+
// If this is a feed then display a thumbnail and/or text link to the original video
|
177 |
+
|
178 |
+
if ( is_feed () ) {
|
179 |
+
$result = '';
|
180 |
+
if ( $playlist_ids != '' ) {
|
181 |
+
$result .= '<p>'.__( 'A video list cannot be viewed within this feed - please view the original content', 'youtube-embed' ).".</p>\n";
|
182 |
+
} else {
|
183 |
+
$youtube_url = 'http' . $https . '://www.youtube.com/watch?' . $embed_type . '=' . $id;
|
184 |
+
if ( ( $embed_type == 'v' ) && ( $general[ 'feed' ] != 't' ) ) { $result .= '<p><a href="' . $youtube_url . '"><img src="http://img.youtube.com/vi/' . $id . '/' . $general[ 'thumbnail' ] . ".jpg\"></a></p>\n"; }
|
185 |
+
if ( ( $general ['feed'] != 'v' ) or ( $embed_type != 'v' ) ) { $result .= '<p><a href="' . $youtube_url . '">' . __( 'Click here to view the video on YouTube', 'youtube-embed' ) . "</a>.</p>\n"; }
|
186 |
+
}
|
187 |
+
return $result;
|
188 |
+
}
|
189 |
+
|
190 |
+
// If a dynamic size has been requested, check whether the width should be fixed
|
191 |
+
|
192 |
+
$fixed = 0;
|
193 |
+
if ( $dynamic == '' ) {
|
194 |
+
$dynamic = $options[ 'dynamic' ];
|
195 |
+
$fixed = $options[ 'fixed' ];
|
196 |
+
} else {
|
197 |
+
if ( $width != '' ) { $fixed = 1; }
|
198 |
+
}
|
199 |
+
|
200 |
+
// Only set width and height from defaults if both are missing
|
201 |
+
|
202 |
+
if ( ( $width == '' ) && ( $height == '' ) ) {
|
203 |
+
|
204 |
+
$width = $options[ 'width' ];
|
205 |
+
$height = $options[ 'height' ];
|
206 |
+
}
|
207 |
+
|
208 |
+
// If controls parameter is not numeric then convert to 0 or 1
|
209 |
+
// This is to maintain backwards compatibility after version 2.6
|
210 |
+
|
211 |
+
if ( ( !is_numeric( $controls ) ) && ( $controls != '' ) ) {
|
212 |
+
$controls = aye_convert( $controls );
|
213 |
+
}
|
214 |
+
|
215 |
+
// If values have not been pressed, use the default values
|
216 |
+
|
217 |
+
if ( $fullscreen == '' ) { $fullscreen = $options[ 'fullscreen' ]; }
|
218 |
+
if ( $related == '' ) { $related = $options[ 'related' ]; }
|
219 |
+
if ( $autoplay == '' ) { $autoplay = $options[ 'autoplay' ]; }
|
220 |
+
if ( $loop == '' ) { $loop = $options[ 'loop' ]; }
|
221 |
+
if ( $info == '' ) { $info = $options[ 'info' ]; }
|
222 |
+
if ( $annotation == '' ) { $annotation = $options[ 'annotation' ]; }
|
223 |
+
if ( $cc == '' ) { $cc = $options[ 'cc' ]; }
|
224 |
+
if ( $link == '' ) { $link = $options[ 'link' ]; }
|
225 |
+
if ( $react == '' ) { $react = $options[ 'react' ]; }
|
226 |
+
if ( $sweetspot == '' ) { $sweetspot = $options[ 'sweetspot' ]; }
|
227 |
+
if ( $disablekb == '' ) { $disablekb = $options[ 'disablekb' ]; }
|
228 |
+
if ( $autohide == '' ) { $autohide = $options[ 'autohide' ]; }
|
229 |
+
if ( $controls == '' ) { $controls = $options[ 'controls' ]; }
|
230 |
+
if ( $audio == '' ) { $audio = $options[ 'audio' ]; }
|
231 |
+
if ( $hd == '' ) { $hd = $options[ 'hd' ]; }
|
232 |
+
if ( $style == '' ) { $style = $options[ 'style' ]; }
|
233 |
+
if ( $color == '' ) { $color = $options[ 'color' ]; }
|
234 |
+
if ( $theme == '' ) { $theme = $options[ 'theme' ]; }
|
235 |
+
|
236 |
+
$wmode = $options[ 'wmode' ];
|
237 |
+
|
238 |
+
if ( $theme == '' ) { $theme = $options[ 'theme' ]; }
|
239 |
+
|
240 |
+
// Build the required template
|
241 |
+
|
242 |
+
if ( $template == '' ) { $template = $options[ 'template' ]; } else { $template = aye_decode( $template ); }
|
243 |
+
if ( strpos( $template, '%video%' ) === false ) { $template = '%video%'; }
|
244 |
+
|
245 |
+
// If a multi-play list has been specified and EmbedPlus selected, use fallback embedding method instead
|
246 |
+
|
247 |
+
if ( ( $playlist_ids != '' ) && ( $type == 'm' ) && ( $list_style != 'single' ) ) { $type = $options[ 'fallback' ]; }
|
248 |
+
|
249 |
+
// If looping and no playlist has been generated, add the current ID
|
250 |
+
// This is a workaround for the AS3 player which won't otherwise loop
|
251 |
+
|
252 |
+
if ( ( $loop == 1 ) && ( $embed_type != 'p' ) && ( $playlist_ids == '' ) ) { $playlist_ids = $id; }
|
253 |
+
|
254 |
+
// If no type was specified, depending on whether this is a video or playlist, set the specific default
|
255 |
+
|
256 |
+
if ( $type == '' ) {
|
257 |
+
if ( $embed_type == 'v' ) {
|
258 |
+
$type = $options[ 'type' ];
|
259 |
+
} else {
|
260 |
+
$type = $options[ 'playlist' ];
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
// If a playlist, user or search was specified and this is is Chromeless, switch back to IFRAME to allow
|
265 |
+
|
266 |
+
if ( ( ( $embed_type == 'p' ) or ( $user != 0 ) or ( $search != 0 ) ) && ( $type == 'c' ) ) { $type = 'v'; }
|
267 |
+
|
268 |
+
// Set parameters without default values
|
269 |
+
|
270 |
+
if ( $start == '' ) { $start = '0'; }
|
271 |
+
if ( $stop == '' ) { $stop = '0'; }
|
272 |
+
|
273 |
+
// If height or width is missing, calculate missing parameter using ratio
|
274 |
+
|
275 |
+
if ( ( ( $width == '' ) or ( $height == '' ) ) && ( ( $width != '' ) or ( $height != '' ) ) ) {
|
276 |
+
$ratio_to_use = '';
|
277 |
+
if ( $ratio != '' ) {
|
278 |
+
|
279 |
+
// Extract the ratio from the provided string
|
280 |
+
|
281 |
+
$pos = strpos( $ratio, ':', 0 );
|
282 |
+
if ( $pos !== false ) {
|
283 |
+
$ratio_l = substr( $ratio, 0, $pos );
|
284 |
+
$ratio_r = substr( $ratio, $pos + 1 );
|
285 |
+
if ( ( is_numeric( $ratio_l ) ) && ( is_numeric( $ratio_r ) ) ) { $ratio_to_use = $ratio_l / $ratio_r; }
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
// If no, or invalid, ratio supplied, calculate from the default video dimensions
|
290 |
+
|
291 |
+
if ( $ratio_to_use == '' ) { $ratio_to_use = $options[ 'width' ] / $options[ 'height' ]; }
|
292 |
+
|
293 |
+
// Complete the missing width or height using the ratio
|
294 |
+
|
295 |
+
if ( $width == '' ) { $width = round( $height * $ratio_to_use, 0); }
|
296 |
+
if ( $height == '' ) { $height = round( $width / $ratio_to_use, 0); }
|
297 |
+
}
|
298 |
+
|
299 |
+
// Set Frameborder output
|
300 |
+
|
301 |
+
$frameborder = '';
|
302 |
+
if ( isset( $general[ 'frameborder' ] ) ) { if ( $general[ 'frameborder' ] == 1 ) { $frameborder = 'frameborder="0" '; } }
|
303 |
+
|
304 |
+
// If audio playback option is set, restrict the height to just show the player toolbar
|
305 |
+
|
306 |
+
if ( $audio == '1' ) { $height = 27; }
|
307 |
+
|
308 |
+
// Set up embed types
|
309 |
+
|
310 |
+
$tab = '';
|
311 |
+
$class = 'youtube-player';
|
312 |
+
$paras = '';
|
313 |
+
|
314 |
+
$embedplus = false;
|
315 |
+
$swf = false;
|
316 |
+
$iframe = false;
|
317 |
+
$chromeless = false;
|
318 |
+
|
319 |
+
if ( ( $type == 'm' ) && ( ( $user != 0 ) or ( $search != 0 ) ) ) { $type = $options[ 'fallback' ]; }
|
320 |
+
|
321 |
+
if ( $type != 'v' ) {
|
322 |
+
if ( $type == 'm' ) {
|
323 |
+
$embedplus = true;
|
324 |
+
$tab = "\t";
|
325 |
+
$embedheight = $height + 32;
|
326 |
+
$class = 'cantembedplus';
|
327 |
+
$fallback = $options[ 'fallback' ];
|
328 |
+
} else {
|
329 |
+
if ( $type == "c" ) {
|
330 |
+
$chromeless = true;
|
331 |
+
} else {
|
332 |
+
$swf = true;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
$paras .= '&version=3';
|
336 |
+
} else {
|
337 |
+
$iframe = true;
|
338 |
+
}
|
339 |
+
|
340 |
+
// Generate parameters to add to URL
|
341 |
+
|
342 |
+
if ( $options[ 'modest' ] == 1 ) { $paras .= '&modestbranding=1'; }
|
343 |
+
if ( $fullscreen == 1 ) { $paras .= '&fs=1'; } else { $paras .= '&fs=0'; }
|
344 |
+
if ( $related != 1 ) { $paras .= '&rel=0'; }
|
345 |
+
if ( $autoplay == 1 ) { $paras .= '&autoplay=1'; $paras_ep .= '&autoplay=1'; }
|
346 |
+
if ( $loop == 1 ) { $paras .= '&loop=1'; }
|
347 |
+
if ( $info != 1 ) { $paras .= '&showinfo=0'; }
|
348 |
+
if ( $annotation != 1 ) { $paras .= '&iv_load_policy=3'; }
|
349 |
+
if ( $cc == 1 ) { $paras .= '&cc_load_policy=1'; }
|
350 |
+
if ( $disablekb == 1 ) { $paras .= '&disablekb=1'; }
|
351 |
+
if ( $autohide != 2 ) { $paras .= '&autohide=' . $autohide; }
|
352 |
+
if ( $controls != 1 ) { $paras .= '&controls=' . $controls; }
|
353 |
+
if ( strtolower( $color ) != 'red' ) { $paras .= '&color=' . strtolower( $color ); }
|
354 |
+
if ( strtolower( $theme ) != 'dark' ) { $paras .= '&theme=' . strtolower( $theme ); }
|
355 |
+
|
356 |
+
// If not a playlist, add the playlist parameter
|
357 |
+
|
358 |
+
if ( $playlist_ids != '' ) { $paras .= '&playlist=' . $playlist_ids; }
|
359 |
+
|
360 |
+
// Generate EmbedPlus parameters
|
361 |
+
|
362 |
+
$paras_ep = '&width=' . $width . '&height=' . $height;
|
363 |
+
if ( $react != 1 ) { $paras_ep .= '&react=0'; }
|
364 |
+
if ( $sweetspot != 1 ) { $paras_ep .= '&sweetspot=0'; }
|
365 |
+
if ( $hd == 1 ) { $paras_ep .= '&hd=1'; }
|
366 |
+
|
367 |
+
// Add start & stop parameters
|
368 |
+
|
369 |
+
if ( $start != 0 ) { $paras .= '&start=' . $start; $paras_ep .= '&start=' . $start; }
|
370 |
+
if ( $stop != 0 ) { $paras_ep .= '&stop=' . $stop; $paras .= '&end=' . $stop; }
|
371 |
+
|
372 |
+
// Generate DIVs to wrap around video
|
373 |
+
|
374 |
+
if ( $dynamic == 1) {
|
375 |
+
$result = "<div class=\"ye-container\">\n";
|
376 |
+
if ( $fixed == 1) { $result = '<div style="width: ' . $width . 'px; max-width: 100%">' . "\n" . $result; }
|
377 |
+
}
|
378 |
+
|
379 |
+
// Add EmbedPlus code
|
380 |
+
|
381 |
+
if ( $embedplus ) {
|
382 |
+
$result .= "<object type=\"application/x-shockwave-flash\" width=\"" . $width . "\" height=\"" . $embedheight . "\" data=\"http://getembedplus.com/embedplus.swf\" style=\"" . $style . "\" id=\"" . uniqid( 'ep_', true ) . "\" >\n";
|
383 |
+
$result .= "\t<param value=\"http://getembedplus.com/embedplus.swf\" name=\"movie\" />\n";
|
384 |
+
$result .= "\t<param value=\"high\" name=\"quality\" />\n";
|
385 |
+
$result .= "\t<param value=\"" . $wmode . "\" name=\"wmode\" />\n";
|
386 |
+
$result .= "\t<param value=\"always\" name=\"allowscriptaccess\" />\n";
|
387 |
+
if ( $fullscreen == 1 ) { $result .= "\t<param name=\"allowFullScreen\" value=\"true\" />\n"; }
|
388 |
+
$result .= "\t<param name=\"flashvars\" value=\"ytid=" . $id . $paras_ep . "\" />\n";
|
389 |
+
}
|
390 |
+
|
391 |
+
// Work out, depending on privacy settings, the main address to use
|
392 |
+
|
393 |
+
$privacy = $general[ 'privacy' ];
|
394 |
+
|
395 |
+
if ( $privacy == 2 ) {
|
396 |
+
$do_not_track = aye_do_not_track();
|
397 |
+
if ( $do_not_track ) { $privacy = 1; } else { $privacy = 0; }
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( $privacy == 1 ) { $url_privacy = 'youtube-nocookie.com'; } else { $url_privacy = 'youtube.com'; }
|
401 |
+
|
402 |
+
// Generate the first part of the embed URL along with the ID section
|
403 |
+
|
404 |
+
if ( $chromeless ) {
|
405 |
+
$embed_url = 'http' . $https . '://www.youtube.com/apiplayer';
|
406 |
+
$id_paras = '?video_id=' . $id;
|
407 |
+
} else {
|
408 |
+
$embed_url = 'http' . $https . '://www.' . $url_privacy . '/';
|
409 |
+
if ( $type == 'v' ) {
|
410 |
+
$embed_url .= 'embed';
|
411 |
+
} else {
|
412 |
+
$embed_url .= 'v/';
|
413 |
+
}
|
414 |
+
$id_paras = $id;
|
415 |
+
if ( $type == 'v' ) { $id_paras = '/' . $id_paras; }
|
416 |
+
}
|
417 |
+
|
418 |
+
// If a playlist, user or download build the ID appropriately
|
419 |
+
|
420 |
+
if ( ( $embed_type == 'p' ) or ( $user != 0 ) or ( $search != 0 ) ) {
|
421 |
+
|
422 |
+
$list_type = '';
|
423 |
+
if ( $embed_type == 'p' ) { $list_type = 'playlist'; }
|
424 |
+
if ( $user != 0 ) { $list_type = 'user_uploads'; }
|
425 |
+
if ( $search != 0 ) { $list_type = 'search'; $id = urlencode( $id ); }
|
426 |
+
|
427 |
+
$id_paras = '';
|
428 |
+
if ( $type == 'p' ) { $id_paras .= 'videoseries'; }
|
429 |
+
$id_paras .= '?listType=' . $list_type . '&list=';
|
430 |
+
if ( ( $embed_type == 'p' ) && ( strtolower( substr ( $id, 0, 2 ) ) != 'pl' ) ) { $id_paras .= 'PL'; }
|
431 |
+
$id_paras .= $id;
|
432 |
+
}
|
433 |
+
|
434 |
+
// Combine URL parts together
|
435 |
+
|
436 |
+
$embed_url .= $id_paras;
|
437 |
+
if ( ( !strpos( $embed_url, '?' ) ) && ( substr( $paras, 0, 5 ) == '&' ) ) { $paras = '?' . substr( $paras, 5 ); }
|
438 |
+
$embed_url .= $paras;
|
439 |
+
|
440 |
+
// Add AS3 YouTube embed code
|
441 |
+
|
442 |
+
if ( ( $swf ) or ( $chromeless ) or ( ( $embedplus ) && ( ( $fallback == 'o' ) or ( $fallback == 'p' ) ) ) ) {
|
443 |
+
|
444 |
+
$result .= $tab . "<object class=\"" . $class . "\" type=\"application/x-shockwave-flash\" data=\"" . $embed_url . "\" width=\"" . $width . "\" height=\"" . $height . "\" style=\"" . $style . "\"";
|
445 |
+
|
446 |
+
if ( $metadata != 0 ) { $result .= " rel=\"media:video\" resource=\"http" . $https . "://www.youtube.com/" . $embed_type . "/" . $id ."\" xmlns:media=\"http://search.yahoo.com/searchmonkey/media/\""; }
|
447 |
+
$result .= " >\n";
|
448 |
+
if ( $metadata != 0 ) { $result .= $tab . "\t<a rel=\"media:thumbnail\" href=\"http://img.youtube.com/vi/" . $id . "/default.jpg\" /></a>\n"; }
|
449 |
+
$result .= $tab . "\t<param name=\"movie\" value=\"" . $embed_url . "\" />\n";
|
450 |
+
$result .= $tab . "\t<param name=\"wmode\" value=\"" . $wmode . "\" />\n";
|
451 |
+
if ( $fullscreen == 1 ) { $result .= $tab . "\t<param name=\"allowFullScreen\" value=\"true\" />\n"; }
|
452 |
+
if ( ( $link != 1 ) && ( $link != '' ) ) { $result .= $tab . "\t<param name=\"allowNetworking\" value=\"internal\" />\n"; }
|
453 |
+
if ( ( $metadata != 0 ) && ( $return[ 'title' ] != '' ) ) { $result .= $tab . "\t<span property=\"media:title\" content=\"" . htmlentities( $return[ 'title' ] ) . "\" />\n"; }
|
454 |
+
$result .= $tab . "</object>\n";
|
455 |
+
}
|
456 |
+
|
457 |
+
// Add IFRAME embed code
|
458 |
+
|
459 |
+
if ( ( $iframe ) or ( ( $embedplus ) && ( $fallback == "v" ) ) ) {
|
460 |
+
if ( $embed_type == "p" ) { $playlist_para = "p/"; } else { $playlist_para = ''; }
|
461 |
+
$result .= $tab . '<iframe ' . $frameborder . 'style="border: 0;' . $style . '" class="' . $class . '" width="' . $width . '" height="' . $height . '" src="' . $embed_url . '&wmode=' . $wmode . '"';
|
462 |
+
if ( $fullscreen == 1 ) { $result .= ' allowfullscreen="allowfullscreen"'; }
|
463 |
+
$result .= " ></iframe>\n";
|
464 |
+
}
|
465 |
+
|
466 |
+
// If using EmbedPlus, add the OBJECT closure tag
|
467 |
+
|
468 |
+
if ( $embedplus ) { $result .= "</object>\n<!--[if lte IE 6]> <style type=\"text/css\">.cantembedplus{display:none;}</style><![endif]-->\n"; }
|
469 |
+
|
470 |
+
// Now apply the template to the result
|
471 |
+
|
472 |
+
$end_tag = '';
|
473 |
+
if ( $dynamic == 1 ) {
|
474 |
+
$end_tag .= "</div>\n";
|
475 |
+
if ( $fixed == 1 ) { $end_tag .= "</div>\n"; }
|
476 |
+
}
|
477 |
+
$result = str_replace( '%video%', $result . $end_tag, $template );
|
478 |
+
|
479 |
+
// Add the download link, if requested
|
480 |
+
|
481 |
+
if ( $options[ 'download' ] == 1 ) { $result .= '<br/><div style="' . $options[ 'download_style' ] . '" class="aye_download"><a href="' . aye_generate_download_code( $id ) . "\">" . $options[ 'download_text' ] . "</a></div>\n"; }
|
482 |
+
|
483 |
+
// Now add a commented header and trailer
|
484 |
+
|
485 |
+
$result = "\n<!-- YouTube Embed v" . youtube_embed_version . " | http://www.artiss.co.uk/youtube-embed -->\n" . $result;
|
486 |
+
$result .= "<!-- End of YouTube Embed code -->\n";
|
487 |
+
|
488 |
+
// Cache the output
|
489 |
+
|
490 |
+
if ( $general[ 'embed_cache' ] != 0 ) { set_transient( $cache_key, $result, 3600 * $general[ 'embed_cache' ] ); }
|
491 |
+
|
492 |
+
return $result;
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Validate a supplied profile name
|
497 |
+
*
|
498 |
+
* Returns a profile number for a supplied name
|
499 |
+
*
|
500 |
+
* @since 2.0
|
501 |
+
*
|
502 |
+
* @param string $name The name of the profile to find
|
503 |
+
* @param string $number The number of profiles available
|
504 |
+
* @return string The profile number (defaults to 0)
|
505 |
+
*/
|
506 |
+
|
507 |
+
function aye_validate_profile( $name, $number ) {
|
508 |
+
|
509 |
+
$profile = 0;
|
510 |
+
$name = strtolower( $name );
|
511 |
+
|
512 |
+
if ( ( $name != '' ) && ( $name != 'default' ) ) {
|
513 |
+
|
514 |
+
// Loop around, fetching in profile names
|
515 |
+
|
516 |
+
$loop = 1;
|
517 |
+
while ( ( $loop <= $number ) && ( $profile == 0 ) ) {
|
518 |
+
if ( ( $name == $loop ) or ( $name == 'Profile ' . $loop ) ) {
|
519 |
+
$profile = $loop;
|
520 |
+
} else {
|
521 |
+
$profiles = get_option( 'youtube_embed_profile' . $loop );
|
522 |
+
$profname = strtolower( $profiles[ 'name' ] );
|
523 |
+
if ( $profname == $name ) { $profile = $loop; }
|
524 |
+
}
|
525 |
+
$loop ++;
|
526 |
+
}
|
527 |
+
}
|
528 |
+
return $profile;
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Validate a supplied list name
|
533 |
+
*
|
534 |
+
* Returns a list for a supplied list number or name name - blank if not a valid list
|
535 |
+
*
|
536 |
+
* @since 2.0
|
537 |
+
*
|
538 |
+
* @param string $name The name of the list to find
|
539 |
+
* @param string $number The number of lists available
|
540 |
+
* @return string The list (defaults to blank)
|
541 |
+
*/
|
542 |
+
|
543 |
+
function aye_validate_list( $name, $number ) {
|
544 |
+
|
545 |
+
$list = '';
|
546 |
+
|
547 |
+
// If the parameter contains commas, assume to be a comma seperated list and move into an array
|
548 |
+
|
549 |
+
if ( strpos( $name, ',' ) !== false ) {
|
550 |
+
$list = explode( ',', $name );
|
551 |
+
} else {
|
552 |
+
|
553 |
+
// No comma, so check if this is a named list
|
554 |
+
|
555 |
+
$name = strtolower( $name );
|
556 |
+
|
557 |
+
if ( $name != '' ) {
|
558 |
+
|
559 |
+
// Loop around, fetching in profile names
|
560 |
+
|
561 |
+
$loop = 1;
|
562 |
+
while ( ( $loop <= $number ) && ( $list == '' ) ) {
|
563 |
+
$listfiles = get_option( 'youtube_embed_list' . $loop );
|
564 |
+
if ( ( $name == strval( $loop ) ) or ( $name == 'List ' . $loop ) ) {
|
565 |
+
$list = $listfiles[ 'list' ];
|
566 |
+
} else {
|
567 |
+
$listname = strtolower( $listfiles[ 'name' ] );
|
568 |
+
if ( $listname == $name ) { $list = $listfiles[ 'list' ]; }
|
569 |
+
}
|
570 |
+
$loop ++;
|
571 |
+
}
|
572 |
+
}
|
573 |
+
if ( $list != '' ) { $list = explode( "\n", $list ); }
|
574 |
+
}
|
575 |
+
return $list;
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Get URL parameters
|
580 |
+
*
|
581 |
+
* Extract a requested parameter from a URL
|
582 |
+
*
|
583 |
+
* @since 2.0
|
584 |
+
*
|
585 |
+
* @param string $id The ID of the video
|
586 |
+
* @param string $para The parameter to extract
|
587 |
+
* @param string $current The current parameter value
|
588 |
+
* @return string The parameter value
|
589 |
+
*/
|
590 |
+
|
591 |
+
function aye_get_url_para( $id, $para, $current ) {
|
592 |
+
|
593 |
+
// Look for an ampersand
|
594 |
+
|
595 |
+
$start_pos = false;
|
596 |
+
if ( strpos( $id, '&' . $para . '=' ) !== false ) { $start_pos = strpos( $id, '&' . $para . '=' ) + 6 + strlen( $para ); }
|
597 |
+
|
598 |
+
// If a parameter was found, look for the end of it
|
599 |
+
|
600 |
+
if ( $start_pos !== false ) {
|
601 |
+
$end_pos = strpos( $id, '&', $start_pos + 1 );
|
602 |
+
if ( !$end_pos ) { $end_pos = strlen( $id ); }
|
603 |
+
|
604 |
+
// Extract the parameter and return it
|
605 |
+
|
606 |
+
$current = substr( $id, $start_pos, $end_pos - $start_pos );
|
607 |
+
}
|
608 |
+
|
609 |
+
return $current;
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Decode a string
|
614 |
+
*
|
615 |
+
* Decode an HTML encoded string. I'm not using htmlspecialchars_decode to maintain
|
616 |
+
* PHP 4 compatibility.
|
617 |
+
*
|
618 |
+
* @since 2.0.3
|
619 |
+
*
|
620 |
+
* @param string $encoded The encoded string
|
621 |
+
* @return string The decoded string
|
622 |
+
*/
|
623 |
+
|
624 |
+
function aye_decode( $encoded ) {
|
625 |
+
|
626 |
+
$find = array( '&', '"', ''', '<', '>' );
|
627 |
+
$replace = array( '&', '"', "'", '<', '>' );
|
628 |
+
|
629 |
+
$decoded = str_replace( $find, $replace, $encoded );
|
630 |
+
|
631 |
+
return $decoded;
|
632 |
+
}
|
633 |
?>
|
includes/aye-generate-shorturl-code.php
CHANGED
@@ -19,7 +19,7 @@ function aye_generate_shorturl_code( $id ) {
|
|
19 |
|
20 |
// Check that an ID has been specified
|
21 |
if ( $id == '' ) {
|
22 |
-
return aye_error( __( 'No video ID has been supplied' ) );
|
23 |
} else {
|
24 |
|
25 |
// Extract the ID if a full URL has been specified
|
@@ -31,7 +31,7 @@ function aye_generate_shorturl_code( $id ) {
|
|
31 |
if ( strlen( $embed_type ) > 1 ) {
|
32 |
return aye_error( $embed_type );
|
33 |
} else {
|
34 |
-
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.' ), $id ) );
|
35 |
}
|
36 |
}
|
37 |
|
19 |
|
20 |
// Check that an ID has been specified
|
21 |
if ( $id == '' ) {
|
22 |
+
return aye_error( __( 'No video ID has been supplied', 'youtube-embed' ) );
|
23 |
} else {
|
24 |
|
25 |
// Extract the ID if a full URL has been specified
|
31 |
if ( strlen( $embed_type ) > 1 ) {
|
32 |
return aye_error( $embed_type );
|
33 |
} else {
|
34 |
+
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
|
35 |
}
|
36 |
}
|
37 |
|
includes/aye-generate-thumbnail-code.php
CHANGED
@@ -19,10 +19,12 @@
|
|
19 |
* @param string $width Width
|
20 |
* @param string $height Height
|
21 |
* @param string $alt ALT text
|
|
|
|
|
22 |
* @return string $youtube_code Code
|
23 |
*/
|
24 |
|
25 |
-
function aye_generate_thumbnail_code( $id, $style, $class, $rel, $target, $width, $height, $alt, $version ) {
|
26 |
|
27 |
// Extract the ID if a full URL has been specified
|
28 |
$id = aye_extract_id( $id );
|
@@ -34,7 +36,7 @@ function aye_generate_thumbnail_code( $id, $style, $class, $rel, $target, $width
|
|
34 |
if ( strlen( $embed_type ) > 1 ) {
|
35 |
return aye_error( $embed_type );
|
36 |
} else {
|
37 |
-
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.' ), $id ) );
|
38 |
}
|
39 |
}
|
40 |
|
@@ -46,16 +48,20 @@ function aye_generate_thumbnail_code( $id, $style, $class, $rel, $target, $width
|
|
46 |
if ( $version == 'end' ) { $version = 3; }
|
47 |
|
48 |
// Now create the required code
|
49 |
-
if ( $alt == '' ) { $alt = 'YouTube Video '
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
56 |
if ( $width != '' ) { $youtube_code .= ' width="' . $width . 'px"'; }
|
57 |
if ( $height != '' ) { $youtube_code .= ' height="' . $height . 'px"'; }
|
58 |
-
$youtube_code .= ' alt="' . $alt . '"
|
|
|
59 |
|
60 |
return $youtube_code;
|
61 |
}
|
19 |
* @param string $width Width
|
20 |
* @param string $height Height
|
21 |
* @param string $alt ALT text
|
22 |
+
* @param string $version Thumbnail version
|
23 |
+
* @param string $nolink True or False, whether no link should be added
|
24 |
* @return string $youtube_code Code
|
25 |
*/
|
26 |
|
27 |
+
function aye_generate_thumbnail_code( $id, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink = false ) {
|
28 |
|
29 |
// Extract the ID if a full URL has been specified
|
30 |
$id = aye_extract_id( $id );
|
36 |
if ( strlen( $embed_type ) > 1 ) {
|
37 |
return aye_error( $embed_type );
|
38 |
} else {
|
39 |
+
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
|
40 |
}
|
41 |
}
|
42 |
|
48 |
if ( $version == 'end' ) { $version = 3; }
|
49 |
|
50 |
// Now create the required code
|
51 |
+
if ( $alt == '' ) { $alt = sprintf( __( 'YouTube Video %s' ), $id ); }
|
52 |
+
if ( !$nolink ) {
|
53 |
+
$youtube_code = '<a href="http://www.youtube.com/watch?v=' . $id . '"';
|
54 |
+
if ( $style != '' ) { $youtube_code .= ' style="' . $style . '"'; }
|
55 |
+
if ( $class != '' ) { $youtube_code .= ' class="' . $class . '"'; }
|
56 |
+
if ( $rel != '' ) { $youtube_code .= ' rel="' . $rel . '"'; }
|
57 |
+
if ( $target != '' ) { $youtube_code .= ' target="' . $target . '"'; }
|
58 |
+
$youtube_code .= '>';
|
59 |
+
}
|
60 |
+
$youtube_code .= '<img src="http://img.youtube.com/vi/' . $id . '/' . $version . '.jpg"';
|
61 |
if ( $width != '' ) { $youtube_code .= ' width="' . $width . 'px"'; }
|
62 |
if ( $height != '' ) { $youtube_code .= ' height="' . $height . 'px"'; }
|
63 |
+
$youtube_code .= ' alt="' . $alt . '"/>';
|
64 |
+
if ( !$nolink ) { $youtube_code .= '</a>'; }
|
65 |
|
66 |
return $youtube_code;
|
67 |
}
|
includes/aye-generate-transcript-code.php
CHANGED
@@ -35,7 +35,7 @@ function aye_generate_transcript( $id ) {
|
|
35 |
if ( strlen( $embed_type ) > 1 ) {
|
36 |
return aye_error( $embed_type );
|
37 |
} else {
|
38 |
-
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.' ), $id ) );
|
39 |
}
|
40 |
}
|
41 |
|
@@ -56,7 +56,7 @@ function aye_generate_transcript( $id ) {
|
|
56 |
|
57 |
// If transcript file exists, strip and output
|
58 |
if ( $return[ 'rc' ] == 0 ) {
|
59 |
-
$output = "<!-- YouTube Embed v" . youtube_embed_version . " | http://www.artiss.co.uk/
|
60 |
$pos = 0;
|
61 |
$eof = false;
|
62 |
|
35 |
if ( strlen( $embed_type ) > 1 ) {
|
36 |
return aye_error( $embed_type );
|
37 |
} else {
|
38 |
+
return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
|
39 |
}
|
40 |
}
|
41 |
|
56 |
|
57 |
// If transcript file exists, strip and output
|
58 |
if ( $return[ 'rc' ] == 0 ) {
|
59 |
+
$output = "<!-- YouTube Embed v" . youtube_embed_version . " | http://www.artiss.co.uk/youtube-embed -->\n";
|
60 |
$pos = 0;
|
61 |
$eof = false;
|
62 |
|
includes/aye-generate-widgets.php
CHANGED
@@ -9,138 +9,138 @@
|
|
9 |
|
10 |
class YouTubeEmbedWidget extends WP_Widget {
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
}
|
145 |
|
146 |
/**
|
@@ -152,7 +152,7 @@ class YouTubeEmbedWidget extends WP_Widget {
|
|
152 |
*/
|
153 |
|
154 |
function youtube_embed_register_widgets() {
|
155 |
-
|
156 |
}
|
157 |
add_action( 'widgets_init', 'youtube_embed_register_widgets' );
|
158 |
?>
|
9 |
|
10 |
class YouTubeEmbedWidget extends WP_Widget {
|
11 |
|
12 |
+
/**
|
13 |
+
* Widget Constructor
|
14 |
+
*
|
15 |
+
* Call WP_Widget class to define widget
|
16 |
+
*
|
17 |
+
* @since 2.0
|
18 |
+
*
|
19 |
+
* @uses WP_Widget Standard WP_Widget class
|
20 |
+
*/
|
21 |
+
|
22 |
+
function YouTubeEmbedWidget() {
|
23 |
+
parent::WP_Widget( 'youtube_embed_widget',
|
24 |
+
__( 'YouTube Embed', 'youtube-embed' ),
|
25 |
+
array( 'description' => __( 'Embed YouTube Widget.', 'youtube-embed' ), 'class' => 'my-widget-class' )
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Display widget
|
31 |
+
*
|
32 |
+
* Display the YouTube widget
|
33 |
+
*
|
34 |
+
* @since 2.0
|
35 |
+
*
|
36 |
+
* @uses generate_youtube_code Generate the required YouTube code
|
37 |
+
*
|
38 |
+
* @param string $args Arguments
|
39 |
+
* @param string $instance Instance
|
40 |
+
*/
|
41 |
+
|
42 |
+
function widget( $args, $instance ) {
|
43 |
+
extract( $args, EXTR_SKIP );
|
44 |
+
|
45 |
+
// Output the header
|
46 |
+
echo $before_widget;
|
47 |
+
|
48 |
+
// Extract title for heading
|
49 |
+
$title = $instance[ 'titles' ];
|
50 |
+
|
51 |
+
// Output title, if one exists
|
52 |
+
if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
|
53 |
+
|
54 |
+
// Set the correct
|
55 |
+
if ( $instance[ 'id_type' ] == 's' ) { $search = 1; } else { $search = ''; }
|
56 |
+
if ( $instance[ 'id_type' ] == 'u' ) { $user = 1; } else { $user = ''; }
|
57 |
+
|
58 |
+
// Generate the video and output it
|
59 |
+
echo aye_generate_youtube_code ( $instance[ 'id' ],
|
60 |
+
$instance[ 'type' ],
|
61 |
+
$instance[ 'width' ],
|
62 |
+
$instance[ 'height' ],
|
63 |
+
'',
|
64 |
+
'',
|
65 |
+
$instance[ 'autoplay' ],
|
66 |
+
$instance[ 'loop' ],
|
67 |
+
$instance[ 'start' ],
|
68 |
+
'',
|
69 |
+
'',
|
70 |
+
'',
|
71 |
+
$instance[ 'style' ],
|
72 |
+
'',
|
73 |
+
'',
|
74 |
+
$instance[ 'stop' ],
|
75 |
+
'',
|
76 |
+
'',
|
77 |
+
'',
|
78 |
+
'',
|
79 |
+
'',
|
80 |
+
$instance[ 'profile' ],
|
81 |
+
$instance[ 'list' ],
|
82 |
+
'',
|
83 |
+
$instance[ 'template' ],
|
84 |
+
'',
|
85 |
+
'',
|
86 |
+
'',
|
87 |
+
'',
|
88 |
+
$instance[ 'dynamic' ],
|
89 |
+
$search,
|
90 |
+
$user );
|
91 |
+
|
92 |
+
// Output the trailer
|
93 |
+
echo $after_widget;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Widget update/save function
|
98 |
+
*
|
99 |
+
* Update and save widget
|
100 |
+
*
|
101 |
+
* @since 2.0
|
102 |
+
*
|
103 |
+
* @param string $new_instance New instance
|
104 |
+
* @param string $old_instance Old instance
|
105 |
+
* @return string Instance
|
106 |
+
*/
|
107 |
+
|
108 |
+
function update( $new_instance, $old_instance ) {
|
109 |
+
|
110 |
+
$instance = $old_instance;
|
111 |
+
$instance[ 'titles' ] = strip_tags( $new_instance[ 'titles' ] );
|
112 |
+
$instance[ 'id' ] = $new_instance[ 'id' ];
|
113 |
+
$instance[ 'profile' ] = $new_instance[ 'profile' ];
|
114 |
+
$instance[ 'type' ] = $new_instance[ 'type' ];
|
115 |
+
$instance[ 'template' ] = $new_instance[ 'template' ];
|
116 |
+
$instance[ 'style' ] = $new_instance[ 'style' ];
|
117 |
+
$instance[ 'start' ] = $new_instance[ 'start' ];
|
118 |
+
$instance[ 'autoplay' ] = $new_instance[ 'autoplay' ];
|
119 |
+
$instance[ 'width' ] = $new_instance[ 'width' ];
|
120 |
+
$instance[ 'height' ] = $new_instance[ 'height' ];
|
121 |
+
$instance[ 'dynamic' ] = $new_instance[ 'dynamic' ];
|
122 |
+
$instance[ 'list' ] = $new_instance[ 'list' ];
|
123 |
+
$instance[ 'loop' ] = $new_instance[ 'loop' ];
|
124 |
+
$instance[ 'stop' ] = $new_instance[ 'stop' ];
|
125 |
+
$instance[ 'id_type' ] = $new_instance[ 'id_type' ];
|
126 |
+
|
127 |
+
return $instance;
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Widget Admin control form
|
133 |
+
*
|
134 |
+
* Define admin file
|
135 |
+
*
|
136 |
+
* @since 2.0
|
137 |
+
*
|
138 |
+
* @param string $instance Instance
|
139 |
+
*/
|
140 |
+
|
141 |
+
function form( $instance ) {
|
142 |
+
include ( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-options-widgets.php' );
|
143 |
+
}
|
144 |
}
|
145 |
|
146 |
/**
|
152 |
*/
|
153 |
|
154 |
function youtube_embed_register_widgets() {
|
155 |
+
register_widget( 'YouTubeEmbedWidget' );
|
156 |
}
|
157 |
add_action( 'widgets_init', 'youtube_embed_register_widgets' );
|
158 |
?>
|
includes/aye-options-general.php
CHANGED
@@ -11,68 +11,80 @@
|
|
11 |
?>
|
12 |
<div class="wrap" style="width: 1010px;">
|
13 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
14 |
-
<h2><?php _e( 'Artiss YouTube Embed Options' ); ?></h2>
|
15 |
|
16 |
<?php
|
|
|
17 |
// If options have been updated on screen, update the database
|
18 |
|
19 |
if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'youtube_embed_general_nonce' ) ) ) {
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
24 |
|
25 |
// If the number of profiles is less than zero, put it to 0
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
// If the number of lists is less than 1, put it to 1
|
32 |
|
33 |
if ( $options[ 'list_no' ] < 1 ) { $options[ 'list_no' ] = 1; }
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
53 |
|
54 |
// Update the options
|
55 |
|
56 |
update_option( 'youtube_embed_general', $options );
|
57 |
-
|
58 |
|
59 |
// Update the alternative shortcodes
|
60 |
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
|
67 |
update_option( 'youtube_embed_shortcode', $shortcode );
|
68 |
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
76 |
|
77 |
echo '<div class="updated fade"><p><strong>' . $update_message . "</strong></p></div>\n";
|
78 |
}
|
@@ -82,202 +94,257 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
|
|
82 |
$options = aye_set_general_defaults();
|
83 |
$shortcode = aye_set_shortcode_option();
|
84 |
$url = aye_set_url_option();
|
|
|
|
|
|
|
|
|
|
|
85 |
?>
|
86 |
|
87 |
-
<
|
|
|
|
|
88 |
|
89 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-general-options' ?>">
|
90 |
|
91 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
<table class="form-table">
|
94 |
<tr>
|
95 |
-
<th scope="row"><?php _e( 'Add Metadata' ); ?></th>
|
96 |
-
<td><input type="checkbox" name="youtube_embed_metadata" value="1"<?php if ( $options[ 'metadata' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow rich metadata to be added to code. <a href="http://www.artiss.co.uk/
|
97 |
</tr>
|
98 |
|
99 |
<tr>
|
100 |
-
<th scope="row"><?php _e( 'Comment Embedding' ); ?></th>
|
101 |
-
<td><input type="checkbox" name="youtube_embed_comments" value="1"<?php if ( $options[ 'comments' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow YouTube URLs in comments - will display as embedded videos. <a href="http://www.artiss.co.uk/
|
102 |
</tr>
|
103 |
|
104 |
<tr>
|
105 |
-
<th scope="row"> <?php _e( 'Profile to use' ); ?></th>
|
106 |
<td><select name="youtube_embed_comments_profile">
|
107 |
<?php aye_generate_profile_list( $options[ 'comments_profile' ], $options[ 'profile_no' ] ) ?>
|
108 |
</select></td>
|
109 |
</tr>
|
110 |
|
111 |
<tr>
|
112 |
-
<th scope="row"><?php _e( 'Feed' ); ?></th>
|
113 |
<td><select name="youtube_embed_feed">
|
114 |
-
<option value="t"<?php if ( $options[ 'feed' ] == "t" ) { echo " selected='selected'"; } ?>><?php _e ( 'Text link' ); ?></option>
|
115 |
-
<option value="v"<?php if ( $options[ 'feed' ] == "v" ) { echo " selected='selected'"; } ?>><?php _e ( 'Thumbnail' ); ?></option>
|
116 |
-
<option value="b"<?php if ( $options[ 'feed' ] == "b" ) { echo " selected='selected'"; } ?>><?php _e ( 'Thumbnail & Text Link' ); ?></option>
|
117 |
-
</select> <span class="description"><?php _e( 'Videos cannot be embedded in feeds. Select how you wish them to be shown instead' ); ?></span></td>
|
118 |
</tr>
|
119 |
|
120 |
<tr>
|
121 |
-
<th scope="row"> <?php _e( 'Thumbnail to use' ); ?></th>
|
122 |
<td><select name="youtube_embed_thumbnail">
|
123 |
-
<option value="default"<?php if ( $options[ 'thumbnail' ] == "default" ) { echo " selected='selected'"; } ?>><?php _e ( 'Default' ); ?></option>
|
124 |
-
<option value="hqdefault"<?php if ( $options[ 'thumbnail' ] == "hqdefault" ) { echo " selected='selected'"; } ?>><?php _e ( 'Default (HQ)' ); ?></option>
|
125 |
-
<option value="1"<?php if ( $options[ 'thumbnail' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e ( 'Start' ); ?></option>
|
126 |
-
<option value="2"<?php if ( $options[ 'thumbnail' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e ( 'Middle' ); ?></option>
|
127 |
-
<option value="3"<?php if ( $options[ 'thumbnail' ] == "3" ) { echo " selected='selected'"; } ?>><?php _e ( 'End' ); ?></option>
|
128 |
-
</select> <span class="description"><?php _e( 'Which thumbnail to use' ); ?></span></td>
|
|
|
|
|
|
|
|
|
|
|
129 |
</tr>
|
130 |
</table>
|
131 |
|
132 |
-
<br/><span class="yt_heading"><?php _e( 'Alternative Shortcodes' ); ?></span><br/><br
|
133 |
|
134 |
<table class="form-table">
|
135 |
<tr>
|
136 |
-
<th scope="row"><?php _e( 'Alternative Shortcode 1' ); ?></th>
|
137 |
<td><input type="text" size="30" name="youtube_embed_shortcode" value="<?php echo $shortcode[ 1 ]; ?>"/></td>
|
138 |
</tr>
|
139 |
|
140 |
<tr>
|
141 |
-
<th scope="row"> <?php _e( 'Profile to use' ); ?></th>
|
142 |
<td><select name="youtube_embed_alt_profile">
|
143 |
<?php aye_generate_profile_list( $options[ 'alt_profile' ], $options[ 'profile_no' ] ) ?>
|
144 |
</select></td>
|
145 |
</tr>
|
146 |
|
147 |
<tr>
|
148 |
-
<th scope="row"><?php _e( 'Alternative Shortcode 2' ); ?></th>
|
149 |
<td><input type="text" size="30" name="youtube_embed_shortcode2" value="<?php echo $shortcode[ 2 ]; ?>"/></td>
|
150 |
</tr>
|
151 |
|
152 |
<tr>
|
153 |
-
<th scope="row"> <?php _e( 'Profile to use' ); ?></th>
|
154 |
<td><select name="youtube_embed_alt_profile2">
|
155 |
<?php aye_generate_profile_list( $options[ 'alt_profile2' ], $options[ 'profile_no' ] ) ?>
|
156 |
</select></td>
|
157 |
</tr>
|
158 |
</table>
|
159 |
|
160 |
-
<br/><span class="yt_heading"><?php _e( 'Migration' ); ?></span><br/><br
|
161 |
|
162 |
<table class="form-table">
|
163 |
<tr>
|
164 |
-
<th scope="row"><?php _e( 'Bracket Embedding' ); ?></th>
|
165 |
-
<td><input type="checkbox" name="youtube_embed_bracket" value="1"<?php if ( $options[ 'bracket' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow embedding using URLs within brackets. Activating impacts performance' ); ?></span></td>
|
166 |
</tr>
|
167 |
|
168 |
<tr>
|
169 |
-
<th scope="row"><?php _e( 'Alternative Embedding' ); ?></th>
|
170 |
-
<td><input type="checkbox" name="youtube_embed_alt" value="1"<?php if ( $options[ 'alt' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow all other types of embedding. Activating impacts performance' ); ?></span></td>
|
171 |
</tr>
|
172 |
|
173 |
<tr>
|
174 |
-
<th scope="row"> <?php _e( 'Profile to use' ); ?></th>
|
175 |
<td><select name="youtube_embed_other_profile">
|
176 |
<?php aye_generate_profile_list( $options[ 'other_profile' ], $options[ 'profile_no' ] ) ?>
|
177 |
-
</select> <span class="description"><?php _e( 'For above 2 options' ); ?></span></td>
|
178 |
</tr>
|
179 |
</table>
|
180 |
|
181 |
-
<br/><span class="yt_heading"><?php _e( 'Admin Options' ); ?></span>
|
182 |
|
183 |
<table class="form-table">
|
184 |
<tr>
|
185 |
-
<th scope="row"><?php _e( 'Show
|
186 |
-
<td><input type="checkbox" name="youtube_embed_editor_button" value="1"<?php if ( $options[ 'editor_button' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show the YouTube button on the post editor' ); ?></span></td>
|
187 |
</tr>
|
188 |
|
189 |
<tr>
|
190 |
-
<th scope="row"><?php _e( '
|
191 |
-
<td><input type="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
</tr>
|
193 |
</table>
|
194 |
|
195 |
-
<br/><span class="yt_heading"><?php _e( 'Profile & List Sizes' ); ?></span>
|
196 |
|
197 |
<table class="form-table">
|
198 |
<tr>
|
199 |
-
<th scope="row"><?php _e( 'Number of Profiles' ); ?></th>
|
200 |
-
<td><input type="text" size="2" maxlength="2" name="youtube_embed_profile_no" value="<?php echo $options[ 'profile_no' ]; ?>"/> <span class="description"><?php _e( 'Maximum number of profiles' ); ?></span></td>
|
201 |
</tr>
|
202 |
|
203 |
<tr>
|
204 |
-
<th scope="row"><?php _e( 'Number of Lists' ); ?></th>
|
205 |
-
<td><input type="text" size="2" maxlength="2" name="youtube_embed_list_no" value="<?php echo $options[ 'list_no' ]; ?>"/> <span class="description"><?php _e( 'Maximum number of lists' ); ?></span></td>
|
206 |
</tr>
|
207 |
</table>
|
208 |
|
209 |
-
<br/><span class="yt_heading"><?php _e( 'Performance' ); ?></span>
|
210 |
|
211 |
<table class="form-table">
|
212 |
<tr>
|
213 |
-
<th scope="row"><?php _e( 'Embed Cache' ); ?></th>
|
214 |
-
<td><input type="text" size="3" maxlength="3" name="youtube_embed_embed_cache" value="<?php echo $options[ 'embed_cache' ]; ?>"/> <span class="description"><?php _e( 'How many hours to retain embed output. 0 to switch off' ); ?></span></td>
|
215 |
</tr>
|
216 |
|
217 |
<tr>
|
218 |
-
<th scope="row"><?php _e( 'Video Information Cache' ); ?></th>
|
219 |
-
<td><input type="text" size="3" maxlength="3" name="youtube_embed_info_cache" value="<?php echo $options[ 'info_cache' ]; ?>"/> <span class="description"><?php _e( 'How many hours to retain video information, including it\'s validity. 0 to switch off' ); ?></span></td>
|
220 |
</tr>
|
221 |
|
222 |
<tr>
|
223 |
-
<th scope="row"><?php _e( 'Transcript Cache' ); ?></th>
|
224 |
-
<td><input type="text" size="3" maxlength="3" name="youtube_embed_transcript_cache" value="<?php echo $options[ 'transcript_cache' ]; ?>"/> <span class="description"><?php _e( 'How many hours to store transcripts for in cache. 0 to switch off' ); ?></span></td>
|
225 |
-
</tr>
|
226 |
|
227 |
<?php
|
228 |
global $wpdb;
|
229 |
-
$
|
|
|
|
|
|
|
|
|
230 |
?>
|
231 |
|
232 |
-
<tr>
|
233 |
-
<th scope="row"><?php _e( 'Clear Cache' ); ?></th>
|
234 |
-
<td><input type="checkbox" name="youtube_embed_clear_cache" value="1"> <span class="description"><?php
|
235 |
-
</tr>
|
236 |
-
</table>
|
237 |
|
238 |
-
<br/><span class="yt_heading"><?php _e( 'YouTube API' ); ?></span>
|
239 |
|
240 |
-
<p><?php _e( 'The YouTube API is used to validate video IDs and to determine if it is a video or playlist.' ); ?></p>
|
241 |
|
242 |
<table class="form-table">
|
243 |
<tr>
|
244 |
-
<th scope="row"><?php _e( 'API State' ); ?></th>
|
245 |
<td><select name="youtube_embed_api">
|
246 |
-
<option value="0"<?php if ( $options[ 'api' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e ( 'API should not be used' ); ?></option>
|
247 |
-
<option value="1"<?php if ( $options[ 'api' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTP API used and errors are reported' ); ?></option>
|
248 |
-
<option value="2"<?php if ( $options[ 'api' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTPS API used and errors are reported' ); ?></option>
|
249 |
-
<option value="3"<?php if ( $options[ 'api' ] == "3" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTP API used and no errors are reported' ); ?></option>
|
250 |
-
<option value="4"<?php if ( $options[ 'api' ] == "4" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTPS API used and no errors are reported' ); ?></option>
|
251 |
</select></td>
|
252 |
</tr>
|
253 |
</table>
|
254 |
|
255 |
-
<br/><span class="yt_heading"><?php _e( 'Error Reporting' ); ?></span>
|
256 |
|
257 |
-
<p><?php _e( 'Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output.' ); ?></p>
|
258 |
|
259 |
<table class="form-table"><tr>
|
260 |
-
<th scope="row"><?php _e( 'Video Playback Error Message' ); ?></th>
|
261 |
-
<td><input type="text" size="60" name="youtube_embed_error_message" value="<?php echo $options[ 'error_message' ]; ?>"/> <span class="description"><?php _e( 'This is the message that will be shown on the post' ); ?></span></td>
|
262 |
</tr></table>
|
263 |
|
264 |
-
<br/><span class="yt_heading"><?php _e( 'Security' ); ?></span>
|
265 |
|
266 |
<table class="form-table"><tr>
|
267 |
-
|
268 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
</tr></table>
|
270 |
|
271 |
-
<br/><span class="yt_heading"><?php _e( '
|
272 |
|
273 |
<table class="form-table"><tr>
|
274 |
-
<th scope="row"><?php _e( 'Allow Frame Border on IFRAME' ); ?></th>
|
275 |
-
<td><input type="checkbox" name="youtube_embed_frameborder" value="1"<?php if ( $options[ 'frameborder' ] == '1' ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'FRAMEBORDER is not HTML5 compliant' ); ?></span></td>
|
276 |
</tr></table>
|
277 |
|
278 |
<?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
|
279 |
|
280 |
-
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings' ); ?>"/></p>
|
281 |
|
282 |
</form>
|
283 |
|
11 |
?>
|
12 |
<div class="wrap" style="width: 1010px;">
|
13 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
14 |
+
<h2><?php _e( 'Artiss YouTube Embed Options', 'youtube-embed' ); ?></h2>
|
15 |
|
16 |
<?php
|
17 |
+
|
18 |
// If options have been updated on screen, update the database
|
19 |
|
20 |
if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'youtube_embed_general_nonce' ) ) ) {
|
21 |
|
22 |
+
$options[ 'donated' ] = $_POST[ 'youtube_embed_donated' ];
|
23 |
+
$options[ 'editor_button' ] = $_POST[ 'youtube_embed_editor_button' ];
|
24 |
+
$options[ 'admin_bar' ] = $_POST[ 'youtube_embed_admin_bar' ];
|
25 |
+
$options[ 'profile_no' ] = $_POST[ 'youtube_embed_profile_no' ];
|
26 |
|
27 |
// If the number of profiles is less than zero, put it to 0
|
28 |
|
29 |
+
if ( $options[ 'profile_no' ] < 0 ) { $options[ 'profile_no' ] = 0; }
|
30 |
|
31 |
+
$options[ 'list_no' ] = $_POST[ 'youtube_embed_list_no' ];
|
32 |
|
33 |
// If the number of lists is less than 1, put it to 1
|
34 |
|
35 |
if ( $options[ 'list_no' ] < 1 ) { $options[ 'list_no' ] = 1; }
|
36 |
|
37 |
+
$options[ 'embed_cache' ] = $_POST[ 'youtube_embed_embed_cache' ];
|
38 |
+
$options[ 'info_cache' ] = $_POST[ 'youtube_embed_info_cache' ];
|
39 |
+
$options[ 'transcript_cache' ] = $_POST[ 'youtube_embed_transcript_cache' ];
|
40 |
+
$options[ 'fetch_title' ] = $_POST[ 'youtube_embed_fetch_title' ];
|
41 |
+
$options[ 'alt_profile' ] = $_POST[ 'youtube_embed_alt_profile' ];
|
42 |
+
$options[ 'alt_profile2' ] = $_POST[ 'youtube_embed_alt_profile2' ];
|
43 |
+
$options[ 'bracket' ] = $_POST[ 'youtube_embed_bracket' ];
|
44 |
+
$options[ 'alt' ] = $_POST[ 'youtube_embed_alt' ];
|
45 |
+
$options[ 'other_profile' ] = $_POST[ 'youtube_embed_other_profile' ];
|
46 |
+
$options[ 'comments' ] = $_POST[ 'youtube_embed_comments' ];
|
47 |
+
$options[ 'comments_profile' ] = $_POST[ 'youtube_embed_comments_profile' ];
|
48 |
+
$options[ 'metadata' ] = $_POST[ 'youtube_embed_metadata' ];
|
49 |
+
$options[ 'feed' ] = $_POST[ 'youtube_embed_feed' ];
|
50 |
+
$options[ 'api' ] = $_POST[ 'youtube_embed_api' ];
|
51 |
+
$options[ 'error_message' ] = str_replace( '\"', '"', $_POST[ 'youtube_embed_error_message' ] );
|
52 |
+
$options[ 'thumbnail' ] = $_POST[ 'youtube_embed_thumbnail' ];
|
53 |
+
$options[ 'privacy' ] = $_POST[ 'youtube_embed_privacy' ];
|
54 |
+
$options[ 'frameborder' ] = $_POST[ 'youtube_embed_frameborder' ];
|
55 |
+
$options[ 'widgets' ] = $_POST[ 'youtube_embed_widgets' ];
|
56 |
+
$options[ 'profile_access' ] = $_POST[ 'youtube_embed_profile_access' ];
|
57 |
+
$options[ 'list_access' ] = $_POST[ 'youtube_embed_list_access' ];
|
58 |
|
59 |
// Update the options
|
60 |
|
61 |
update_option( 'youtube_embed_general', $options );
|
62 |
+
$update_message = __( 'Settings Saved.', 'youtube-embed' );
|
63 |
|
64 |
// Update the alternative shortcodes
|
65 |
|
66 |
+
$shortcode[ 1 ] = $_POST[ 'youtube_embed_shortcode' ];
|
67 |
+
$shortcode[ 1 ] = trim( $shortcode[ 1 ], '[]' );
|
68 |
|
69 |
+
$shortcode[ 2 ] = $_POST[ 'youtube_embed_shortcode2' ];
|
70 |
+
$shortcode[ 2 ] = trim( $shortcode[ 2 ], '[]' );
|
71 |
|
72 |
update_option( 'youtube_embed_shortcode', $shortcode );
|
73 |
|
74 |
+
// Update the editor button shortcode, including the cookie
|
75 |
+
|
76 |
+
update_option( 'youtube_embed_editor_sc', $_POST[ 'youtube_embed_editor_sc' ] );
|
77 |
+
|
78 |
+
$expiry = 2147483647; // January 2038 (maximum value to avoid the integer overflow of the 2038 bug)
|
79 |
+
setcookie( 'aye_mce_shortcode', $_POST[ 'youtube_embed_editor_sc' ], $expiry, aye_get_cookie_path() );
|
80 |
|
81 |
+
// If the option to clear the cache has been ticked run an SQL to clear them down
|
82 |
+
|
83 |
+
if ( !empty( $_POST[ 'youtube_embed_clear_cache' ] ) ) {
|
84 |
+
global $wpdb;
|
85 |
+
$wpdb -> query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_%ye_video_%' OR option_name LIKE '_transient_%ye_type_%' OR option_name LIKE '_transient_%ye_title_%'" );
|
86 |
+
$update_message .= ' ' . __( 'Cache cleared.', 'youtube-embed' );
|
87 |
+
}
|
88 |
|
89 |
echo '<div class="updated fade"><p><strong>' . $update_message . "</strong></p></div>\n";
|
90 |
}
|
94 |
$options = aye_set_general_defaults();
|
95 |
$shortcode = aye_set_shortcode_option();
|
96 |
$url = aye_set_url_option();
|
97 |
+
$editor_sc = aye_set_editor_sc();
|
98 |
+
|
99 |
+
// Display ads
|
100 |
+
|
101 |
+
if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
102 |
?>
|
103 |
|
104 |
+
<div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
|
105 |
+
|
106 |
+
<p><?php _e( 'These are the general settings for Artiss YouTube Embed. Please select <a href="admin.php?page=aye-profile-options">Profiles</a> for default embedding settings.', 'youtube-embed' ); ?></p>
|
107 |
|
108 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-general-options' ?>">
|
109 |
|
110 |
+
<table class="form-table">
|
111 |
+
|
112 |
+
<tr>
|
113 |
+
<th scope="row"><?php _e( 'Remove Adverts', 'youtube-embed' ); ?></th>
|
114 |
+
<td><input type="checkbox" name="youtube_embed_donated" value="1"<?php if ( $options[ 'donated' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( "If you've <a href=\"http://www.artiss.co.uk/donate\">donated</a>, tick here to remove the adverts from these administration screens", 'youtube-embed' ); ?></span></td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
</table></br>
|
118 |
+
|
119 |
+
<span class="yt_heading"><?php _e( 'Embedding', 'youtube-embed' ); ?></span>
|
120 |
|
121 |
<table class="form-table">
|
122 |
<tr>
|
123 |
+
<th scope="row"><?php _e( 'Add Metadata', 'youtube-embed' ); ?></th>
|
124 |
+
<td><input type="checkbox" name="youtube_embed_metadata" value="1"<?php if ( $options[ 'metadata' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow rich metadata to be added to code. <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-metadata">Learn more</a>', 'youtube-embed' ); ?></span></td>
|
125 |
</tr>
|
126 |
|
127 |
<tr>
|
128 |
+
<th scope="row"><?php _e( 'Comment Embedding', 'youtube-embed' ); ?></th>
|
129 |
+
<td><input type="checkbox" name="youtube_embed_comments" value="1"<?php if ( $options[ 'comments' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow YouTube URLs in comments - will display as embedded videos. <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-comments">Learn more</a>', 'youtube-embed' ); ?></span></td>
|
130 |
</tr>
|
131 |
|
132 |
<tr>
|
133 |
+
<th scope="row"> <?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
|
134 |
<td><select name="youtube_embed_comments_profile">
|
135 |
<?php aye_generate_profile_list( $options[ 'comments_profile' ], $options[ 'profile_no' ] ) ?>
|
136 |
</select></td>
|
137 |
</tr>
|
138 |
|
139 |
<tr>
|
140 |
+
<th scope="row"><?php _e( 'Feed', 'youtube-embed' ); ?></th>
|
141 |
<td><select name="youtube_embed_feed">
|
142 |
+
<option value="t"<?php if ( $options[ 'feed' ] == "t" ) { echo " selected='selected'"; } ?>><?php _e ( 'Text link', 'youtube-embed' ); ?></option>
|
143 |
+
<option value="v"<?php if ( $options[ 'feed' ] == "v" ) { echo " selected='selected'"; } ?>><?php _e ( 'Thumbnail', 'youtube-embed' ); ?></option>
|
144 |
+
<option value="b"<?php if ( $options[ 'feed' ] == "b" ) { echo " selected='selected'"; } ?>><?php _e ( 'Thumbnail & Text Link', 'youtube-embed' ); ?></option>
|
145 |
+
</select> <span class="description"><?php _e( 'Videos cannot be embedded in feeds. Select how you wish them to be shown instead', 'youtube-embed' ); ?></span></td>
|
146 |
</tr>
|
147 |
|
148 |
<tr>
|
149 |
+
<th scope="row"> <?php _e( 'Thumbnail to use', 'youtube-embed' ); ?></th>
|
150 |
<td><select name="youtube_embed_thumbnail">
|
151 |
+
<option value="default"<?php if ( $options[ 'thumbnail' ] == "default" ) { echo " selected='selected'"; } ?>><?php _e ( 'Default', 'youtube-embed' ); ?></option>
|
152 |
+
<option value="hqdefault"<?php if ( $options[ 'thumbnail' ] == "hqdefault" ) { echo " selected='selected'"; } ?>><?php _e ( 'Default (HQ)', 'youtube-embed' ); ?></option>
|
153 |
+
<option value="1"<?php if ( $options[ 'thumbnail' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e ( 'Start', 'youtube-embed' ); ?></option>
|
154 |
+
<option value="2"<?php if ( $options[ 'thumbnail' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e ( 'Middle', 'youtube-embed' ); ?></option>
|
155 |
+
<option value="3"<?php if ( $options[ 'thumbnail' ] == "3" ) { echo " selected='selected'"; } ?>><?php _e ( 'End', 'youtube-embed' ); ?></option>
|
156 |
+
</select> <span class="description"><?php _e( 'Which thumbnail to use', 'youtube-embed' ); ?></span></td>
|
157 |
+
</tr>
|
158 |
+
|
159 |
+
<tr>
|
160 |
+
<th scope="row"><?php _e( 'Allow shortcodes in widgets', 'youtube-embed' ); ?></th>
|
161 |
+
<td><input type="checkbox" name="youtube_embed_widgets" value="1"<?php if ( $options[ 'widgets' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow shortcodes to be used in widgets - this will apply to <strong>all</strong> widgets', 'youtube-embed' ); ?></span></td>
|
162 |
</tr>
|
163 |
</table>
|
164 |
|
165 |
+
<br/><span class="yt_heading"><?php _e( 'Alternative Shortcodes', 'youtube-embed' ); ?></span><br/><br/><?php _e( 'Specify up to 2 alternative shortcodes to compliment the standard <code>youtube</code> shortcode. <strong>NB: These should be specified without the surrounding square brackets.</strong>', 'youtube-embed' ); ?>
|
166 |
|
167 |
<table class="form-table">
|
168 |
<tr>
|
169 |
+
<th scope="row"><?php _e( 'Alternative Shortcode 1', 'youtube-embed' ); ?></th>
|
170 |
<td><input type="text" size="30" name="youtube_embed_shortcode" value="<?php echo $shortcode[ 1 ]; ?>"/></td>
|
171 |
</tr>
|
172 |
|
173 |
<tr>
|
174 |
+
<th scope="row"> <?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
|
175 |
<td><select name="youtube_embed_alt_profile">
|
176 |
<?php aye_generate_profile_list( $options[ 'alt_profile' ], $options[ 'profile_no' ] ) ?>
|
177 |
</select></td>
|
178 |
</tr>
|
179 |
|
180 |
<tr>
|
181 |
+
<th scope="row"><?php _e( 'Alternative Shortcode 2', 'youtube-embed' ); ?></th>
|
182 |
<td><input type="text" size="30" name="youtube_embed_shortcode2" value="<?php echo $shortcode[ 2 ]; ?>"/></td>
|
183 |
</tr>
|
184 |
|
185 |
<tr>
|
186 |
+
<th scope="row"> <?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
|
187 |
<td><select name="youtube_embed_alt_profile2">
|
188 |
<?php aye_generate_profile_list( $options[ 'alt_profile2' ], $options[ 'profile_no' ] ) ?>
|
189 |
</select></td>
|
190 |
</tr>
|
191 |
</table>
|
192 |
|
193 |
+
<br/><span class="yt_heading"><?php _e( 'Migration', 'youtube-embed' ); ?></span><br/><br/><?php _e( 'Switch on compatibility with other embedding plugins. For more details on migrating from another plugin, please <a href="http://www.artiss.co.uk/youtube-embed/compatibility">click here</a>.', 'youtube-embed' ); ?>
|
194 |
|
195 |
<table class="form-table">
|
196 |
<tr>
|
197 |
+
<th scope="row"><?php _e( 'Bracket Embedding', 'youtube-embed' ); ?></th>
|
198 |
+
<td><input type="checkbox" name="youtube_embed_bracket" value="1"<?php if ( $options[ 'bracket' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow embedding using URLs within brackets. Activating impacts performance', 'youtube-embed' ); ?></span></td>
|
199 |
</tr>
|
200 |
|
201 |
<tr>
|
202 |
+
<th scope="row"><?php _e( 'Alternative Embedding', 'youtube-embed' ); ?></th>
|
203 |
+
<td><input type="checkbox" name="youtube_embed_alt" value="1"<?php if ( $options[ 'alt' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Allow all other types of embedding. Activating impacts performance', 'youtube-embed' ); ?></span></td>
|
204 |
</tr>
|
205 |
|
206 |
<tr>
|
207 |
+
<th scope="row"> <?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
|
208 |
<td><select name="youtube_embed_other_profile">
|
209 |
<?php aye_generate_profile_list( $options[ 'other_profile' ], $options[ 'profile_no' ] ) ?>
|
210 |
+
</select> <span class="description"><?php _e( 'For above 2 options', 'youtube-embed' ); ?></span></td>
|
211 |
</tr>
|
212 |
</table>
|
213 |
|
214 |
+
<br/><span class="yt_heading"><?php _e( 'Admin Options', 'youtube-embed' ); ?></span>
|
215 |
|
216 |
<table class="form-table">
|
217 |
<tr>
|
218 |
+
<th scope="row"><?php _e( 'Show Editor Button', 'youtube-embed' ); ?></th>
|
219 |
+
<td><input type="checkbox" name="youtube_embed_editor_button" value="1"<?php if ( $options[ 'editor_button' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show the YouTube button on the post editor', 'youtube-embed' ); ?></span></td>
|
220 |
</tr>
|
221 |
|
222 |
<tr>
|
223 |
+
<th scope="row"><?php _e( 'Editor Button Shortcode', 'youtube-embed' ); ?></th>
|
224 |
+
<td><input type="text" size="20" name="youtube_embed_editor_sc" value="<?php echo $editor_sc; ?>"/> <span class="description"><?php _e( 'Shortcode for editor button to use.', 'youtube-embed' ); ?></span></td>
|
225 |
+
</tr>
|
226 |
+
|
227 |
+
<tr>
|
228 |
+
<th scope="row"><?php _e( 'Add to Admin Bar', 'youtube-embed' ); ?></th>
|
229 |
+
<td><input type="checkbox" name="youtube_embed_admin_bar" value="1"<?php if ( $options[ 'admin_bar' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Add link to options screen to Admin Bar', 'youtube-embed' ); ?></span></td>
|
230 |
+
</tr>
|
231 |
+
|
232 |
+
<tr>
|
233 |
+
<th scope="row"><?php _e( 'Profiles Screen Access', 'youtube-embed' ); ?></th>
|
234 |
+
<td><select name="youtube_embed_profile_access">
|
235 |
+
<option value="delete_plugins"<?php if ( $options[ 'profile_access' ] == "delete_plugins" ) { echo " selected='selected'"; } ?>><?php _e ( 'Administrator', 'youtube-embed' ); ?></option>
|
236 |
+
<option value="edit_pages"<?php if ( $options[ 'profile_access' ] == "edit_pages" ) { echo " selected='selected'"; } ?>><?php _e ( 'Editor', 'youtube-embed' ); ?></option>
|
237 |
+
<option value="publish_posts"<?php if ( $options[ 'profile_access' ] == "publish_posts" ) { echo " selected='selected'"; } ?>><?php _e ( 'Author', 'youtube-embed' ); ?></option>
|
238 |
+
<option value="edit_posts"<?php if ( $options[ 'profile_access' ] == "edit_posts" ) { echo " selected='selected'"; } ?>><?php _e ( 'Contributor', 'youtube-embed' ); ?></option>
|
239 |
+
</select> <span class="description"><?php _e( 'Specify the user access required for the profiles screen', 'youtube-embed' ); ?></span></td>
|
240 |
+
</tr>
|
241 |
+
|
242 |
+
<tr>
|
243 |
+
<th scope="row"><?php _e( 'Lists Screen Access', 'youtube-embed' ); ?></th>
|
244 |
+
<td><select name="youtube_embed_list_access">
|
245 |
+
<option value="delete_plugins"<?php if ( $options[ 'list_access' ] == "delete_plugins" ) { echo " selected='selected'"; } ?>><?php _e ( 'Administrator', 'youtube-embed' ); ?></option>
|
246 |
+
<option value="edit_pages"<?php if ( $options[ 'list_access' ] == "edit_pages" ) { echo " selected='selected'"; } ?>><?php _e ( 'Editor', 'youtube-embed' ); ?></option>
|
247 |
+
<option value="publish_posts"<?php if ( $options[ 'list_access' ] == "publish_posts" ) { echo " selected='selected'"; } ?>><?php _e ( 'Author', 'youtube-embed' ); ?></option>
|
248 |
+
<option value="edit_posts"<?php if ( $options[ 'list_access' ] == "edit_posts" ) { echo " selected='selected'"; } ?>><?php _e ( 'Contributor', 'youtube-embed' ); ?></option>
|
249 |
+
</select> <span class="description"><?php _e( 'Specify the user access required for the lists screen', 'youtube-embed' ); ?></span></td>
|
250 |
</tr>
|
251 |
</table>
|
252 |
|
253 |
+
<br/><span class="yt_heading"><?php _e( 'Profile & List Sizes', 'youtube-embed' ); ?></span>
|
254 |
|
255 |
<table class="form-table">
|
256 |
<tr>
|
257 |
+
<th scope="row"><?php _e( 'Number of Profiles', 'youtube-embed' ); ?></th>
|
258 |
+
<td><input type="text" size="2" maxlength="2" name="youtube_embed_profile_no" value="<?php echo $options[ 'profile_no' ]; ?>"/> <span class="description"><?php _e( 'Maximum number of profiles', 'youtube-embed' ); ?></span></td>
|
259 |
</tr>
|
260 |
|
261 |
<tr>
|
262 |
+
<th scope="row"><?php _e( 'Number of Lists', 'youtube-embed' ); ?></th>
|
263 |
+
<td><input type="text" size="2" maxlength="2" name="youtube_embed_list_no" value="<?php echo $options[ 'list_no' ]; ?>"/> <span class="description"><?php _e( 'Maximum number of lists', 'youtube-embed' ); ?></span></td>
|
264 |
</tr>
|
265 |
</table>
|
266 |
|
267 |
+
<br/><span class="yt_heading"><?php _e( 'Performance', 'youtube-embed' ); ?></span>
|
268 |
|
269 |
<table class="form-table">
|
270 |
<tr>
|
271 |
+
<th scope="row"><?php _e( 'Embed Cache', 'youtube-embed' ); ?></th>
|
272 |
+
<td><input type="text" size="3" maxlength="3" name="youtube_embed_embed_cache" value="<?php echo $options[ 'embed_cache' ]; ?>"/> <span class="description"><?php _e( 'How many hours to retain embed output. 0 to switch off', 'youtube-embed' ); ?></span></td>
|
273 |
</tr>
|
274 |
|
275 |
<tr>
|
276 |
+
<th scope="row"><?php _e( 'Video Information Cache', 'youtube-embed' ); ?></th>
|
277 |
+
<td><input type="text" size="3" maxlength="3" name="youtube_embed_info_cache" value="<?php echo $options[ 'info_cache' ]; ?>"/> <span class="description"><?php _e( 'How many hours to retain video information, including it\'s validity. 0 to switch off', 'youtube-embed' ); ?></span></td>
|
278 |
</tr>
|
279 |
|
280 |
<tr>
|
281 |
+
<th scope="row"><?php _e( 'Transcript Cache', 'youtube-embed' ); ?></th>
|
282 |
+
<td><input type="text" size="3" maxlength="3" name="youtube_embed_transcript_cache" value="<?php echo $options[ 'transcript_cache' ]; ?>"/> <span class="description"><?php _e( 'How many hours to store transcripts for in cache. 0 to switch off', 'youtube-embed' ); ?></span></td>
|
283 |
+
</tr></table>
|
284 |
|
285 |
<?php
|
286 |
global $wpdb;
|
287 |
+
$video_cache = $wpdb -> get_var( "SELECT COUNT(*) FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_%ye_video_%'" );
|
288 |
+
$type_cache = $wpdb -> get_var( "SELECT COUNT(*) FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_%ye_type_%'" );
|
289 |
+
$title_cache = $wpdb -> get_var( "SELECT COUNT(*) FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_%ye_title_%'" );
|
290 |
+
|
291 |
+
echo '<p>' . __( 'You currently have cache for', 'youtube_embed' ) . ' ' . number_format( $video_cache ) . ' video' . ( $video_cache <> 1 ? 's' : '' ) . ', ' . number_format( $type_cache ) . ' video type' . ( $type_cache <> 1 ? 's' : '' ) . ' ' . __( 'and', 'youtube_embed' ) . ' ' . number_format( $title_cache ) . ' title' . ( $title_cache <> 1 ? 's' : '' ) . ".</p>\n";
|
292 |
?>
|
293 |
|
294 |
+
<table class="form-table"><tr>
|
295 |
+
<th scope="row"><?php _e( 'Clear Cache', 'youtube-embed' ); ?></th>
|
296 |
+
<td><input type="checkbox" name="youtube_embed_clear_cache" value="1"> <span class="description"><?php _e( 'Select this option to remove all YouTube Embed cache.', 'youtube-embed' ); ?></span></td>
|
297 |
+
</tr></table>
|
|
|
298 |
|
299 |
+
<br/><span class="yt_heading"><?php _e( 'YouTube API', 'youtube-embed' ); ?></span>
|
300 |
|
301 |
+
<p><?php _e( 'The YouTube API is used to validate video IDs and to determine if it is a video or playlist.', 'youtube-embed' ); ?></p>
|
302 |
|
303 |
<table class="form-table">
|
304 |
<tr>
|
305 |
+
<th scope="row"><?php _e( 'API State', 'youtube-embed' ); ?></th>
|
306 |
<td><select name="youtube_embed_api">
|
307 |
+
<option value="0"<?php if ( $options[ 'api' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e ( 'API should not be used', 'youtube-embed' ); ?></option>
|
308 |
+
<option value="1"<?php if ( $options[ 'api' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTP API used and errors are reported', 'youtube-embed' ); ?></option>
|
309 |
+
<option value="2"<?php if ( $options[ 'api' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTPS API used and errors are reported', 'youtube-embed' ); ?></option>
|
310 |
+
<option value="3"<?php if ( $options[ 'api' ] == "3" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTP API used and no errors are reported', 'youtube-embed' ); ?></option>
|
311 |
+
<option value="4"<?php if ( $options[ 'api' ] == "4" ) { echo " selected='selected'"; } ?>><?php _e ( 'HTTPS API used and no errors are reported', 'youtube-embed' ); ?></option>
|
312 |
</select></td>
|
313 |
</tr>
|
314 |
</table>
|
315 |
|
316 |
+
<br/><span class="yt_heading"><?php _e( 'Error Reporting', 'youtube-embed' ); ?></span>
|
317 |
|
318 |
+
<p><?php _e( 'Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output.', 'youtube-embed' ); ?></p>
|
319 |
|
320 |
<table class="form-table"><tr>
|
321 |
+
<th scope="row"><?php _e( 'Video Playback Error Message', 'youtube-embed' ); ?></th>
|
322 |
+
<td><input type="text" size="60" name="youtube_embed_error_message" value="<?php echo htmlspecialchars( $options[ 'error_message' ] ); ?>"/> <span class="description"><?php _e( 'This is the message that will be shown on the post', 'youtube-embed' ); ?></span></td>
|
323 |
</tr></table>
|
324 |
|
325 |
+
<br/><span class="yt_heading"><?php _e( 'Security', 'youtube-embed' ); ?></span>
|
326 |
|
327 |
<table class="form-table"><tr>
|
328 |
+
|
329 |
+
<tr>
|
330 |
+
<th scope="row"><?php _e( 'Privacy-Enhanced Mode', 'youtube-embed' ); ?></th>
|
331 |
+
<td><select name="youtube_embed_privacy">
|
332 |
+
<option value="0"<?php if ( $options[ 'privacy' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e ( 'Cookies should always be stored', 'youtube-embed' ); ?></option>
|
333 |
+
<option value="1"<?php if ( $options[ 'privacy' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e ( 'Cookies should never be stored', 'youtube-embed' ); ?></option>
|
334 |
+
<option value="2"<?php if ( $options[ 'privacy' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e ( "Cookies should be stored based on user's Do Not Track setting", 'youtube-embed' ); ?></option>
|
335 |
+
</select> <span class="description"><?php _e( 'Read more about <a href="http://donottrack.us/">Do Not Track</a>', 'youtube-embed' ); ?></span></td>
|
336 |
</tr></table>
|
337 |
|
338 |
+
<br/><span class="yt_heading"><?php _e( 'Compatibility', 'youtube-embed' ); ?></span>
|
339 |
|
340 |
<table class="form-table"><tr>
|
341 |
+
<th scope="row"><?php _e( 'Allow Frame Border on IFRAME', 'youtube-embed' ); ?></th>
|
342 |
+
<td><input type="checkbox" name="youtube_embed_frameborder" value="1"<?php if ( $options[ 'frameborder' ] == '1' ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'FRAMEBORDER is not HTML5 compliant', 'youtube-embed' ); ?></span></td>
|
343 |
</tr></table>
|
344 |
|
345 |
<?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
|
346 |
|
347 |
+
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings', 'youtube-embed' ); ?>"/></p>
|
348 |
|
349 |
</form>
|
350 |
|
includes/aye-options-lists.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
|
13 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
14 |
|
15 |
-
<h2><?php _e( 'Artiss YouTube Embed Lists' ); ?></h2>
|
16 |
|
17 |
<?php
|
18 |
// Set current list number
|
@@ -23,12 +23,12 @@ if ( $list_no == '' ) { $list_no = 1; }
|
|
23 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-general', 'youtube_embed_general_nonce' ) ) ) {
|
24 |
|
25 |
$class = 'updated fade';
|
26 |
-
$message = __( 'Settings Saved.' );
|
27 |
$new_id_list = '';
|
28 |
|
29 |
if ( ( $_POST[ 'youtube_embed_video_list' ] == '' ) or ( $_POST[ 'youtube_embed_name' ] == '' ) ) {
|
30 |
$class = 'error';
|
31 |
-
$message = __( 'All fields must be completed.' );
|
32 |
} else {
|
33 |
$id_array = explode( "\n", $_POST[ 'youtube_embed_video_list' ] );
|
34 |
$loop = 0;
|
@@ -50,7 +50,7 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-g
|
|
50 |
// If one or more IDs weren't valid, output an error
|
51 |
if (!$valid) {
|
52 |
$class = 'error';
|
53 |
-
$message = __( 'Errors were found with your video list. See the list below for details.' );
|
54 |
}
|
55 |
}
|
56 |
|
@@ -64,7 +64,7 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-g
|
|
64 |
}
|
65 |
|
66 |
if ( substr( $class, 0, 7 ) == 'updated' ) { update_option( 'youtube_embed_list' . $list_no, $options ); }
|
67 |
-
echo '<div class="' . $class.'"><p><strong>' .
|
68 |
} else {
|
69 |
$class = '';
|
70 |
}
|
@@ -72,8 +72,14 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-g
|
|
72 |
// Fetch options into an array
|
73 |
if ( $class != "error" ) { $options = aye_set_list_defaults( $list_no ); }
|
74 |
$general = aye_set_general_defaults();
|
|
|
|
|
|
|
|
|
75 |
?>
|
76 |
|
|
|
|
|
77 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-list-options'; ?>">
|
78 |
|
79 |
<span class="alignright">
|
@@ -85,11 +91,11 @@ while ( $loop <= $general[ 'list_no' ] ) {
|
|
85 |
$listfiles = get_option( 'youtube_embed_list' . $loop );
|
86 |
$listname = $listfiles[ 'name' ];
|
87 |
|
88 |
-
if ( $listname == '' ) { $listname = __( 'List' ) . ' ' . $loop; }
|
89 |
-
|
90 |
echo '<option value="' . $loop . '"';
|
91 |
if ( $list_no == $loop ) { echo " selected='selected'"; }
|
92 |
-
echo '>' .
|
93 |
|
94 |
$loop ++;
|
95 |
}
|
@@ -98,25 +104,25 @@ while ( $loop <= $general[ 'list_no' ] ) {
|
|
98 |
<input type="submit" name="List" class="button-secondary" value="<?php _e( 'Change list' ); ?>"/>
|
99 |
</span><br/>
|
100 |
|
101 |
-
<?php echo sprintf( __( 'These are the options for list ' ), $list_no) . '<br/>' . __( 'Update the name, if required, and specify a list of YouTube video IDs. Use the drop-down on the right hand side to swap between lists.' ); ?>
|
102 |
|
103 |
<table class="form-table">
|
104 |
|
105 |
<tr>
|
106 |
-
<th scope="row"><?php _e( 'List name' ); ?></th><td>
|
107 |
<input type="text" size="20" name="youtube_embed_name" value="<?php echo $options[ 'name' ]; ?>"/>
|
108 |
-
<?php echo ' <span class="description">' . __( 'The name you wish to give this list' ) . '</span>'; ?>
|
109 |
</td></tr>
|
110 |
|
111 |
<tr>
|
112 |
-
<th scope="row"><?php _e( 'Video IDs (one per line)' ); ?></th><td>
|
113 |
<textarea name="youtube_embed_video_list" id="youtube_embed_video_list" cols="12" rows="10" class="widefat"><?php echo $options[ 'list' ]; ?></textarea>
|
114 |
</td></tr>
|
115 |
</table>
|
116 |
|
117 |
<?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
|
118 |
|
119 |
-
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings' ); ?>"/></p>
|
120 |
|
121 |
</form>
|
122 |
|
@@ -127,7 +133,7 @@ if ( $options[ 'list' ] != '' ) {
|
|
127 |
|
128 |
$id_array = explode( "\n", $options[ 'list' ] );
|
129 |
|
130 |
-
echo
|
131 |
$loop = 0;
|
132 |
|
133 |
while ( $loop < count( $id_array ) ) {
|
@@ -143,18 +149,18 @@ if ( $options[ 'list' ] != '' ) {
|
|
143 |
$type = $video_info[ 'type' ];
|
144 |
|
145 |
if ( $type == 'p' ) {
|
146 |
-
$text = __( 'This is a playlist' );
|
147 |
$status = '-1';
|
148 |
} else {
|
149 |
if ( $type == '' ) {
|
150 |
-
$text = __( 'Invalid video ID' );
|
151 |
$status = '-2';
|
152 |
} else {
|
153 |
if ( strlen( $type ) != 1 ) {
|
154 |
-
$text = __( 'YouTube API error' );
|
155 |
$status = '-3';
|
156 |
} else {
|
157 |
-
$text = __( 'Valid video' );
|
158 |
$status = '0';
|
159 |
}
|
160 |
}
|
@@ -172,10 +178,10 @@ if ( $options[ 'list' ] != '' ) {
|
|
172 |
|
173 |
echo '"><img src="' . plugins_url() . '/youtube-embed/images/';
|
174 |
if ( $status == 0 ) {
|
175 |
-
|
176 |
echo 'tick.png" alt="' . $alt_text . '" title="' . $alt_text . '" ';
|
177 |
} else {
|
178 |
-
|
179 |
echo 'cross.png" alt="' . $alt_text . '" title="' . $alt_text . '" ';
|
180 |
}
|
181 |
|
12 |
|
13 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
14 |
|
15 |
+
<h2><?php _e( 'Artiss YouTube Embed Lists', 'youtube-embed' ); ?></h2>
|
16 |
|
17 |
<?php
|
18 |
// Set current list number
|
23 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-general', 'youtube_embed_general_nonce' ) ) ) {
|
24 |
|
25 |
$class = 'updated fade';
|
26 |
+
$message = __( 'Settings Saved.', 'youtube-embed' );
|
27 |
$new_id_list = '';
|
28 |
|
29 |
if ( ( $_POST[ 'youtube_embed_video_list' ] == '' ) or ( $_POST[ 'youtube_embed_name' ] == '' ) ) {
|
30 |
$class = 'error';
|
31 |
+
$message = __( 'All fields must be completed.', 'youtube-embed' );
|
32 |
} else {
|
33 |
$id_array = explode( "\n", $_POST[ 'youtube_embed_video_list' ] );
|
34 |
$loop = 0;
|
50 |
// If one or more IDs weren't valid, output an error
|
51 |
if (!$valid) {
|
52 |
$class = 'error';
|
53 |
+
$message = __( 'Errors were found with your video list. See the list below for details.', 'youtube-embed' );
|
54 |
}
|
55 |
}
|
56 |
|
64 |
}
|
65 |
|
66 |
if ( substr( $class, 0, 7 ) == 'updated' ) { update_option( 'youtube_embed_list' . $list_no, $options ); }
|
67 |
+
echo '<div class="' . $class . '"><p><strong>' . $message . "</strong></p></div>\n";
|
68 |
} else {
|
69 |
$class = '';
|
70 |
}
|
72 |
// Fetch options into an array
|
73 |
if ( $class != "error" ) { $options = aye_set_list_defaults( $list_no ); }
|
74 |
$general = aye_set_general_defaults();
|
75 |
+
|
76 |
+
// Display ads
|
77 |
+
|
78 |
+
if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
79 |
?>
|
80 |
|
81 |
+
<div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
|
82 |
+
|
83 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-list-options'; ?>">
|
84 |
|
85 |
<span class="alignright">
|
91 |
$listfiles = get_option( 'youtube_embed_list' . $loop );
|
92 |
$listname = $listfiles[ 'name' ];
|
93 |
|
94 |
+
if ( $listname == '' ) { $listname = __( 'List', 'youtube-embed' ) . ' ' . $loop; }
|
95 |
+
if ( strlen( $listname ) > 30 ) { $listname = substr( $listname, 0, 30 ) . '…'; }
|
96 |
echo '<option value="' . $loop . '"';
|
97 |
if ( $list_no == $loop ) { echo " selected='selected'"; }
|
98 |
+
echo '>' . $listname . "</option>\n";
|
99 |
|
100 |
$loop ++;
|
101 |
}
|
104 |
<input type="submit" name="List" class="button-secondary" value="<?php _e( 'Change list' ); ?>"/>
|
105 |
</span><br/>
|
106 |
|
107 |
+
<?php echo sprintf( __( 'These are the options for list ', 'youtube-embed' ), $list_no) . '<br/>' . __( 'Update the name, if required, and specify a list of YouTube video IDs. Use the drop-down on the right hand side to swap between lists.', 'youtube-embed' ); ?>
|
108 |
|
109 |
<table class="form-table">
|
110 |
|
111 |
<tr>
|
112 |
+
<th scope="row"><?php _e( 'List name', 'youtube-embed' ); ?></th><td>
|
113 |
<input type="text" size="20" name="youtube_embed_name" value="<?php echo $options[ 'name' ]; ?>"/>
|
114 |
+
<?php echo ' <span class="description">' . __( 'The name you wish to give this list', 'youtube-embed' ) . '</span>'; ?>
|
115 |
</td></tr>
|
116 |
|
117 |
<tr>
|
118 |
+
<th scope="row"><?php _e( 'Video IDs (one per line)', 'youtube-embed' ); ?></th><td>
|
119 |
<textarea name="youtube_embed_video_list" id="youtube_embed_video_list" cols="12" rows="10" class="widefat"><?php echo $options[ 'list' ]; ?></textarea>
|
120 |
</td></tr>
|
121 |
</table>
|
122 |
|
123 |
<?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
|
124 |
|
125 |
+
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings', 'youtube-embed' ); ?>"/></p>
|
126 |
|
127 |
</form>
|
128 |
|
133 |
|
134 |
$id_array = explode( "\n", $options[ 'list' ] );
|
135 |
|
136 |
+
echo "<table class=\"widefat\">\n<thead>\n\t<tr>\n\t\t<th>" . __( 'Video ID', 'youtube-embed' ) . "</th>\n\t\t<th>" . __( 'Video Title', 'youtube-embed' ) . "</th>\n\t\t<th>" . __( 'Status', 'youtube-embed' ) . "</th>\n\t</tr>\n</thead>\n<tbody>\n";
|
137 |
$loop = 0;
|
138 |
|
139 |
while ( $loop < count( $id_array ) ) {
|
149 |
$type = $video_info[ 'type' ];
|
150 |
|
151 |
if ( $type == 'p' ) {
|
152 |
+
$text = __( 'This is a playlist', 'youtube-embed' );
|
153 |
$status = '-1';
|
154 |
} else {
|
155 |
if ( $type == '' ) {
|
156 |
+
$text = __( 'Invalid video ID', 'youtube-embed' );
|
157 |
$status = '-2';
|
158 |
} else {
|
159 |
if ( strlen( $type ) != 1 ) {
|
160 |
+
$text = __( 'YouTube API error', 'youtube-embed' );
|
161 |
$status = '-3';
|
162 |
} else {
|
163 |
+
$text = __( 'Valid video', 'youtube-embed' );
|
164 |
$status = '0';
|
165 |
}
|
166 |
}
|
178 |
|
179 |
echo '"><img src="' . plugins_url() . '/youtube-embed/images/';
|
180 |
if ( $status == 0 ) {
|
181 |
+
$alt_text = __( 'The video ID is valid', 'youtube-embed' );
|
182 |
echo 'tick.png" alt="' . $alt_text . '" title="' . $alt_text . '" ';
|
183 |
} else {
|
184 |
+
$alt_text = __( 'The video ID is invalid', 'youtube-embed' );
|
185 |
echo 'cross.png" alt="' . $alt_text . '" title="' . $alt_text . '" ';
|
186 |
}
|
187 |
|
includes/aye-options-profiles.php
CHANGED
@@ -8,91 +8,86 @@
|
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
?>
|
11 |
-
<div class="wrap"
|
|
|
|
|
12 |
|
13 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
14 |
|
15 |
-
<h2><?php _e( 'Artiss YouTube Embed Profiles' ); ?></h2
|
16 |
-
|
17 |
-
<div style="width: 990px; height: 220px; border: 1px solid #ddd; padding: 10px;">
|
18 |
-
<a href="http://themefuse.com/wp-themes-shop/?plugin=youtube-embed" target="_blank"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/themefuse_banner.jpg" alt="ThemeFuse.com - Premium WordPress Themes" title="ThemeFuse.com - Premium WordPress Themes" style="float: left; padding-right: 10px;"></a>
|
19 |
-
<h3>Donate</h3>
|
20 |
-
<p>If you like this plugin and appreciate the effort being put into it, <a href="http://www.artiss.co.uk/donate">please consider donating</a>. You can donate via PayPal or purchase something from my Amazon Wish List.</p>
|
21 |
-
<h3>Follow Me</h3>
|
22 |
-
<p>Please stay in touch with the latest news via one of the following social streams...</p>
|
23 |
-
<p align="center">
|
24 |
-
<a href="http://www.twitter.com/artiss_tech"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Twitter.png" alt="Follow Artiss.co.uk on Twitter" title="Follow Artiss.co.uk on Twitter" style="margin-right: 20px;"></a>
|
25 |
-
<a href="http://www.facebook.com/artiss.co.uk"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Facebook.png" alt="Follow Artiss.co.uk on Facebook" title="Follow Artiss.co.uk on Facebook" style="margin-right: 20px;"></a>
|
26 |
-
<a href="https://plus.google.com/108446415028687420620?rel=author"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Google+.png" alt="Follow Artiss.co.uk on Google+" title="Follow Artiss.co.uk on Google+" style="margin-right: 20px;"></a>
|
27 |
-
<a href="http://www.artiss.co.uk/feed"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/RSS.png" alt="Follow Artiss.co.uk on RSS feed" title="Follow Artiss.co.uk on RSS feed"></a>
|
28 |
-
</p>
|
29 |
-
</div><br/>
|
30 |
|
31 |
<?php
|
|
|
32 |
// Set current profile number
|
|
|
33 |
if ( isset( $_POST[ 'youtube_embed_profile_no' ] ) ) { $profile_no = $_POST[ 'youtube_embed_profile_no' ]; } else { $profile_no = 0; }
|
34 |
if ( $profile_no == '' ) { $profile_no = 0; }
|
35 |
|
36 |
// If options have been updated on screen, update the database
|
|
|
37 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-profile' , 'youtube_embed_profile_nonce' ) ) ) {
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
$options[ 'width' ] = $_POST[ 'youtube_embed_width' ];
|
43 |
-
|
44 |
|
45 |
-
|
46 |
if ( strpos( $options[ 'template' ], '%video%' ) === false ) { $options[ 'template' ] = '%video%'; }
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
74 |
|
75 |
if ( $default_size !== '' ) {
|
76 |
$options[ 'width' ] = ltrim( substr( $default_size, 0, 4 ), '0' );
|
77 |
$options[ 'height'] = ltrim( substr( $default_size, -4, 4 ), '0' );
|
78 |
}
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
update_option( 'youtube_embed_profile' . $profile_no, $options );
|
98 |
echo '<div class="updated fade"><p><strong>' . __( $options[ 'name' ].' Profile Saved.' ) . "</strong></p></div>\n";
|
@@ -101,270 +96,302 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-p
|
|
101 |
}
|
102 |
|
103 |
// Video option button has been pressed
|
|
|
104 |
if ( !empty( $_POST[ 'Video' ] ) ) { $video_type = $_POST[ 'youtube_embed_video_type' ]; } else { $video_type = 'd'; }
|
105 |
|
106 |
// Fetch options into an array
|
|
|
107 |
$options = aye_set_profile_defaults( $profile_no );
|
108 |
$general = aye_set_general_defaults();
|
|
|
|
|
|
|
|
|
109 |
?>
|
110 |
|
|
|
|
|
111 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-profile-options' ?>">
|
112 |
|
113 |
<span class="alignright">
|
114 |
<select name="youtube_embed_profile_no">
|
115 |
<?php aye_generate_profile_list( $profile_no, $general[ 'profile_no' ] ) ?>
|
116 |
</select>
|
117 |
-
<input type="submit" name="Profile" class="button-secondary" value="<?php _e('Change profile'); ?>"/>
|
118 |
</span><br/>
|
119 |
|
120 |
<?php
|
121 |
if ( $profile_no == '0' ) {
|
122 |
-
|
123 |
} else {
|
124 |
-
|
125 |
}
|
126 |
-
echo ' ' . __( 'Use the drop-down on the right hand side to swap between profiles.' );
|
127 |
?>
|
128 |
|
129 |
<table class="form-table">
|
130 |
|
131 |
<tr>
|
132 |
-
<th scope="row"><?php _e( 'Profile name' ); ?></th><td>
|
133 |
<input type="text" size="20" name="youtube_embed_name" value="<?php echo $options[ 'name' ]; ?>"<?php if ( $profile_no == 0 ) { echo ' readonly="readonly"'; } ?>/>
|
134 |
-
<?php if ( $profile_no != 0 ) { echo ' <span class="description">' . __( 'The name you wish to give this profile' ) . '</span>'; } ?>
|
135 |
</td></tr>
|
136 |
|
137 |
<tr valign="top">
|
138 |
-
<th scope="row"><?php _e( 'Video Embed Type' ); ?></th>
|
139 |
-
<td><span class="description"><?php _e( 'The type of player to use for videos.' ); ?></span><br/>
|
140 |
-
<input type="radio" name="youtube_embed_type" value="v"<?php if ( $options[ 'type' ] == "v" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'IFRAME' ); ?><span class="description"><?php echo ' ' . __( 'Uses
|
141 |
-
<input type="radio" name="youtube_embed_type" value="p"<?php if ( $options[ 'type' ] == "p" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'OBJECT' ); ?><span class="description"><?php echo ' ' . __( 'Use the AS3 Flash player.' ); ?></span><br/>
|
142 |
-
<input type="radio" name="youtube_embed_type" value="c"<?php if ( $options[ 'type' ] == "c" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'Chromeless' ); ?><span class="description"><?php echo ' ' . __( 'Use the <a href="http://www.artiss.co.uk/
|
143 |
-
<input type="radio" name="youtube_embed_type" value="m"<?php if ( $options[ 'type' ] == "m" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'EmbedPlus' ); ?><span class="description"><?php echo ' ' . __( 'Use <a href="http://www.artiss.co.uk/
|
144 |
</td>
|
145 |
</tr>
|
146 |
|
147 |
<tr valign="top">
|
148 |
-
<th scope="row"><?php _e( 'Playlist Embed Type' ); ?></th>
|
149 |
-
<td><span class="description"><?php _e( 'The type of player to use when showing playlists.' ); ?></span><br/>
|
150 |
-
<input type="radio" name="youtube_embed_playlist" value="v"<?php if ( $options[ 'playlist' ] == "v" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'IFRAME' ); ?><br/>
|
151 |
-
<input type="radio" name="youtube_embed_playlist" value="o"<?php if ( $options[ 'playlist' ] == "o" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'OBJECT' ); ?><br/>
|
152 |
</td>
|
153 |
</tr>
|
154 |
</table>
|
155 |
|
156 |
-
<br/><span class="yt_heading"><?php _e( 'Options For All Player Types' ); ?></span>
|
157 |
|
158 |
<table class="form-table">
|
159 |
<tr>
|
160 |
-
<th scope="row"><?php _e( 'Template' ); ?></th>
|
161 |
-
<td><input type="text" size="40" name="youtube_embed_template" value="<?php echo htmlspecialchars( $options[ 'template' ] ); ?>"/> <span class="description"
|
162 |
</tr>
|
163 |
|
164 |
<tr>
|
165 |
-
<th scope="row"><?php _e( 'Style' ); ?></th>
|
166 |
-
<td><input type="text" size="40" name="youtube_embed_style" value="<?php echo htmlspecialchars( $options[ 'style' ] ); ?>"/> <span class="description"
|
167 |
</tr>
|
168 |
</table>
|
169 |
|
170 |
<table class="form-table ytbox_grey">
|
171 |
<tr>
|
172 |
-
<th scope="row"><?php _e( '
|
173 |
-
<td><input type="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
</tr>
|
175 |
|
176 |
<tr valign="top">
|
177 |
-
<th scope="row"><?php _e( 'Default Sizes' ); ?></th>
|
178 |
<td><select name="youtube_embed_size">
|
179 |
-
<option value=""<?php if ( $default_size == '' ) { echo " selected='selected'"; } ?>><?php _e( 'Use above sizes' ); ?></option>
|
180 |
<option value="04800385"<?php if ( $default_size == "04800385" ) { echo " selected='selected'"; } ?>><?php echo '480x385 4:3'; ?></option>
|
181 |
<option value="05600340"<?php if ( $default_size == "05600340" ) { echo " selected='selected'"; } ?>><?php echo '560x340 16:9'; ?></option>
|
182 |
<option value="06400385"<?php if ( $default_size == "06400385" ) { echo " selected='selected'"; } ?>><?php echo '640x385 16:9'; ?></option>
|
183 |
<option value="08530505"<?php if ( $default_size == "08530505" ) { echo " selected='selected'"; } ?>><?php echo '853x505 16:9'; ?></option>
|
184 |
<option value="12800745"<?php if ( $default_size == "12800745" ) { echo " selected='selected'"; } ?>><?php echo '1280x745 16:9'; ?></option>
|
185 |
-
</select> <span class="description"><?php _e( 'Select one of these default sizes to override the above video sizes' ); ?></span></td>
|
186 |
</tr>
|
187 |
|
188 |
<tr>
|
189 |
-
<th scope="row"><?php _e( 'Dynamically Resize' ); ?></th>
|
190 |
-
<td><input type="checkbox" name="youtube_embed_dynamic" value="1"<?php if ( $options[ 'dynamic' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show full width and resize with the browser' ); ?></span></td>
|
191 |
</tr>
|
192 |
|
193 |
<tr>
|
194 |
-
<th scope="row"> <?php _e( 'Set Maximum Size' ); ?></th>
|
195 |
-
<td><input type="checkbox" name="youtube_embed_fixed" value="1"<?php if ( $options[ 'fixed' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Use above width to define maximum size' ); ?></span></td>
|
196 |
</tr>
|
197 |
</table>
|
198 |
|
199 |
<table class="form-table">
|
200 |
|
201 |
<tr>
|
202 |
-
<th scope="row"><?php _e( 'Audio Only' ); ?></th>
|
203 |
-
<td><input type="checkbox" name="youtube_embed_audio" value="1"<?php if ( $options[ 'audio' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Only show the toolbar for audio only playback' ); ?></span></td>
|
204 |
</tr>
|
205 |
|
206 |
<tr>
|
207 |
-
<th scope="row"><?php _e( 'Autoplay' ); ?></th>
|
208 |
-
<td><input type="checkbox" name="youtube_embed_autoplay" value="1"<?php if ( $options[ 'autoplay' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'The video will start playing when the player loads' ); ?></span></td>
|
209 |
</tr>
|
210 |
|
211 |
</table>
|
212 |
|
213 |
-
<br/><span class="yt_heading"><?php _e( 'Options Not Supported by EmbedPlus' ); ?></span>
|
214 |
|
215 |
<table class="form-table">
|
216 |
|
217 |
<tr>
|
218 |
-
<th scope="row"><?php _e( 'Auto hide' ); ?></th>
|
219 |
<td><select name="youtube_embed_autohide">
|
220 |
-
<option value="0"<?php if ( $options[ 'autohide' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls & progress bar remain visible' ); ?></option>
|
221 |
-
<option value="1"<?php if ( $options[ 'autohide' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls & progress bar fade out' ); ?></option>
|
222 |
-
<option value="2"<?php if ( $options[ 'autohide' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e( 'Progress bar fades' ); ?></option>
|
223 |
-
</select> <span class="description"><?php _e( 'Video controls will automatically hide after a video begins playing' ); ?></span></td>
|
224 |
</tr>
|
225 |
|
226 |
<tr>
|
227 |
-
<th scope="row"><?php _e( 'Controls' ); ?></th>
|
228 |
-
<td><
|
|
|
|
|
|
|
|
|
229 |
</tr>
|
230 |
|
231 |
<tr>
|
232 |
-
<th scope="row"
|
233 |
-
<td><input type="checkbox" name="youtube_embed_https" value="1"<?php if ( $options[ 'https' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Use SSL? <a href="http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS">Read more</a>' ); ?></span></td>
|
234 |
</tr>
|
235 |
|
236 |
<tr>
|
237 |
-
<th scope="row"><?php _e( 'Loop Video' ); ?></th>
|
238 |
-
<td><input type="checkbox" name="youtube_embed_loop" value="1"<?php if ( $options[ 'loop' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Play the initial video again and again. In the case of a playlist, this will play the entire playlist and then start again at the first video' ); ?></span></td>
|
239 |
</tr>
|
240 |
|
241 |
<tr>
|
242 |
-
<th scope="row"><?php _e( 'Information' ); ?></th>
|
243 |
-
<td><input type="checkbox" name="youtube_embed_info" value="1"<?php if ( $options[ 'info' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Display the video title and uploader before the video starts' ); ?></span></td>
|
244 |
</tr>
|
245 |
|
246 |
<tr>
|
247 |
-
<th scope="row"><?php _e( '
|
248 |
-
<td><
|
249 |
-
<option value="dark"<?php if ( $options[ 'theme' ] == "dark" ) { echo " selected='selected'"; } ?>><?php _e( 'Dark' ); ?></option>
|
250 |
-
<option value="light"<?php if ( $options[ 'theme' ] == "light" ) { echo " selected='selected'"; } ?>><?php _e( 'Light' ); ?></option>
|
251 |
-
</select> <span class="description"><?php _e( 'Display player controls within a dark or light control bar' ); ?></span></td>
|
252 |
</tr>
|
253 |
-
</table>
|
254 |
-
|
255 |
-
<br/><span class="yt_heading"><?php _e( 'Options for AS3 Player' ); ?></span>
|
256 |
-
<br/><br/>The following options are not supported if using EmbedPlus or if the IFRAME player uses HTML5.
|
257 |
|
258 |
-
<table class="form-table">
|
259 |
<tr>
|
260 |
-
<th scope="row"><?php _e( '
|
261 |
-
<td><
|
|
|
|
|
|
|
262 |
</tr>
|
263 |
|
264 |
<tr>
|
265 |
-
<th scope="row"><?php _e( '
|
266 |
-
<td><
|
|
|
|
|
|
|
267 |
</tr>
|
268 |
|
269 |
<tr>
|
270 |
-
<th scope="row"><?php _e( '
|
271 |
-
<td><input type="checkbox" name="
|
272 |
</tr>
|
273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
<tr>
|
275 |
-
<th scope="row"><?php _e( '
|
276 |
-
<td><input type="checkbox" name="
|
277 |
</tr>
|
278 |
|
279 |
<tr>
|
280 |
-
<th scope="row"><?php _e( '
|
281 |
-
<td><input type="checkbox" name="
|
282 |
</tr>
|
283 |
|
284 |
<tr>
|
285 |
-
<th scope="row"><?php _e( '
|
286 |
-
<td><input type="checkbox" name="
|
287 |
</tr>
|
288 |
|
289 |
<tr>
|
290 |
-
<th scope="row"><?php _e( '
|
291 |
-
<td><
|
292 |
-
<option value="red"<?php if ( $options[ 'color' ] == "red" ) { echo " selected='selected'"; } ?>><?php _e( 'Red' ); ?></option>
|
293 |
-
<option value="white"<?php if ( $options[ 'color' ] == "white" ) { echo " selected='selected'"; } ?>><?php _e( 'White (desaturated)' ); ?></option>
|
294 |
-
</select> <span class="description"><?php _e( 'The colour that will be used in the player\'s video progress bar to highlight the amount of the video that\'s already been seen' ); ?></span></td>
|
295 |
</tr>
|
296 |
|
297 |
<tr>
|
298 |
-
<th scope="row"><?php _e( '
|
299 |
-
<td><input type="checkbox" name="
|
300 |
</tr>
|
|
|
301 |
</table>
|
302 |
|
303 |
-
<br/><span class="yt_heading"><?php _e( 'Options Not Supported by HTML5 Player' ); ?></span>
|
304 |
|
305 |
<table class="form-table">
|
306 |
<tr valign="top">
|
307 |
-
<th scope="row"><?php _e( 'Window Mode' ); ?></th>
|
308 |
<td><select name="youtube_embed_wmode">
|
309 |
-
<option value="opaque"<?php if ( $options[ 'wmode' ] == "opaque" ) { echo " selected='selected'"; } ?>><?php _e( 'Opaque' ); ?></option>
|
310 |
-
<option value="transparent"<?php if ( $options[ 'wmode' ] == "transparent" ) { echo " selected='selected'"; } ?>><?php _e( 'Transparent' ); ?></option>
|
311 |
-
<option value="window"<?php if ( $options[ 'wmode' ] == "window" ) { echo " selected='selected'"; } ?>><?php _e( 'Window' ); ?></option>
|
312 |
-
</select><span class="description"><?php _e( 'Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. <a href="http://www.communitymx.com/content/article.cfm?cid=e5141">Learn more</a>.' ); ?></span></td>
|
313 |
</tr>
|
314 |
|
315 |
</table>
|
316 |
|
317 |
-
<br/><span class="yt_heading"><?php _e( 'Options Only Supported By EmbedPlus' ); ?></span> <span class="description"><?php echo '<a href="http://www.artiss.co.uk/
|
318 |
|
319 |
<table class="form-table">
|
320 |
<tr valign="top">
|
321 |
-
<th scope="row"><?php _e( 'Fallback Embed Type' ); ?></th>
|
322 |
-
<td><span class="description"><?php _e( 'The type of player to use if Flash is not available and EmbedPlus cannot be used.' ); ?></span><br/>
|
323 |
-
<input type="radio" name="youtube_embed_fallback" value="v"<?php if ( $options[ 'fallback' ] == "v" ) { echo ' checked="checked"'; } ?>/> <?php _e( 'IFRAME' ); ?><br/>
|
324 |
-
<input type="radio" name="youtube_embed_fallback" value="p"<?php if ( $options[ 'fallback' ] == "p" ) { echo ' checked="checked"'; } ?>/> <?php _e( 'OBJECT' ); ?></td>
|
325 |
</tr>
|
326 |
|
327 |
<tr>
|
328 |
-
<th scope="row"><?php _e( 'Play HD' ); ?></th>
|
329 |
-
<td><input type="checkbox" name="youtube_embed_hd" value="1"<?php if ( $options[ 'hd' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Play the video in HD if possible' ); ?></span></td>
|
330 |
</tr>
|
331 |
|
332 |
<tr>
|
333 |
-
<th scope="row"><?php _e( 'Real-time Reactions' ); ?></th>
|
334 |
-
<td><input type="checkbox" name="youtube_embed_react" value="1"<?php if ( $options[ 'react' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show the Real-time Reactions button' ); ?></span></td>
|
335 |
</tr>
|
336 |
|
337 |
<tr>
|
338 |
-
<th scope="row"><?php _e( 'Sweet Spots' ); ?></th>
|
339 |
-
<td><input type="checkbox" name="youtube_embed_sweetspot" value="1"<?php if ( $options[ 'sweetspot' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Find sweet spots for the next and previous buttons' ); ?></span></td>
|
340 |
</tr>
|
341 |
</table>
|
342 |
|
343 |
<?php wp_nonce_field( 'youtube-embed-profile', 'youtube_embed_profile_nonce', true, true ); ?>
|
344 |
|
345 |
-
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings' ); ?>"/></p>
|
346 |
|
347 |
</form>
|
348 |
|
349 |
-
<div class="updated fade"><p><strong><?php _e( 'Would you like the video below to be yours? <a href="http://www.artiss.co.uk/
|
|
|
|
|
350 |
|
351 |
<a href="#" name="video"></a>
|
352 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-profile-options#video' ?>">
|
353 |
<div class="ytbox_grey">
|
354 |
-
<h3><?php _e( 'YouTube Video Sample' ); ?></h3>
|
355 |
-
<p><?php _e( '
|
356 |
-
<p><?php _e( 'Use the drop-down below to change which parameters the video uses - press the Change Video button to update it.' ); ?></p>
|
357 |
<p><select name="youtube_embed_video_type">
|
358 |
-
<option value="d"<?php if ( $video_type == "d" ) { echo " selected='selected'"; } ?>><?php _e( 'Standard' ); ?></option>
|
359 |
-
<option value="p"<?php if ( $video_type == "p" ) { echo " selected='selected'"; } ?>><?php _e( 'EmbedPlus' ); ?></option>
|
360 |
-
<option value="3"<?php if ( $video_type == "3" ) { echo " selected='selected'"; } ?>><?php _e( '3D' ); ?></option>
|
361 |
-
<option value="l"<?php if ( $video_type == "l" ) { echo " selected='selected'"; } ?>><?php _e( 'Playlist' ); ?></option>
|
362 |
</select>
|
363 |
<?php wp_nonce_field( 'youtube-embed-profile', 'youtube_embed_profile_nonce', true, true ); ?>
|
364 |
-
<input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video' ); ?>"/></p>
|
365 |
|
366 |
<p><?php
|
367 |
-
if ( $video_type == "d" ) { $id = '
|
368 |
if ( $video_type == "p" ) { $id = 'YVvn8dpSAt0'; $type = 'm'; }
|
369 |
if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; $type = ''; ; }
|
370 |
if ( $video_type == "l" ) { $id = '095393D5B42B2266'; $type = ''; }
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
?>
|
11 |
+
<div class="wrap">
|
12 |
+
|
13 |
+
<div style="width: 1010px;">
|
14 |
|
15 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
16 |
|
17 |
+
<h2><?php _e( 'Artiss YouTube Embed Profiles', 'youtube-embed' ); ?></h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
<?php
|
20 |
+
|
21 |
// Set current profile number
|
22 |
+
|
23 |
if ( isset( $_POST[ 'youtube_embed_profile_no' ] ) ) { $profile_no = $_POST[ 'youtube_embed_profile_no' ]; } else { $profile_no = 0; }
|
24 |
if ( $profile_no == '' ) { $profile_no = 0; }
|
25 |
|
26 |
// If options have been updated on screen, update the database
|
27 |
+
|
28 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-profile' , 'youtube_embed_profile_nonce' ) ) ) {
|
29 |
|
30 |
+
$options[ 'name' ] = $_POST[ 'youtube_embed_name' ];
|
31 |
+
$options[ 'type' ] = $_POST[ 'youtube_embed_type' ];
|
32 |
+
$options[ 'playlist' ] = $_POST[ 'youtube_embed_playlist' ];
|
33 |
$options[ 'width' ] = $_POST[ 'youtube_embed_width' ];
|
34 |
+
$options[ 'height' ] = $_POST[ 'youtube_embed_height' ];
|
35 |
|
36 |
+
$options[ 'template' ] = htmlspecialchars_decode( $_POST[ 'youtube_embed_template' ] );
|
37 |
if ( strpos( $options[ 'template' ], '%video%' ) === false ) { $options[ 'template' ] = '%video%'; }
|
38 |
|
39 |
+
$options[ 'style' ] = $_POST[ 'youtube_embed_style' ];
|
40 |
+
$options[ 'fullscreen' ] = $_POST[ 'youtube_embed_fullscreen' ];
|
41 |
+
$options[ 'autoplay'] = $_POST[ 'youtube_embed_autoplay' ];
|
42 |
+
$options[ 'loop'] = $_POST[ 'youtube_embed_loop' ];
|
43 |
+
$options[ 'cc'] = $_POST[ 'youtube_embed_cc' ];
|
44 |
+
$options[ 'annotation'] = $_POST[ 'youtube_embed_annotation' ];
|
45 |
+
$options[ 'related'] = $_POST[ 'youtube_embed_related' ];
|
46 |
+
$options[ 'info'] = $_POST[ 'youtube_embed_info' ];
|
47 |
+
$options[ 'link'] = $_POST[ 'youtube_embed_link' ];
|
48 |
+
$options[ 'react'] = $_POST[ 'youtube_embed_react' ];
|
49 |
+
$options[ 'sweetspot'] = $_POST[ 'youtube_embed_sweetspot' ];
|
50 |
+
$options[ 'disablekb'] = $_POST[ 'youtube_embed_disablekb' ];
|
51 |
+
$options[ 'autohide'] = $_POST[ 'youtube_embed_autohide' ];
|
52 |
+
$options[ 'controls'] = $_POST[ 'youtube_embed_controls' ];
|
53 |
+
$options[ 'fallback'] = $_POST[ 'youtube_embed_fallback' ];
|
54 |
+
$options[ 'wmode'] = $_POST[ 'youtube_embed_wmode' ];
|
55 |
+
$options[ 'audio'] = $_POST[ 'youtube_embed_audio' ];
|
56 |
+
$options[ 'hd'] = $_POST[ 'youtube_embed_hd' ];
|
57 |
+
$options[ 'color' ] = $_POST[ 'youtube_embed_color' ];
|
58 |
+
$options[ 'theme' ] = $_POST[ 'youtube_embed_theme' ];
|
59 |
+
$options[ 'https' ] = $_POST[ 'youtube_embed_https' ];
|
60 |
+
$options[ 'privacy' ] = $_POST[ 'youtube_embed_privacy' ];
|
61 |
+
$options[ 'modest' ] = $_POST[ 'youtube_embed_modest' ];
|
62 |
+
$options[ 'dynamic' ] = $_POST[ 'youtube_embed_dynamic' ];
|
63 |
+
$options[ 'fixed' ] = $_POST[ 'youtube_embed_fixed' ];
|
64 |
+
$options[ 'download' ] = $_POST[ 'youtube_embed_download' ];
|
65 |
+
$options[ 'download_style' ] = $_POST[ 'youtube_embed_download_style' ];
|
66 |
+
$options[ 'download_text' ] = str_replace( '\"', '"', str_replace( "\'", "'", $_POST[ 'youtube_embed_download_text' ] ) );
|
67 |
+
|
68 |
+
$default_size = $_POST[ 'youtube_embed_size' ];
|
69 |
|
70 |
if ( $default_size !== '' ) {
|
71 |
$options[ 'width' ] = ltrim( substr( $default_size, 0, 4 ), '0' );
|
72 |
$options[ 'height'] = ltrim( substr( $default_size, -4, 4 ), '0' );
|
73 |
}
|
74 |
|
75 |
+
// Set width or height, if missing
|
76 |
+
|
77 |
+
if ( ( $options[ 'width' ] == '' ) && ( $options[ 'height' ] == '' ) ) {
|
78 |
+
if ( isset( $GLOBALS[ 'content_width' ] ) ) {
|
79 |
+
$options[ 'width' ] = $GLOBALS[ 'content_width' ];
|
80 |
+
} else {
|
81 |
+
$options[ 'width' ] = 560;
|
82 |
+
}
|
83 |
+
$options[ 'height' ] = 27 + round( ( $options[ 'width' ] / 16 ) * 9, 0 );
|
84 |
+
}
|
85 |
+
if ( ( $options[ 'width' ] == '' ) && ( $options[ 'height' ] != '' ) ) {
|
86 |
+
$options[ 'width' ] = round( ( $options[ 'height' ] / 9 ) * 16, 0 );
|
87 |
+
}
|
88 |
+
if ( ( $options[ 'width' ] != '' ) && ( $options[ 'height' ] == '' ) ) {
|
89 |
+
$options[ 'height' ] = 27 + round( ( $options[ 'width' ] / 16 ) * 9, 0 );
|
90 |
+
}
|
91 |
|
92 |
update_option( 'youtube_embed_profile' . $profile_no, $options );
|
93 |
echo '<div class="updated fade"><p><strong>' . __( $options[ 'name' ].' Profile Saved.' ) . "</strong></p></div>\n";
|
96 |
}
|
97 |
|
98 |
// Video option button has been pressed
|
99 |
+
|
100 |
if ( !empty( $_POST[ 'Video' ] ) ) { $video_type = $_POST[ 'youtube_embed_video_type' ]; } else { $video_type = 'd'; }
|
101 |
|
102 |
// Fetch options into an array
|
103 |
+
|
104 |
$options = aye_set_profile_defaults( $profile_no );
|
105 |
$general = aye_set_general_defaults();
|
106 |
+
|
107 |
+
// Display ads
|
108 |
+
|
109 |
+
if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
110 |
?>
|
111 |
|
112 |
+
<div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
|
113 |
+
|
114 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-profile-options' ?>">
|
115 |
|
116 |
<span class="alignright">
|
117 |
<select name="youtube_embed_profile_no">
|
118 |
<?php aye_generate_profile_list( $profile_no, $general[ 'profile_no' ] ) ?>
|
119 |
</select>
|
120 |
+
<input type="submit" name="Profile" class="button-secondary" value="<?php _e( 'Change profile', 'youtube-embed' ); ?>"/>
|
121 |
</span><br/>
|
122 |
|
123 |
<?php
|
124 |
if ( $profile_no == '0' ) {
|
125 |
+
_e( 'These are the options for the default profile.', 'youtube-embed' );
|
126 |
} else {
|
127 |
+
sprintf( _e( 'These are the options for profile %s.', 'youtube-embed' ), $profile_no );
|
128 |
}
|
129 |
+
echo ' ' . __( 'Use the drop-down on the right hand side to swap between profiles.', 'youtube-embed' );
|
130 |
?>
|
131 |
|
132 |
<table class="form-table">
|
133 |
|
134 |
<tr>
|
135 |
+
<th scope="row"><?php _e( 'Profile name', 'youtube-embed' ); ?></th><td>
|
136 |
<input type="text" size="20" name="youtube_embed_name" value="<?php echo $options[ 'name' ]; ?>"<?php if ( $profile_no == 0 ) { echo ' readonly="readonly"'; } ?>/>
|
137 |
+
<?php if ( $profile_no != 0 ) { echo ' <span class="description">' . __( 'The name you wish to give this profile', 'youtube-embed' ) . '</span>'; } ?>
|
138 |
</td></tr>
|
139 |
|
140 |
<tr valign="top">
|
141 |
+
<th scope="row"><?php _e( 'Video Embed Type', 'youtube-embed' ); ?></th>
|
142 |
+
<td><span class="description"><?php _e( 'The type of player to use for videos.', 'youtube-embed' ); ?></span><br/>
|
143 |
+
<input type="radio" name="youtube_embed_type" value="v"<?php if ( $options[ 'type' ] == "v" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'IFRAME', 'youtube-embed' ); ?><span class="description"><?php echo ' ' . __( 'Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 player. This is the current YouTube default.', 'youtube-embed' ); ?></span><br/>
|
144 |
+
<input type="radio" name="youtube_embed_type" value="p"<?php if ( $options[ 'type' ] == "p" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'OBJECT', 'youtube-embed' ); ?><span class="description"><?php echo ' ' . __( 'Use the AS3 Flash player.', 'youtube-embed' ); ?></span><br/>
|
145 |
+
<input type="radio" name="youtube_embed_type" value="c"<?php if ( $options[ 'type' ] == "c" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'Chromeless', 'youtube-embed' ); ?><span class="description"><?php echo ' ' . __( 'Use the <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-chromeless">Chromeless</a> version of the AS3 Flash Player.', 'youtube-embed' ); ?></span><br/>
|
146 |
+
<input type="radio" name="youtube_embed_type" value="m"<?php if ( $options[ 'type' ] == "m" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'EmbedPlus', 'youtube-embed' ); ?><span class="description"><?php echo ' ' . __( 'Use <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus">EmbedPlus</a>, if Flash is available.', 'youtube-embed' ); ?></span>
|
147 |
</td>
|
148 |
</tr>
|
149 |
|
150 |
<tr valign="top">
|
151 |
+
<th scope="row"><?php _e( 'Playlist Embed Type', 'youtube-embed' ); ?></th>
|
152 |
+
<td><span class="description"><?php _e( 'The type of player to use when showing playlists.', 'youtube-embed' ); ?></span><br/>
|
153 |
+
<input type="radio" name="youtube_embed_playlist" value="v"<?php if ( $options[ 'playlist' ] == "v" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'IFRAME', 'youtube-embed' ); ?><br/>
|
154 |
+
<input type="radio" name="youtube_embed_playlist" value="o"<?php if ( $options[ 'playlist' ] == "o" ) { echo ' checked="checked"'; } ?>/><?php echo ' ' . __( 'OBJECT', 'youtube-embed' ); ?><br/>
|
155 |
</td>
|
156 |
</tr>
|
157 |
</table>
|
158 |
|
159 |
+
<br/><span class="yt_heading"><?php _e( 'Options For All Player Types', 'youtube-embed' ); ?></span>
|
160 |
|
161 |
<table class="form-table">
|
162 |
<tr>
|
163 |
+
<th scope="row"><?php _e( 'Template', 'youtube-embed' ); ?></th>
|
164 |
+
<td><input type="text" size="40" name="youtube_embed_template" value="<?php echo htmlspecialchars( $options[ 'template' ] ); ?>"/> <span class="description"><?php _e( 'Wrapper for video output. Must include <code>%video%</code> tag to show video position', 'youtube-embed' ); ?></span></td>
|
165 |
</tr>
|
166 |
|
167 |
<tr>
|
168 |
+
<th scope="row"><?php _e( 'Style', 'youtube-embed' ); ?></th>
|
169 |
+
<td><input type="text" size="40" name="youtube_embed_style" value="<?php echo htmlspecialchars( $options[ 'style' ] ); ?>"/> <span class="description"><?php _e( 'CSS elements to apply to video', 'youtube-embed' ); ?></span></td>
|
170 |
</tr>
|
171 |
</table>
|
172 |
|
173 |
<table class="form-table ytbox_grey">
|
174 |
<tr>
|
175 |
+
<th scope="row"><?php _e( 'Show Download Link', 'youtube-embed' ); ?></th>
|
176 |
+
<td><input type="checkbox" name="youtube_embed_download" value="1"<?php if ( $options[ 'download' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php echo sprintf( __( 'Show a link to %s under the video', 'youtube-embed' ), '<a href="http://www.videodownloadx.com/">Videodownloadx</a>' ); ?></span></td>
|
177 |
+
</tr>
|
178 |
+
|
179 |
+
<tr>
|
180 |
+
<th scope="row"><?php _e( 'Download Text', 'youtube-embed' ); ?></th>
|
181 |
+
<td><input type="text" size="40" name="youtube_embed_download_text" value="<?php echo htmlspecialchars( $options[ 'download_text' ] ); ?>"/> <span class="description"><?php _e( 'Text or HTML to display to prompt download', 'youtube-embed' ); ?></span></td>
|
182 |
+
</tr>
|
183 |
+
|
184 |
+
<tr>
|
185 |
+
<th scope="row"><?php _e( 'Download Style', 'youtube-embed' ); ?></th>
|
186 |
+
<td><input type="text" size="40" name="youtube_embed_download_style" value="<?php echo htmlspecialchars( $options[ 'download_style' ] ); ?>"/> <span class="description"><?php _e( 'CSS elements to apply to video download link', 'youtube-embed' ); ?></span></td>
|
187 |
+
</tr>
|
188 |
+
</table><br/>
|
189 |
+
|
190 |
+
<table class="form-table ytbox_grey">
|
191 |
+
<tr>
|
192 |
+
<th scope="row"><?php _e( 'Video size', 'youtube-embed' ); ?></th>
|
193 |
+
<td><input type="text" size="3" maxlength="3" name="youtube_embed_width" value="<?php echo $options[ 'width' ]; ?>"/> x <input type="text" size="3" maxlength="3" name="youtube_embed_height" value="<?php echo $options[ 'height' ]; ?>"/> <span class="description"><?php _e( 'The width x height of the video, in pixels', 'youtube-embed' ); ?></span></td>
|
194 |
</tr>
|
195 |
|
196 |
<tr valign="top">
|
197 |
+
<th scope="row"><?php _e( 'Default Sizes', 'youtube-embed' ); ?></th>
|
198 |
<td><select name="youtube_embed_size">
|
199 |
+
<option value=""<?php if ( $default_size == '' ) { echo " selected='selected'"; } ?>><?php _e( 'Use above sizes', 'youtube-embed' ); ?></option>
|
200 |
<option value="04800385"<?php if ( $default_size == "04800385" ) { echo " selected='selected'"; } ?>><?php echo '480x385 4:3'; ?></option>
|
201 |
<option value="05600340"<?php if ( $default_size == "05600340" ) { echo " selected='selected'"; } ?>><?php echo '560x340 16:9'; ?></option>
|
202 |
<option value="06400385"<?php if ( $default_size == "06400385" ) { echo " selected='selected'"; } ?>><?php echo '640x385 16:9'; ?></option>
|
203 |
<option value="08530505"<?php if ( $default_size == "08530505" ) { echo " selected='selected'"; } ?>><?php echo '853x505 16:9'; ?></option>
|
204 |
<option value="12800745"<?php if ( $default_size == "12800745" ) { echo " selected='selected'"; } ?>><?php echo '1280x745 16:9'; ?></option>
|
205 |
+
</select> <span class="description"><?php _e( 'Select one of these default sizes to override the above video sizes', 'youtube-embed' ); ?></span></td>
|
206 |
</tr>
|
207 |
|
208 |
<tr>
|
209 |
+
<th scope="row"><?php _e( 'Dynamically Resize', 'youtube-embed' ); ?></th>
|
210 |
+
<td><input type="checkbox" name="youtube_embed_dynamic" value="1"<?php if ( $options[ 'dynamic' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show full width and resize with the browser', 'youtube-embed' ); ?></span></td>
|
211 |
</tr>
|
212 |
|
213 |
<tr>
|
214 |
+
<th scope="row"> <?php _e( 'Set Maximum Size', 'youtube-embed' ); ?></th>
|
215 |
+
<td><input type="checkbox" name="youtube_embed_fixed" value="1"<?php if ( $options[ 'fixed' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Use above width to define maximum size', 'youtube-embed' ); ?></span></td>
|
216 |
</tr>
|
217 |
</table>
|
218 |
|
219 |
<table class="form-table">
|
220 |
|
221 |
<tr>
|
222 |
+
<th scope="row"><?php _e( 'Audio Only', 'youtube-embed' ); ?></th>
|
223 |
+
<td><input type="checkbox" name="youtube_embed_audio" value="1"<?php if ( $options[ 'audio' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Only show the toolbar for audio only playback', 'youtube-embed' ); ?></span></td>
|
224 |
</tr>
|
225 |
|
226 |
<tr>
|
227 |
+
<th scope="row"><?php _e( 'Autoplay', 'youtube-embed' ); ?></th>
|
228 |
+
<td><input type="checkbox" name="youtube_embed_autoplay" value="1"<?php if ( $options[ 'autoplay' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'The video will start playing when the player loads', 'youtube-embed' ); ?></span></td>
|
229 |
</tr>
|
230 |
|
231 |
</table>
|
232 |
|
233 |
+
<br/><span class="yt_heading"><?php _e( 'Options Not Supported by EmbedPlus', 'youtube-embed' ); ?></span>
|
234 |
|
235 |
<table class="form-table">
|
236 |
|
237 |
<tr>
|
238 |
+
<th scope="row"><?php _e( 'Auto hide', 'youtube-embed' ); ?></th>
|
239 |
<td><select name="youtube_embed_autohide">
|
240 |
+
<option value="0"<?php if ( $options[ 'autohide' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls & progress bar remain visible', 'youtube-embed' ); ?></option>
|
241 |
+
<option value="1"<?php if ( $options[ 'autohide' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls & progress bar fade out', 'youtube-embed' ); ?></option>
|
242 |
+
<option value="2"<?php if ( $options[ 'autohide' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e( 'Progress bar fades', 'youtube-embed' ); ?></option>
|
243 |
+
</select> <span class="description"><?php _e( 'Video controls will automatically hide after a video begins playing', 'youtube-embed' ); ?></span></td>
|
244 |
</tr>
|
245 |
|
246 |
<tr>
|
247 |
+
<th scope="row"><?php _e( 'Controls', 'youtube-embed' ); ?></th>
|
248 |
+
<td><select name="youtube_embed_controls">
|
249 |
+
<option value="0"<?php if ( $options[ 'controls' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls do not display & Flash player loads immediately', 'youtube-embed' ); ?></option>
|
250 |
+
<option value="1"<?php if ( $options[ 'controls' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls display & Flash player loads immediately', 'youtube-embed' ); ?></option>
|
251 |
+
<option value="2"<?php if ( $options[ 'controls' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls display & Flash player loads once video starts', 'youtube-embed' ); ?></option>
|
252 |
+
</select> <span class="description"><?php _e( 'Whether the video player controls will display. For AS3 player it also defines when the Flash player will load', 'youtube-embed' ); ?></span></td>
|
253 |
</tr>
|
254 |
|
255 |
<tr>
|
256 |
+
<th scope="row">SSL</th>
|
257 |
+
<td><input type="checkbox" name="youtube_embed_https" value="1"<?php if ( $options[ 'https' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Use SSL? <a href="http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS">Read more</a>', 'youtube-embed' ); ?></span></td>
|
258 |
</tr>
|
259 |
|
260 |
<tr>
|
261 |
+
<th scope="row"><?php _e( 'Loop Video', 'youtube-embed' ); ?></th>
|
262 |
+
<td><input type="checkbox" name="youtube_embed_loop" value="1"<?php if ( $options[ 'loop' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Play the initial video again and again. In the case of a playlist, this will play the entire playlist and then start again at the first video', 'youtube-embed' ); ?></span></td>
|
263 |
</tr>
|
264 |
|
265 |
<tr>
|
266 |
+
<th scope="row"><?php _e( 'Information', 'youtube-embed' ); ?></th>
|
267 |
+
<td><input type="checkbox" name="youtube_embed_info" value="1"<?php if ( $options[ 'info' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Display the video title and uploader before the video starts. If displaying a playlist this will show video thumbnails', 'youtube-embed' ); ?></span></td>
|
268 |
</tr>
|
269 |
|
270 |
<tr>
|
271 |
+
<th scope="row"><?php _e( 'Related Videos', 'youtube-embed' ); ?></th>
|
272 |
+
<td><input type="checkbox" name="youtube_embed_related" value="1"<?php if ( $options[ 'related' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Load related videos once playback starts. Also toggles the search option.', 'youtube-embed' ); ?></span></td>
|
|
|
|
|
|
|
273 |
</tr>
|
|
|
|
|
|
|
|
|
274 |
|
|
|
275 |
<tr>
|
276 |
+
<th scope="row"><?php _e( 'Theme', 'youtube-embed' ); ?></th>
|
277 |
+
<td><select name="youtube_embed_theme">
|
278 |
+
<option value="dark"<?php if ( $options[ 'theme' ] == "dark" ) { echo " selected='selected'"; } ?>><?php _e( 'Dark', 'youtube-embed' ); ?></option>
|
279 |
+
<option value="light"<?php if ( $options[ 'theme' ] == "light" ) { echo " selected='selected'"; } ?>><?php _e( 'Light', 'youtube-embed' ); ?></option>
|
280 |
+
</select> <span class="description"><?php _e( 'Display player controls within a dark or light control bar', 'youtube-embed' ); ?></span></td>
|
281 |
</tr>
|
282 |
|
283 |
<tr>
|
284 |
+
<th scope="row"><?php _e( 'Progress Bar Colour', 'youtube-embed' ); ?></th>
|
285 |
+
<td><select name="youtube_embed_color">
|
286 |
+
<option value="red"<?php if ( $options[ 'color' ] == "red" ) { echo " selected='selected'"; } ?>><?php _e( 'Red', 'youtube-embed' ); ?></option>
|
287 |
+
<option value="white"<?php if ( $options[ 'color' ] == "white" ) { echo " selected='selected'"; } ?>><?php _e( 'White (desaturated)', 'youtube-embed' ); ?></option>
|
288 |
+
</select> <span class="description"><?php _e( 'The colour that will be used in the player\'s video progress bar to highlight the amount of the video that\'s already been seen', 'youtube-embed' ); ?></span></td>
|
289 |
</tr>
|
290 |
|
291 |
<tr>
|
292 |
+
<th scope="row"><?php _e( 'Modest Branding', 'youtube-embed' ); ?></th>
|
293 |
+
<td><input type="checkbox" name="youtube_embed_modest" value="1"<?php if ( $options[ 'modest' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Reduce branding on video.', 'youtube-embed' ); ?></span></td>
|
294 |
</tr>
|
295 |
|
296 |
+
</table>
|
297 |
+
|
298 |
+
<br/><span class="yt_heading"><?php _e( 'Options for AS3 Player', 'youtube-embed' ); ?></span>
|
299 |
+
<br/><br/><?php _e( 'The following options are not supported if using EmbedPlus or if the IFRAME player uses HTML5.' ); ?>
|
300 |
+
|
301 |
+
<table class="form-table">
|
302 |
<tr>
|
303 |
+
<th scope="row"><?php _e( 'Annotations', 'youtube-embed' ); ?></th>
|
304 |
+
<td><input type="checkbox" name="youtube_embed_annotation" value="1"<?php if ( $options[ 'annotation' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Video annotations are shown by default', 'youtube-embed' ); ?></span></td>
|
305 |
</tr>
|
306 |
|
307 |
<tr>
|
308 |
+
<th scope="row"><?php _e( 'Closed Captions', 'youtube-embed' ); ?></th>
|
309 |
+
<td><input type="checkbox" name="youtube_embed_cc" value="1"<?php if ( $options[ 'cc' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show closed captions (subtitles) by default, even if the user has turned captions off', 'youtube-embed' ); ?></span></td>
|
310 |
</tr>
|
311 |
|
312 |
<tr>
|
313 |
+
<th scope="row"><?php _e( 'Disable Keyboard', 'youtube-embed' ); ?></th>
|
314 |
+
<td><input type="checkbox" name="youtube_embed_disablekb" value="1"<?php if ( $options[ 'disablekb' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Disable the player keyboard controls', 'youtube-embed' ); ?></span></td>
|
315 |
</tr>
|
316 |
|
317 |
<tr>
|
318 |
+
<th scope="row"><?php _e( 'Fullscreen', 'youtube-embed' ); ?></th>
|
319 |
+
<td><input type="checkbox" name="youtube_embed_fullscreen" value="1"<?php if ( $options[ 'fullscreen' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'A button will allow the viewer to watch the video fullscreen', 'youtube-embed' ); ?></span></td>
|
|
|
|
|
|
|
320 |
</tr>
|
321 |
|
322 |
<tr>
|
323 |
+
<th scope="row"><?php _e( 'Link to YouTube', 'youtube-embed' ); ?></th>
|
324 |
+
<td><input type="checkbox" name="youtube_embed_link" value="1"<?php if ( $options[ 'link' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Video links back to YouTube when clicked', 'youtube-embed' ); ?></span></td>
|
325 |
</tr>
|
326 |
+
|
327 |
</table>
|
328 |
|
329 |
+
<br/><span class="yt_heading"><?php _e( 'Options Not Supported by HTML5 Player', 'youtube-embed' ); ?></span>
|
330 |
|
331 |
<table class="form-table">
|
332 |
<tr valign="top">
|
333 |
+
<th scope="row"><?php _e( 'Window Mode', 'youtube-embed' ); ?></th>
|
334 |
<td><select name="youtube_embed_wmode">
|
335 |
+
<option value="opaque"<?php if ( $options[ 'wmode' ] == "opaque" ) { echo " selected='selected'"; } ?>><?php _e( 'Opaque', 'youtube-embed' ); ?></option>
|
336 |
+
<option value="transparent"<?php if ( $options[ 'wmode' ] == "transparent" ) { echo " selected='selected'"; } ?>><?php _e( 'Transparent', 'youtube-embed' ); ?></option>
|
337 |
+
<option value="window"<?php if ( $options[ 'wmode' ] == "window" ) { echo " selected='selected'"; } ?>><?php _e( 'Window', 'youtube-embed' ); ?></option>
|
338 |
+
</select><span class="description"><?php _e( 'Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. <a href="http://www.communitymx.com/content/article.cfm?cid=e5141">Learn more</a>.', 'youtube-embed' ); ?></span></td>
|
339 |
</tr>
|
340 |
|
341 |
</table>
|
342 |
|
343 |
+
<br/><span class="yt_heading"><?php _e( 'Options Only Supported By EmbedPlus', 'youtube-embed' ); ?></span> <span class="description"><?php echo '<a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus">' . __( 'Learn more about EmbedPlus', 'youtube-embed' ) . '</a>'; ?></span>
|
344 |
|
345 |
<table class="form-table">
|
346 |
<tr valign="top">
|
347 |
+
<th scope="row"><?php _e( 'Fallback Embed Type', 'youtube-embed' ); ?></th>
|
348 |
+
<td><span class="description"><?php _e( 'The type of player to use if Flash is not available and EmbedPlus cannot be used.', 'youtube-embed' ); ?></span><br/>
|
349 |
+
<input type="radio" name="youtube_embed_fallback" value="v"<?php if ( $options[ 'fallback' ] == "v" ) { echo ' checked="checked"'; } ?>/> <?php _e( 'IFRAME', 'youtube-embed' ); ?><br/>
|
350 |
+
<input type="radio" name="youtube_embed_fallback" value="p"<?php if ( $options[ 'fallback' ] == "p" ) { echo ' checked="checked"'; } ?>/> <?php _e( 'OBJECT', 'youtube-embed' ); ?></td>
|
351 |
</tr>
|
352 |
|
353 |
<tr>
|
354 |
+
<th scope="row"><?php _e( 'Play HD', 'youtube-embed' ); ?></th>
|
355 |
+
<td><input type="checkbox" name="youtube_embed_hd" value="1"<?php if ( $options[ 'hd' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Play the video in HD if possible', 'youtube-embed' ); ?></span></td>
|
356 |
</tr>
|
357 |
|
358 |
<tr>
|
359 |
+
<th scope="row"><?php _e( 'Real-time Reactions', 'youtube-embed' ); ?></th>
|
360 |
+
<td><input type="checkbox" name="youtube_embed_react" value="1"<?php if ( $options[ 'react' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Show the Real-time Reactions button', 'youtube-embed' ); ?></span></td>
|
361 |
</tr>
|
362 |
|
363 |
<tr>
|
364 |
+
<th scope="row"><?php _e( 'Sweet Spots', 'youtube-embed' ); ?></th>
|
365 |
+
<td><input type="checkbox" name="youtube_embed_sweetspot" value="1"<?php if ( $options[ 'sweetspot' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Find sweet spots for the next and previous buttons', 'youtube-embed' ); ?></span></td>
|
366 |
</tr>
|
367 |
</table>
|
368 |
|
369 |
<?php wp_nonce_field( 'youtube-embed-profile', 'youtube_embed_profile_nonce', true, true ); ?>
|
370 |
|
371 |
+
<p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings', 'youtube-embed' ); ?>"/></p>
|
372 |
|
373 |
</form>
|
374 |
|
375 |
+
<div class="updated fade"><p><strong><?php _e( 'Would you like the video below to be yours? <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-sponsorship">Click here</a> for sponsorship information.', 'youtube-embed' ); ?></strong></p></div>
|
376 |
+
|
377 |
+
</div>
|
378 |
|
379 |
<a href="#" name="video"></a>
|
380 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-profile-options#video' ?>">
|
381 |
<div class="ytbox_grey">
|
382 |
+
<h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
|
383 |
+
<p><?php _e( 'The video below uses the above, saved profile settings. Use the drop-down below to change which parameters the video uses - press the Change Video button to update it.', 'youtube-embed' ); ?></p>
|
|
|
384 |
<p><select name="youtube_embed_video_type">
|
385 |
+
<option value="d"<?php if ( $video_type == "d" ) { echo " selected='selected'"; } ?>><?php _e( 'Standard', 'youtube-embed' ); ?></option>
|
386 |
+
<option value="p"<?php if ( $video_type == "p" ) { echo " selected='selected'"; } ?>><?php _e( 'EmbedPlus', 'youtube-embed' ); ?></option>
|
387 |
+
<option value="3"<?php if ( $video_type == "3" ) { echo " selected='selected'"; } ?>><?php _e( '3D', 'youtube-embed' ); ?></option>
|
388 |
+
<option value="l"<?php if ( $video_type == "l" ) { echo " selected='selected'"; } ?>><?php _e( 'Playlist', 'youtube-embed' ); ?></option>
|
389 |
</select>
|
390 |
<?php wp_nonce_field( 'youtube-embed-profile', 'youtube_embed_profile_nonce', true, true ); ?>
|
391 |
+
<input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video', 'youtube-embed' ); ?>"/></p>
|
392 |
|
393 |
<p><?php
|
394 |
+
if ( $video_type == "d" ) { $id = 'Vlw7tM7UySk'; $type = ''; }
|
395 |
if ( $video_type == "p" ) { $id = 'YVvn8dpSAt0'; $type = 'm'; }
|
396 |
if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; $type = ''; ; }
|
397 |
if ( $video_type == "l" ) { $id = '095393D5B42B2266'; $type = ''; }
|
includes/aye-options-widgets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// Set default options
|
4 |
|
5 |
-
$default = array( 'titles' => 'YouTube', '
|
6 |
$instance = wp_parse_args( ( array ) $instance, $default );
|
7 |
$general = aye_set_general_defaults();
|
8 |
|
@@ -10,19 +10,13 @@ $general = aye_set_general_defaults();
|
|
10 |
|
11 |
$field_id = $this -> get_field_id( 'titles' );
|
12 |
$field_name = $this -> get_field_name( 'titles' );
|
13 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Widget Title' ) . ': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'titles' ] ).'" /></p>';
|
14 |
-
|
15 |
-
// Video Title field
|
16 |
-
|
17 |
-
$field_id = $this -> get_field_id( 'video_title' );
|
18 |
-
$field_name = $this -> get_field_name( 'video_title' );
|
19 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Video Title' ) . ': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'video_title' ] ).'" /></p>';
|
20 |
|
21 |
// Video ID field
|
22 |
|
23 |
$field_id = $this -> get_field_id( 'id' );
|
24 |
$field_name = $this -> get_field_name( 'id' );
|
25 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Video ID' ) . ': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'id' ] ) . '" /></p>';
|
26 |
|
27 |
echo "<table>\n";
|
28 |
|
@@ -30,13 +24,13 @@ echo "<table>\n";
|
|
30 |
|
31 |
$field_id = $this -> get_field_id( 'id_type' );
|
32 |
$field_name = $this -> get_field_name( 'id_type' );
|
33 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'ID Type' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value="v"';
|
34 |
if ( attribute_escape( $instance[ 'id_type' ] ) == 'v' ) { echo " selected='selected'"; }
|
35 |
-
echo '>' . __( 'Video or Playlist' ) . '</option><option value="s"';
|
36 |
if ( attribute_escape( $instance[ 'id_type' ] ) == 's' ) { echo " selected='selected'"; }
|
37 |
-
echo '>' . __( 'Search' ) . '</option><option value="u"';
|
38 |
if ( attribute_escape( $instance[ 'id_type' ] ) == 'u' ) { echo " selected='selected'"; }
|
39 |
-
echo '>' . __( 'User' ) . '</option></select></td></tr>';
|
40 |
|
41 |
echo "</table>\n";
|
42 |
|
@@ -44,7 +38,7 @@ echo "</table>\n";
|
|
44 |
|
45 |
$field_id = $this -> get_field_id( 'profile' );
|
46 |
$field_name = $this -> get_field_name( 'profile' );
|
47 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Profile' ) . ': </label><select name="' . $field_name . '" class="widefat" id="' . $field_id . '">';
|
48 |
aye_generate_profile_list( attribute_escape( $instance[ 'profile' ] ), $general[ 'profile_no' ] );
|
49 |
echo '</select></p>';
|
50 |
|
@@ -52,19 +46,19 @@ echo '</select></p>';
|
|
52 |
|
53 |
$field_id = $this -> get_field_id( 'template' );
|
54 |
$field_name = $this -> get_field_name( 'template' );
|
55 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">'.__( 'Template' ).': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'template' ] ) . '" /></p>';
|
56 |
|
57 |
// Style
|
58 |
|
59 |
$field_id = $this -> get_field_id( 'style' );
|
60 |
$field_name = $this -> get_field_name( 'style' );
|
61 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">'.__( 'Style' ).': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'style' ] ) . '" /></p>';
|
62 |
|
63 |
// Size fields
|
64 |
|
65 |
$field_id = $this -> get_field_id( 'width' );
|
66 |
$field_name = $this -> get_field_name( 'width' );
|
67 |
-
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Size' ) . ': </label><input type="text" size="3" maxlength="3" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'width' ] ) . '" /> x ';
|
68 |
|
69 |
$field_id = $this -> get_field_id( 'height' );
|
70 |
$field_name = $this -> get_field_name( 'height' );
|
@@ -76,58 +70,58 @@ echo "<table>\n";
|
|
76 |
|
77 |
$field_id = $this -> get_field_id( 'dynamic' );
|
78 |
$field_name = $this -> get_field_name( 'dynamic' );
|
79 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'Dynamically Resize' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
80 |
if ( attribute_escape( $instance[ 'dynamic' ] ) == '' ) { echo " selected='selected'"; }
|
81 |
-
echo '>' . __( 'Profile default' ) . '</option><option value="0"';
|
82 |
if ( attribute_escape( $instance[ 'dynamic' ] ) == '0' ) { echo " selected='selected'"; }
|
83 |
-
echo '>' . __( 'No' ) . '</option><option value="1"';
|
84 |
if ( attribute_escape( $instance[ 'dynamic' ] ) == '1' ) { echo " selected='selected'"; }
|
85 |
-
echo '>' . __( 'Yes' ) . '</option></select></td></tr>';
|
86 |
|
87 |
// Embed type field
|
88 |
|
89 |
$field_id = $this -> get_field_id( 'type' );
|
90 |
$field_name = $this -> get_field_name( 'type' );
|
91 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'Embed Type' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
92 |
if ( attribute_escape( $instance[ 'type' ] ) == '' ) { echo " selected='selected'"; }
|
93 |
-
echo '>' . __( 'Profile default' ) . '</option><option value="v"';
|
94 |
if ( attribute_escape( $instance[ 'type' ] ) == 'v' ) { echo " selected='selected'"; }
|
95 |
-
echo '>' . __( 'IFRAME' ) . '</option><option value="p"';
|
96 |
if ( attribute_escape( $instance[ 'type' ] ) == 'p' ) { echo " selected='selected'"; }
|
97 |
-
echo '>' . __( 'OBJECT' ) . '</option><option value="m"';
|
98 |
if ( attribute_escape( $instance[ 'type' ] ) == 'c' ) { echo " selected='selected'"; }
|
99 |
-
echo '>' . __( 'Chromeless' ) . '</option><option value="c"';
|
100 |
if ( attribute_escape( $instance[ 'type' ] ) == 'm' ) { echo " selected='selected'"; }
|
101 |
-
echo '>' . __( 'EmbedPlus' ) . '</option></select></td></tr>';
|
102 |
|
103 |
// Autoplay field
|
104 |
|
105 |
$field_id = $this -> get_field_id( 'autoplay' );
|
106 |
$field_name = $this -> get_field_name( 'autoplay' );
|
107 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'Autoplay' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
108 |
if ( attribute_escape( $instance[ 'autoplay' ] ) == '' ) { echo " selected='selected'"; }
|
109 |
-
echo '>' . __( 'Profile default' ) . '</option><option value="0"';
|
110 |
if ( attribute_escape( $instance[ 'autoplay' ] ) == '0' ) { echo " selected='selected'"; }
|
111 |
-
echo '>' . __( 'No' ) . '</option><option value="1"';
|
112 |
if ( attribute_escape( $instance[ 'autoplay' ] ) == '1' ) { echo " selected='selected'"; }
|
113 |
-
echo '>' . __( 'Yes' ) . '</option></select></td></tr>';
|
114 |
|
115 |
// Start field
|
116 |
|
117 |
$field_id = $this -> get_field_id( 'start' );
|
118 |
$field_name = $this -> get_field_name( 'start' );
|
119 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'Start (seconds)' ) . '</td><td><input type="text" size="3" maxlength="3" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'start' ] ) . '" /></td></tr>';
|
120 |
|
121 |
// Stop field
|
122 |
|
123 |
$field_id = $this -> get_field_id( 'stop' );
|
124 |
$field_name = $this -> get_field_name( 'stop' );
|
125 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'Stop (seconds)' ) . '</td><td><input type="text" size="3" maxlength="3" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'stop' ] ) . '" /></td></tr>';
|
126 |
|
127 |
echo "</table>\n";
|
128 |
|
129 |
?>
|
130 |
-
<h4><?php _e( 'Non-EmbedPlus Options' ); ?></h4>
|
131 |
<?php
|
132 |
|
133 |
echo "<table>\n";
|
@@ -136,27 +130,27 @@ echo "<table>\n";
|
|
136 |
|
137 |
$field_id = $this -> get_field_id( 'list' );
|
138 |
$field_name = $this -> get_field_name( 'list' );
|
139 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'List Playback' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
140 |
if ( attribute_escape( $instance[ 'list' ] ) == '' ) { echo " selected='selected'"; }
|
141 |
-
echo '>' . __( 'Profile default' ) . '</option><option value="order"';
|
142 |
if ( attribute_escape( $instance[ 'list' ] ) == 'order' ) { echo " selected='selected'"; }
|
143 |
-
echo '>' . __( 'Play each video in order' ) . '</option><option value="random"';
|
144 |
if ( attribute_escape( $instance[ 'list' ] ) == 'random' ) { echo " selected='selected'"; }
|
145 |
-
echo '>' . __( 'Play videos randomly' ) . '</option><option value="single"';
|
146 |
if ( attribute_escape( $instance[ 'list' ] ) == 'single' ) { echo " selected='selected'"; }
|
147 |
-
echo '>' . __( 'Play one random video' ) . '</option></select></td></tr>';
|
148 |
|
149 |
// Loop video field
|
150 |
|
151 |
$field_id = $this -> get_field_id( 'loop' );
|
152 |
$field_name = $this -> get_field_name( 'loop' );
|
153 |
-
echo "\r\n" . '<tr><td width="100%">' . __( 'Loop Video' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
154 |
if ( attribute_escape( $instance[ 'loop' ] ) == '' ) { echo " selected='selected'"; }
|
155 |
-
echo '>' . __( 'Profile default' ) . '</option><option value="0"';
|
156 |
if ( attribute_escape( $instance[ 'loop' ] ) == '0' ) { echo " selected='selected'"; }
|
157 |
-
echo '>' . __( 'No' ) . '</option><option value="1"';
|
158 |
if ( attribute_escape( $instance[ 'loop' ] ) == '1' ) { echo " selected='selected'"; }
|
159 |
-
echo '>' . __( 'Yes' ) . '</option></select></td></tr>';
|
160 |
|
161 |
echo "</table>\n";
|
162 |
?>
|
2 |
|
3 |
// Set default options
|
4 |
|
5 |
+
$default = array( 'titles' => 'YouTube', 'id' => '', 'profile' => '', 'type' => '', 'template' => '', 'style' => '', 'start' => '', 'autoplay' => '', 'width' => '', 'height' => '', 'dynamic' => '', 'list' => '', 'loop' => '', 'stop' => '', 'id_type' => 'v' );
|
6 |
$instance = wp_parse_args( ( array ) $instance, $default );
|
7 |
$general = aye_set_general_defaults();
|
8 |
|
10 |
|
11 |
$field_id = $this -> get_field_id( 'titles' );
|
12 |
$field_name = $this -> get_field_name( 'titles' );
|
13 |
+
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Widget Title', 'youtube-embed' ) . ': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'titles' ] ).'" /></p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
// Video ID field
|
16 |
|
17 |
$field_id = $this -> get_field_id( 'id' );
|
18 |
$field_name = $this -> get_field_name( 'id' );
|
19 |
+
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Video ID', 'youtube-embed' ) . ': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'id' ] ) . '" /></p>';
|
20 |
|
21 |
echo "<table>\n";
|
22 |
|
24 |
|
25 |
$field_id = $this -> get_field_id( 'id_type' );
|
26 |
$field_name = $this -> get_field_name( 'id_type' );
|
27 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'ID Type', 'youtube-embed' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value="v"';
|
28 |
if ( attribute_escape( $instance[ 'id_type' ] ) == 'v' ) { echo " selected='selected'"; }
|
29 |
+
echo '>' . __( 'Video or Playlist', 'youtube-embed' ) . '</option><option value="s"';
|
30 |
if ( attribute_escape( $instance[ 'id_type' ] ) == 's' ) { echo " selected='selected'"; }
|
31 |
+
echo '>' . __( 'Search', 'youtube-embed' ) . '</option><option value="u"';
|
32 |
if ( attribute_escape( $instance[ 'id_type' ] ) == 'u' ) { echo " selected='selected'"; }
|
33 |
+
echo '>' . __( 'User', 'youtube-embed' ) . '</option></select></td></tr>';
|
34 |
|
35 |
echo "</table>\n";
|
36 |
|
38 |
|
39 |
$field_id = $this -> get_field_id( 'profile' );
|
40 |
$field_name = $this -> get_field_name( 'profile' );
|
41 |
+
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Profile', 'youtube-embed' ) . ': </label><select name="' . $field_name . '" class="widefat" id="' . $field_id . '">';
|
42 |
aye_generate_profile_list( attribute_escape( $instance[ 'profile' ] ), $general[ 'profile_no' ] );
|
43 |
echo '</select></p>';
|
44 |
|
46 |
|
47 |
$field_id = $this -> get_field_id( 'template' );
|
48 |
$field_name = $this -> get_field_name( 'template' );
|
49 |
+
echo "\r\n" . '<p><label for="' . $field_id . '">'.__( 'Template', 'youtube-embed' ).': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'template' ] ) . '" /></p>';
|
50 |
|
51 |
// Style
|
52 |
|
53 |
$field_id = $this -> get_field_id( 'style' );
|
54 |
$field_name = $this -> get_field_name( 'style' );
|
55 |
+
echo "\r\n" . '<p><label for="' . $field_id . '">'.__( 'Style', 'youtube-embed' ).': </label><input type="text" class="widefat" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'style' ] ) . '" /></p>';
|
56 |
|
57 |
// Size fields
|
58 |
|
59 |
$field_id = $this -> get_field_id( 'width' );
|
60 |
$field_name = $this -> get_field_name( 'width' );
|
61 |
+
echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Size', 'youtube-embed' ) . ': </label><input type="text" size="3" maxlength="3" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'width' ] ) . '" /> x ';
|
62 |
|
63 |
$field_id = $this -> get_field_id( 'height' );
|
64 |
$field_name = $this -> get_field_name( 'height' );
|
70 |
|
71 |
$field_id = $this -> get_field_id( 'dynamic' );
|
72 |
$field_name = $this -> get_field_name( 'dynamic' );
|
73 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'Dynamically Resize', 'youtube-embed' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
74 |
if ( attribute_escape( $instance[ 'dynamic' ] ) == '' ) { echo " selected='selected'"; }
|
75 |
+
echo '>' . __( 'Profile default', 'youtube-embed' ) . '</option><option value="0"';
|
76 |
if ( attribute_escape( $instance[ 'dynamic' ] ) == '0' ) { echo " selected='selected'"; }
|
77 |
+
echo '>' . __( 'No', 'youtube-embed' ) . '</option><option value="1"';
|
78 |
if ( attribute_escape( $instance[ 'dynamic' ] ) == '1' ) { echo " selected='selected'"; }
|
79 |
+
echo '>' . __( 'Yes', 'youtube-embed' ) . '</option></select></td></tr>';
|
80 |
|
81 |
// Embed type field
|
82 |
|
83 |
$field_id = $this -> get_field_id( 'type' );
|
84 |
$field_name = $this -> get_field_name( 'type' );
|
85 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'Embed Type', 'youtube-embed' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
86 |
if ( attribute_escape( $instance[ 'type' ] ) == '' ) { echo " selected='selected'"; }
|
87 |
+
echo '>' . __( 'Profile default', 'youtube-embed' ) . '</option><option value="v"';
|
88 |
if ( attribute_escape( $instance[ 'type' ] ) == 'v' ) { echo " selected='selected'"; }
|
89 |
+
echo '>' . __( 'IFRAME', 'youtube-embed' ) . '</option><option value="p"';
|
90 |
if ( attribute_escape( $instance[ 'type' ] ) == 'p' ) { echo " selected='selected'"; }
|
91 |
+
echo '>' . __( 'OBJECT', 'youtube-embed' ) . '</option><option value="m"';
|
92 |
if ( attribute_escape( $instance[ 'type' ] ) == 'c' ) { echo " selected='selected'"; }
|
93 |
+
echo '>' . __( 'Chromeless', 'youtube-embed' ) . '</option><option value="c"';
|
94 |
if ( attribute_escape( $instance[ 'type' ] ) == 'm' ) { echo " selected='selected'"; }
|
95 |
+
echo '>' . __( 'EmbedPlus', 'youtube-embed' ) . '</option></select></td></tr>';
|
96 |
|
97 |
// Autoplay field
|
98 |
|
99 |
$field_id = $this -> get_field_id( 'autoplay' );
|
100 |
$field_name = $this -> get_field_name( 'autoplay' );
|
101 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'Autoplay', 'youtube-embed' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
102 |
if ( attribute_escape( $instance[ 'autoplay' ] ) == '' ) { echo " selected='selected'"; }
|
103 |
+
echo '>' . __( 'Profile default', 'youtube-embed' ) . '</option><option value="0"';
|
104 |
if ( attribute_escape( $instance[ 'autoplay' ] ) == '0' ) { echo " selected='selected'"; }
|
105 |
+
echo '>' . __( 'No', 'youtube-embed' ) . '</option><option value="1"';
|
106 |
if ( attribute_escape( $instance[ 'autoplay' ] ) == '1' ) { echo " selected='selected'"; }
|
107 |
+
echo '>' . __( 'Yes', 'youtube-embed' ) . '</option></select></td></tr>';
|
108 |
|
109 |
// Start field
|
110 |
|
111 |
$field_id = $this -> get_field_id( 'start' );
|
112 |
$field_name = $this -> get_field_name( 'start' );
|
113 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'Start (seconds)', 'youtube-embed' ) . '</td><td><input type="text" size="3" maxlength="3" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'start' ] ) . '" /></td></tr>';
|
114 |
|
115 |
// Stop field
|
116 |
|
117 |
$field_id = $this -> get_field_id( 'stop' );
|
118 |
$field_name = $this -> get_field_name( 'stop' );
|
119 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'Stop (seconds)', 'youtube-embed' ) . '</td><td><input type="text" size="3" maxlength="3" id="' . $field_id . '" name="' . $field_name . '" value="' . attribute_escape( $instance[ 'stop' ] ) . '" /></td></tr>';
|
120 |
|
121 |
echo "</table>\n";
|
122 |
|
123 |
?>
|
124 |
+
<h4><?php _e( 'Non-EmbedPlus Options', 'youtube-embed' ); ?></h4>
|
125 |
<?php
|
126 |
|
127 |
echo "<table>\n";
|
130 |
|
131 |
$field_id = $this -> get_field_id( 'list' );
|
132 |
$field_name = $this -> get_field_name( 'list' );
|
133 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'List Playback', 'youtube-embed' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
134 |
if ( attribute_escape( $instance[ 'list' ] ) == '' ) { echo " selected='selected'"; }
|
135 |
+
echo '>' . __( 'Profile default', 'youtube-embed' ) . '</option><option value="order"';
|
136 |
if ( attribute_escape( $instance[ 'list' ] ) == 'order' ) { echo " selected='selected'"; }
|
137 |
+
echo '>' . __( 'Play each video in order', 'youtube-embed' ) . '</option><option value="random"';
|
138 |
if ( attribute_escape( $instance[ 'list' ] ) == 'random' ) { echo " selected='selected'"; }
|
139 |
+
echo '>' . __( 'Play videos randomly', 'youtube-embed' ) . '</option><option value="single"';
|
140 |
if ( attribute_escape( $instance[ 'list' ] ) == 'single' ) { echo " selected='selected'"; }
|
141 |
+
echo '>' . __( 'Play one random video', 'youtube-embed' ) . '</option></select></td></tr>';
|
142 |
|
143 |
// Loop video field
|
144 |
|
145 |
$field_id = $this -> get_field_id( 'loop' );
|
146 |
$field_name = $this -> get_field_name( 'loop' );
|
147 |
+
echo "\r\n" . '<tr><td width="100%">' . __( 'Loop Video', 'youtube-embed' ) . '</td><td><select name="' . $field_name . '" id="' . $field_id . '"><option value=""';
|
148 |
if ( attribute_escape( $instance[ 'loop' ] ) == '' ) { echo " selected='selected'"; }
|
149 |
+
echo '>' . __( 'Profile default', 'youtube-embed' ) . '</option><option value="0"';
|
150 |
if ( attribute_escape( $instance[ 'loop' ] ) == '0' ) { echo " selected='selected'"; }
|
151 |
+
echo '>' . __( 'No', 'youtube-embed' ) . '</option><option value="1"';
|
152 |
if ( attribute_escape( $instance[ 'loop' ] ) == '1' ) { echo " selected='selected'"; }
|
153 |
+
echo '>' . __( 'Yes', 'youtube-embed' ) . '</option></select></td></tr>';
|
154 |
|
155 |
echo "</table>\n";
|
156 |
?>
|
includes/aye-set-defaults.php
CHANGED
@@ -7,6 +7,14 @@
|
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* Function to set Shortcode option
|
12 |
*
|
@@ -53,6 +61,31 @@ function aye_set_url_option() {
|
|
53 |
return $url;
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
/**
|
57 |
* Function to set general YouTube options
|
58 |
*
|
@@ -64,32 +97,34 @@ function aye_set_url_option() {
|
|
64 |
*/
|
65 |
|
66 |
function aye_set_general_defaults() {
|
|
|
67 |
$options = get_option( 'youtube_embed_general' );
|
68 |
$changed = false;
|
69 |
-
$default_error =
|
|
|
|
|
70 |
|
71 |
if ( !is_array( $options ) ) {
|
72 |
if ( get_option( 'youtube_embed_editor' ) ) {
|
73 |
-
// If the old options exist, import them and then delete them
|
74 |
$old_opts = get_option( 'youtube_embed_editor' );
|
75 |
$options[ 'editor_button' ] = $old_opts[ 'youtube' ];
|
76 |
delete_option( 'youtube_embed_editor' );
|
77 |
$changed = true;
|
78 |
} else {
|
79 |
-
|
80 |
-
$options = array( 'editor_button' => 1, 'admin_bar' => 1, 'profile_no' => 5, 'list_no' => 5, 'info_cache' => 1, 'embed_cache' => 24, 'transcript_cache' => 24, 'alt_profile' => 0, 'alt_profile2' => 0, 'bracket' => '', 'alt' => 0, 'other_profile' => 0, 'comments' => '', 'comments_profile' => 0, 'metadata' => 1, 'feed' => 'b', 'api' => 1, 'error_message' => $default_error, 'thumbnail' => 2, 'privacy' => 0, 'frameborder' => 1 );
|
81 |
-
$changed = true;
|
82 |
}
|
83 |
}
|
84 |
|
85 |
-
// Set current version level. Because this can be used to detect version changes (and to what extent), this
|
86 |
-
|
87 |
if ( $options[ 'current_version' ] != youtube_embed_version ) {
|
88 |
$options[ 'current_version' ] = youtube_embed_version;
|
89 |
$changed = true;
|
90 |
}
|
91 |
|
92 |
// Because of upgrading, check each option - if not set, apply default
|
|
|
|
|
93 |
if ( !array_key_exists( 'editor_button', $options ) ) { $options[ 'editor_button' ] = 1; $changed = true; }
|
94 |
if ( !array_key_exists( 'admin_bar', $options ) ) { $options[ 'admin_bar' ] = 1; $changed = true; }
|
95 |
if ( !array_key_exists( 'profile_no', $options ) ) { $options[ 'profile_no' ] = 5; $changed = true; }
|
@@ -99,16 +134,24 @@ function aye_set_general_defaults() {
|
|
99 |
if ( !array_key_exists( 'transcript_cache', $options ) ) { $options[ 'transcript_cache' ] = 24; $changed = true; }
|
100 |
if ( !array_key_exists( 'alt_profile', $options ) ) { $options[ 'alt_profile' ] = 0; $changed = true; }
|
101 |
if ( !array_key_exists( 'alt_profile2', $options ) ) { $options[ 'alt_profile2' ] = 0; $changed = true; }
|
|
|
|
|
102 |
if ( !array_key_exists( 'other_profile', $options ) ) { $options[ 'other_profile' ] = 0; $changed = true; }
|
|
|
103 |
if ( !array_key_exists( 'comments_profile', $options ) ) { $options[ 'comments_profile' ] = 0; $changed = true; }
|
104 |
if ( !array_key_exists( 'metadata', $options ) ) { $options[ 'metadata' ] = 1; $changed = true; }
|
105 |
if ( !array_key_exists( 'feed', $options ) ) { $options[ 'feed' ] = 'b'; $changed = true; }
|
106 |
if ( !array_key_exists( 'api', $options ) ) { $options[ 'api' ] = 1; $changed = true; }
|
107 |
if ( !array_key_exists( 'error_message', $options ) ) { $options[ 'error_message' ] = $default_error; $changed = true; }
|
108 |
if ( !array_key_exists( 'thumbnail', $options ) ) { $options[ 'thumbnail' ] = 2; $changed = true; }
|
|
|
109 |
if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
|
|
|
|
|
|
|
110 |
|
111 |
// Update the options, if changed, and return the result
|
|
|
112 |
if ( $changed ) { update_option( 'youtube_embed_general', $options ); }
|
113 |
return $options;
|
114 |
}
|
@@ -126,69 +169,86 @@ function aye_set_general_defaults() {
|
|
126 |
*/
|
127 |
|
128 |
function aye_set_profile_defaults( $profile ) {
|
|
|
129 |
if ( $profile == 0 ) {
|
130 |
$profname = 'Default';
|
131 |
} else {
|
132 |
$profname = 'Profile ' . $profile;
|
133 |
}
|
134 |
$options = get_option( 'youtube_embed_profile' . $profile );
|
|
|
135 |
$changed = false;
|
136 |
$new_user = false;
|
137 |
|
138 |
// Work out default dimensions
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
145 |
|
146 |
if ( !is_array( $options ) ) {
|
147 |
if ( ( $profile == 0 ) && ( get_option( 'youtube_embed' ) ) ) {
|
148 |
-
// If the old options exist, import them and then delete them
|
149 |
$old_opts = get_option( 'youtube_embed' );
|
150 |
$options = $old_opts;
|
151 |
delete_option( 'youtube_embed' );
|
152 |
$changed = true;
|
153 |
} else {
|
154 |
-
|
155 |
-
$options = array( 'width' => $width, 'height' => $height, 'fullscreen' => '', 'template' => '%video%', 'autoplay' => '', 'start' => '0', 'loop' => '', 'cc' => '', 'annotation' => '1', 'related' => '', 'info' => '1', 'link' => '1', 'react' => '1', 'stop' => '0', 'sweetspot' => '1', 'type' => 'v', 'disablekb' => '', 'autohide' => '2', 'controls' => '1', 'playlist' => 'v', 'fallback' => 'v', 'wmode' => 'window', 'audio' => '', 'hd' => '1', 'style' => '', 'color' => 'red', 'theme' => 'dark', 'https' => '0', 'modest' => '1', 'dynamic' => '', 'fixed' => '' );
|
156 |
-
$changed = true;
|
157 |
}
|
158 |
}
|
159 |
|
160 |
// Because of upgrading, check each option - if not set, apply default
|
|
|
161 |
if ( !array_key_exists( 'name', $options ) ) { $options[ 'name' ] = $profname; $changed = true; }
|
|
|
162 |
if ( !array_key_exists( 'width', $options ) ) {
|
163 |
-
$
|
164 |
$options[ 'height' ] = $height;
|
165 |
$changed = true;
|
166 |
}
|
167 |
-
if ( !array_key_exists( 'height', $options ) ) { $options[ 'height' ] =
|
168 |
-
if ( !array_key_exists( '
|
169 |
-
if ( !array_key_exists( '
|
170 |
-
if ( !array_key_exists( '
|
171 |
-
if ( !array_key_exists( '
|
172 |
-
if ( !array_key_exists( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
if ( !array_key_exists( 'type', $options ) ) { $options[ 'type' ] = 'v'; $changed = true; }
|
174 |
-
if ( !array_key_exists( '
|
175 |
-
if ( !array_key_exists( '
|
176 |
-
if ( !array_key_exists( '
|
177 |
-
if ( !array_key_exists( 'autohide', $options ) ) { $options[ 'autohide' ] = '2'; $changed = true; }
|
178 |
-
if ( !array_key_exists( 'controls', $options ) ) { $options[ 'controls' ] = '1'; $changed = true; }
|
179 |
if ( !array_key_exists( 'playlist', $options ) ) { $options[ 'playlist' ] = 'v'; $changed = true; }
|
180 |
if ( !array_key_exists( 'fallback', $options ) ) { $options[ 'fallback' ] = 'v'; $changed = true; }
|
181 |
if ( !array_key_exists( 'wmode', $options ) ) { $options[ 'wmode' ] = 'window'; $changed = true; }
|
182 |
-
if ( !array_key_exists( '
|
183 |
-
if ( !array_key_exists( 'hd', $options ) ) { $options[ 'hd' ] =
|
|
|
184 |
if ( !array_key_exists( 'color', $options ) ) { $options[ 'color' ] = 'red'; $changed = true; }
|
185 |
if ( !array_key_exists( 'theme', $options ) ) { $options[ 'theme' ] = 'dark'; $changed = true; }
|
|
|
186 |
if ( !array_key_exists( 'modest', $options ) ) { $options[ 'modest' ] = 1; $changed = true; }
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
// Update the options, if changed, and return the result
|
|
|
189 |
if ( $changed ) { update_option( 'youtube_embed_profile' . $profile, $options ); }
|
190 |
|
191 |
// Remove added slashes from template XHTML
|
|
|
192 |
$options[ 'template' ] = stripslashes( $options[ 'template' ] );
|
193 |
|
194 |
return $options;
|
@@ -210,17 +270,17 @@ function aye_set_list_defaults( $list ) {
|
|
210 |
$options = get_option( 'youtube_embed_list' . $list );
|
211 |
$changed = false;
|
212 |
|
213 |
-
// If array doesn't exist
|
214 |
-
|
215 |
-
|
216 |
-
$changed = true;
|
217 |
-
}
|
218 |
|
219 |
// Because of upgrading, check each option - if not set, apply default
|
|
|
220 |
if ( !array_key_exists( 'name',$options ) ) { $options[ 'name' ] = 'List ' . $list; $changed = true; }
|
221 |
if ( !array_key_exists( 'list',$options ) ) { $options[ 'list' ] = ''; $changed = true; }
|
222 |
|
223 |
// Update the options, if changed, and return the result
|
|
|
224 |
if ( $changed ) { update_option( 'youtube_embed_list' . $list, $options ); }
|
225 |
return $options;
|
226 |
}
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
10 |
+
/**
|
11 |
+
* Set Default Options
|
12 |
+
*
|
13 |
+
* Set up default values for the various options
|
14 |
+
*
|
15 |
+
* @package Artiss-YouTube-Embed
|
16 |
+
*/
|
17 |
+
|
18 |
/**
|
19 |
* Function to set Shortcode option
|
20 |
*
|
61 |
return $url;
|
62 |
}
|
63 |
|
64 |
+
/**
|
65 |
+
* Function to set editor button shortcode
|
66 |
+
*
|
67 |
+
* Looks up editor button shortcode - sets it if not set-up
|
68 |
+
* Ensures matching cookie is in place
|
69 |
+
*
|
70 |
+
* @since 2.6
|
71 |
+
*
|
72 |
+
* @return string Editor shortcode
|
73 |
+
*/
|
74 |
+
|
75 |
+
function aye_set_editor_sc() {
|
76 |
+
|
77 |
+
$editor_sc = get_option( 'youtube_embed_editor_sc' );
|
78 |
+
|
79 |
+
// If setting doesn't exist, set defaults
|
80 |
+
|
81 |
+
if ( $editor_sc == '' ) { update_option( 'youtube_embed_editor_sc', 'youtube' ); }
|
82 |
+
|
83 |
+
// Return the shortcode
|
84 |
+
|
85 |
+
return $editor_sc;
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
/**
|
90 |
* Function to set general YouTube options
|
91 |
*
|
97 |
*/
|
98 |
|
99 |
function aye_set_general_defaults() {
|
100 |
+
|
101 |
$options = get_option( 'youtube_embed_general' );
|
102 |
$changed = false;
|
103 |
+
$default_error = '<p>' . __( 'The video cannot be shown at the moment. Please try again later.', 'youtube-embed' ) . '</p>';
|
104 |
+
|
105 |
+
// If the old options exist, import them and then delete them
|
106 |
|
107 |
if ( !is_array( $options ) ) {
|
108 |
if ( get_option( 'youtube_embed_editor' ) ) {
|
|
|
109 |
$old_opts = get_option( 'youtube_embed_editor' );
|
110 |
$options[ 'editor_button' ] = $old_opts[ 'youtube' ];
|
111 |
delete_option( 'youtube_embed_editor' );
|
112 |
$changed = true;
|
113 |
} else {
|
114 |
+
$options = array();
|
|
|
|
|
115 |
}
|
116 |
}
|
117 |
|
118 |
+
// Set current version level. Because this can be used to detect version changes (and to what extent), this information may be useful in future upgrades
|
119 |
+
|
120 |
if ( $options[ 'current_version' ] != youtube_embed_version ) {
|
121 |
$options[ 'current_version' ] = youtube_embed_version;
|
122 |
$changed = true;
|
123 |
}
|
124 |
|
125 |
// Because of upgrading, check each option - if not set, apply default
|
126 |
+
|
127 |
+
if ( !array_key_exists( 'donated', $options ) ) { $options[ 'donated' ] = ''; $changed = true; }
|
128 |
if ( !array_key_exists( 'editor_button', $options ) ) { $options[ 'editor_button' ] = 1; $changed = true; }
|
129 |
if ( !array_key_exists( 'admin_bar', $options ) ) { $options[ 'admin_bar' ] = 1; $changed = true; }
|
130 |
if ( !array_key_exists( 'profile_no', $options ) ) { $options[ 'profile_no' ] = 5; $changed = true; }
|
134 |
if ( !array_key_exists( 'transcript_cache', $options ) ) { $options[ 'transcript_cache' ] = 24; $changed = true; }
|
135 |
if ( !array_key_exists( 'alt_profile', $options ) ) { $options[ 'alt_profile' ] = 0; $changed = true; }
|
136 |
if ( !array_key_exists( 'alt_profile2', $options ) ) { $options[ 'alt_profile2' ] = 0; $changed = true; }
|
137 |
+
if ( !array_key_exists( 'bracket', $options ) ) { $options[ 'bracket' ] = ''; $changed = true; }
|
138 |
+
if ( !array_key_exists( 'alt', $options ) ) { $options[ 'alt' ] = 0; $changed = true; }
|
139 |
if ( !array_key_exists( 'other_profile', $options ) ) { $options[ 'other_profile' ] = 0; $changed = true; }
|
140 |
+
if ( !array_key_exists( 'comments', $options ) ) { $options[ 'comments' ] = ''; $changed = true; }
|
141 |
if ( !array_key_exists( 'comments_profile', $options ) ) { $options[ 'comments_profile' ] = 0; $changed = true; }
|
142 |
if ( !array_key_exists( 'metadata', $options ) ) { $options[ 'metadata' ] = 1; $changed = true; }
|
143 |
if ( !array_key_exists( 'feed', $options ) ) { $options[ 'feed' ] = 'b'; $changed = true; }
|
144 |
if ( !array_key_exists( 'api', $options ) ) { $options[ 'api' ] = 1; $changed = true; }
|
145 |
if ( !array_key_exists( 'error_message', $options ) ) { $options[ 'error_message' ] = $default_error; $changed = true; }
|
146 |
if ( !array_key_exists( 'thumbnail', $options ) ) { $options[ 'thumbnail' ] = 2; $changed = true; }
|
147 |
+
if ( !array_key_exists( 'privacy', $options ) ) { $options[ 'privacy' ] = 0; $changed = true; }
|
148 |
if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
|
149 |
+
if ( !array_key_exists( 'widgets', $options ) ) { $options[ 'widgets' ] = 0; $changed = true; }
|
150 |
+
if ( !array_key_exists( 'profile_access', $options ) ) { $options[ 'profile_access' ] = 'delete_plugins'; $changed = true; }
|
151 |
+
if ( !array_key_exists( 'list_access', $options ) ) { $options[ 'list_access' ] = 'delete_plugins'; $changed = true; }
|
152 |
|
153 |
// Update the options, if changed, and return the result
|
154 |
+
|
155 |
if ( $changed ) { update_option( 'youtube_embed_general', $options ); }
|
156 |
return $options;
|
157 |
}
|
169 |
*/
|
170 |
|
171 |
function aye_set_profile_defaults( $profile ) {
|
172 |
+
|
173 |
if ( $profile == 0 ) {
|
174 |
$profname = 'Default';
|
175 |
} else {
|
176 |
$profname = 'Profile ' . $profile;
|
177 |
}
|
178 |
$options = get_option( 'youtube_embed_profile' . $profile );
|
179 |
+
|
180 |
$changed = false;
|
181 |
$new_user = false;
|
182 |
|
183 |
// Work out default dimensions
|
184 |
+
|
185 |
+
$width = 0;
|
186 |
+
if ( isset( $content_width ) ) { $width = $content_width; }
|
187 |
+
if ( ( $width == 0 ) or ( $width == '' ) ) { $width = 560; }
|
188 |
+
$height = 25 + round( ( $width / 16 ) * 9, 0 );
|
189 |
+
|
190 |
+
// If the old options exist, import them and then delete them
|
191 |
|
192 |
if ( !is_array( $options ) ) {
|
193 |
if ( ( $profile == 0 ) && ( get_option( 'youtube_embed' ) ) ) {
|
|
|
194 |
$old_opts = get_option( 'youtube_embed' );
|
195 |
$options = $old_opts;
|
196 |
delete_option( 'youtube_embed' );
|
197 |
$changed = true;
|
198 |
} else {
|
199 |
+
$options = array();
|
|
|
|
|
200 |
}
|
201 |
}
|
202 |
|
203 |
// Because of upgrading, check each option - if not set, apply default
|
204 |
+
|
205 |
if ( !array_key_exists( 'name', $options ) ) { $options[ 'name' ] = $profname; $changed = true; }
|
206 |
+
|
207 |
if ( !array_key_exists( 'width', $options ) ) {
|
208 |
+
$options[ 'width' ] = $width;
|
209 |
$options[ 'height' ] = $height;
|
210 |
$changed = true;
|
211 |
}
|
212 |
+
if ( !array_key_exists( 'height', $options ) ) { $options[ 'height' ] = 340; $changed = true; }
|
213 |
+
if ( !array_key_exists( 'fullscreen', $options ) ) { $options[ 'fullscreen' ] = ''; $changed = true; }
|
214 |
+
if ( !array_key_exists( 'template', $options ) ) { $options[ 'template' ] = '%video%'; $changed = true; }
|
215 |
+
if ( !array_key_exists( 'autoplay', $options ) ) { $options[ 'autoplay' ] = ''; $changed = true; }
|
216 |
+
if ( !array_key_exists( 'start', $options ) ) { $options[ 'start' ] = 0; $changed = true; }
|
217 |
+
if ( !array_key_exists( 'loop', $options ) ) { $options[ 'loop' ] = ''; $changed = true; }
|
218 |
+
if ( !array_key_exists( 'cc', $options ) ) { $options[ 'cc' ] = ''; $changed = true; }
|
219 |
+
if ( !array_key_exists( 'annotation', $options ) ) { $options[ 'annotation' ] = 1; $changed = true; }
|
220 |
+
if ( !array_key_exists( 'related', $options ) ) { $options[ 'related' ] = ''; $changed = true; }
|
221 |
+
if ( !array_key_exists( 'info', $options ) ) { $options[ 'info' ] = 1; $changed = true; }
|
222 |
+
if ( !array_key_exists( 'link', $options ) ) { $options[ 'link' ] = 1; $changed = true; }
|
223 |
+
if ( !array_key_exists( 'react', $options ) ) { $options[ 'react' ] = 1; $changed = true; }
|
224 |
+
if ( !array_key_exists( 'stop', $options ) ) { $options[ 'stop' ] = 0; $changed = true; }
|
225 |
+
if ( !array_key_exists( 'sweetspot', $options ) ) { $options[ 'sweetspot' ] = 1; $changed = true; }
|
226 |
if ( !array_key_exists( 'type', $options ) ) { $options[ 'type' ] = 'v'; $changed = true; }
|
227 |
+
if ( !array_key_exists( 'disablekb', $options ) ) { $options[ 'disablekb' ] = ''; $changed = true; }
|
228 |
+
if ( !array_key_exists( 'autohide', $options ) ) { $options[ 'autohide' ] = 2; $changed = true; }
|
229 |
+
if ( !array_key_exists( 'controls', $options ) ) { $options[ 'controls' ] = 1; $changed = true; }
|
|
|
|
|
230 |
if ( !array_key_exists( 'playlist', $options ) ) { $options[ 'playlist' ] = 'v'; $changed = true; }
|
231 |
if ( !array_key_exists( 'fallback', $options ) ) { $options[ 'fallback' ] = 'v'; $changed = true; }
|
232 |
if ( !array_key_exists( 'wmode', $options ) ) { $options[ 'wmode' ] = 'window'; $changed = true; }
|
233 |
+
if ( !array_key_exists( 'audio', $options ) ) { $options[ 'audio' ] = ''; $changed = true; }
|
234 |
+
if ( !array_key_exists( 'hd', $options ) ) { $options[ 'hd' ] = 1; $changed = true; }
|
235 |
+
if ( !array_key_exists( 'style', $options ) ) { $options[ 'style' ] = ''; $changed = true; }
|
236 |
if ( !array_key_exists( 'color', $options ) ) { $options[ 'color' ] = 'red'; $changed = true; }
|
237 |
if ( !array_key_exists( 'theme', $options ) ) { $options[ 'theme' ] = 'dark'; $changed = true; }
|
238 |
+
if ( !array_key_exists( 'https', $options ) ) { $options[ 'https' ] = 0; $changed = true; }
|
239 |
if ( !array_key_exists( 'modest', $options ) ) { $options[ 'modest' ] = 1; $changed = true; }
|
240 |
+
if ( !array_key_exists( 'dynamic', $options ) ) { $options[ 'dynamic' ] = ''; $changed = true; }
|
241 |
+
if ( !array_key_exists( 'fixed', $options ) ) { $options[ 'fixed' ] = ''; $changed = true; }
|
242 |
+
if ( !array_key_exists( 'download', $options ) ) { $options[ 'download' ] = ''; $changed = true; }
|
243 |
+
if ( !array_key_exists( 'download_style', $options ) ) { $options[ 'download_style' ] = ''; $changed = true; }
|
244 |
+
if ( !array_key_exists( 'download_text', $options ) ) { $options[ 'download_text' ] = 'Click here to download the video'; $changed = true; }
|
245 |
|
246 |
// Update the options, if changed, and return the result
|
247 |
+
|
248 |
if ( $changed ) { update_option( 'youtube_embed_profile' . $profile, $options ); }
|
249 |
|
250 |
// Remove added slashes from template XHTML
|
251 |
+
|
252 |
$options[ 'template' ] = stripslashes( $options[ 'template' ] );
|
253 |
|
254 |
return $options;
|
270 |
$options = get_option( 'youtube_embed_list' . $list );
|
271 |
$changed = false;
|
272 |
|
273 |
+
// If array doesn't exist create an empty one
|
274 |
+
|
275 |
+
if ( !is_array( $options ) ) { $options = array(); }
|
|
|
|
|
276 |
|
277 |
// Because of upgrading, check each option - if not set, apply default
|
278 |
+
|
279 |
if ( !array_key_exists( 'name',$options ) ) { $options[ 'name' ] = 'List ' . $list; $changed = true; }
|
280 |
if ( !array_key_exists( 'list',$options ) ) { $options[ 'list' ] = ''; $changed = true; }
|
281 |
|
282 |
// Update the options, if changed, and return the result
|
283 |
+
|
284 |
if ( $changed ) { update_option( 'youtube_embed_list' . $list, $options ); }
|
285 |
return $options;
|
286 |
}
|
includes/aye-shared-functions.php
CHANGED
@@ -7,6 +7,58 @@
|
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* Extract parameters (1.0)
|
12 |
*
|
@@ -47,19 +99,28 @@ function aye_get_parameters( $input, $para ) {
|
|
47 |
|
48 |
function aye_extract_id( $id ) {
|
49 |
|
50 |
-
|
|
|
|
|
51 |
|
52 |
// Check if it's the full URL, as found in address bar
|
53 |
|
54 |
$video_pos = strpos( $id, 'youtube.com/watch?', 0 );
|
55 |
|
56 |
if ( $video_pos !== false ) {
|
57 |
-
|
58 |
-
$
|
59 |
-
if (
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
} else {
|
@@ -97,11 +158,6 @@ function aye_extract_id( $id ) {
|
|
97 |
}
|
98 |
}
|
99 |
|
100 |
-
// Convert video ID characters
|
101 |
-
|
102 |
-
$id = str_replace( '–', '--', $id );
|
103 |
-
$id = str_replace( '×', 'x', $id );
|
104 |
-
|
105 |
return $id;
|
106 |
}
|
107 |
|
@@ -158,7 +214,7 @@ function aye_validate_id( $id, $title_needed = false ) {
|
|
158 |
|
159 |
// Check with YouTube API as to whether the ID is a playlist
|
160 |
|
161 |
-
|
162 |
$id_check = aye_get_file( 'http' . $https . '://gdata.youtube.com/feeds/api/playlists/' . $id . '?v=2', false );
|
163 |
if ( $id_check[ 'rc' ] == 0 ) {
|
164 |
if ( $id_check[ 'response' ] != 200 ) {
|
@@ -181,7 +237,7 @@ function aye_validate_id( $id, $title_needed = false ) {
|
|
181 |
|
182 |
// If reporting API errors, output it
|
183 |
|
184 |
-
$type = sprintf( __('An error occurred accessing the YouTube API for video ID %s - %s' ), $id, $id_check[ 'error' ] );
|
185 |
|
186 |
} else {
|
187 |
|
@@ -430,7 +486,7 @@ function aye_generate_profile_list( $current, $total ) {
|
|
430 |
$profname = $profiles[ 'name' ];
|
431 |
|
432 |
if ( $profname == '' ) { $profname = __( 'Profile' ) . ' ' . $loop; }
|
433 |
-
|
434 |
echo '<option value="' . $loop . '"';
|
435 |
|
436 |
if ( $current == $loop ) { echo " selected='selected'"; }
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
10 |
+
/**
|
11 |
+
* Is Do Not Track active?
|
12 |
+
*
|
13 |
+
* Function to return whether Do Not Track is active in the current
|
14 |
+
* browser
|
15 |
+
*
|
16 |
+
* @since 2.6
|
17 |
+
*
|
18 |
+
* @return string True or false
|
19 |
+
*/
|
20 |
+
|
21 |
+
function aye_do_not_track() { // 1.0
|
22 |
+
|
23 |
+
if ( isset( $_SERVER[ 'HTTP_DNT' ] ) ) {
|
24 |
+
if ( $_SERVER[ 'HTTP_DNT' ] == 1 ) { return true; }
|
25 |
+
} else {
|
26 |
+
if ( function_exists( 'getallheaders' ) ) {
|
27 |
+
foreach ( getallheaders() as $key => $value ) {
|
28 |
+
if ( ( strtolower( $key ) === 'dnt' ) && ( $value == 1 ) ) { return true; }
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get the cookie path
|
37 |
+
*
|
38 |
+
* Work out the path for the current installation to add cookies for
|
39 |
+
*
|
40 |
+
* @since 2.6
|
41 |
+
*
|
42 |
+
* @return string Cookie path
|
43 |
+
*/
|
44 |
+
|
45 |
+
function aye_get_cookie_path() {
|
46 |
+
|
47 |
+
// Remove the http:// from the beginning of the site URL
|
48 |
+
|
49 |
+
$path = str_replace( 'http://', '', site_url( '/', 'http' ) );
|
50 |
+
|
51 |
+
// Find the first slash in the results
|
52 |
+
|
53 |
+
$pos = strpos( $path, '/' );
|
54 |
+
|
55 |
+
// Strip all before the first slash
|
56 |
+
|
57 |
+
$path = substr( $path, $pos ) . 'wp-content/';
|
58 |
+
|
59 |
+
return $path;
|
60 |
+
}
|
61 |
+
|
62 |
/**
|
63 |
* Extract parameters (1.0)
|
64 |
*
|
99 |
|
100 |
function aye_extract_id( $id ) {
|
101 |
|
102 |
+
// Convert and trim video ID characters
|
103 |
+
|
104 |
+
$id = trim( str_replace( '–', '--', str_replace( '×', 'x', strip_tags( $id ) ) ) );
|
105 |
|
106 |
// Check if it's the full URL, as found in address bar
|
107 |
|
108 |
$video_pos = strpos( $id, 'youtube.com/watch?', 0 );
|
109 |
|
110 |
if ( $video_pos !== false ) {
|
111 |
+
|
112 |
+
$video_pos = strpos( $id, 'v=', $video_pos + 18 );
|
113 |
+
if ( $video_pos === false ) { $video_pos = strpos( $id, 'p=', $video_pos + 18 ); }
|
114 |
+
|
115 |
+
if ( $video_pos !== false ) {
|
116 |
+
|
117 |
+
$video_pos = $video_pos + 2;
|
118 |
+
$ampersand_pos = strpos( $id, '&', $video_pos );
|
119 |
+
if ( !$ampersand_pos ) {
|
120 |
+
$id = substr( $id, $video_pos );
|
121 |
+
} else {
|
122 |
+
$id = substr( $id, $video_pos, $ampersand_pos - $video_pos );
|
123 |
+
}
|
124 |
}
|
125 |
|
126 |
} else {
|
158 |
}
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
161 |
return $id;
|
162 |
}
|
163 |
|
214 |
|
215 |
// Check with YouTube API as to whether the ID is a playlist
|
216 |
|
217 |
+
if ( strtolower( substr( $id, 0, 2 ) ) == 'pl' ) { $id = substr( $id, 2 ); }
|
218 |
$id_check = aye_get_file( 'http' . $https . '://gdata.youtube.com/feeds/api/playlists/' . $id . '?v=2', false );
|
219 |
if ( $id_check[ 'rc' ] == 0 ) {
|
220 |
if ( $id_check[ 'response' ] != 200 ) {
|
237 |
|
238 |
// If reporting API errors, output it
|
239 |
|
240 |
+
$type = sprintf( __('An error occurred accessing the YouTube API for video ID %s - %s', 'youtube-embed' ), $id, $id_check[ 'error' ] );
|
241 |
|
242 |
} else {
|
243 |
|
486 |
$profname = $profiles[ 'name' ];
|
487 |
|
488 |
if ( $profname == '' ) { $profname = __( 'Profile' ) . ' ' . $loop; }
|
489 |
+
if ( strlen( $profname ) > 30 ) { $profname = substr( $profname, 0, 30 ) . '…'; }
|
490 |
echo '<option value="' . $loop . '"';
|
491 |
|
492 |
if ( $current == $loop ) { echo " selected='selected'"; }
|
includes/aye-shortcodes.php
CHANGED
@@ -87,7 +87,7 @@ if ( $shortcode[ 2 ] != '' ) { add_shortcode( $shortcode[ 2 ], 'aye_video_shortc
|
|
87 |
|
88 |
function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_shortcode = '' ) {
|
89 |
|
90 |
-
extract( shortcode_atts( array( 'type' => '', 'width' => '', 'height' => '', 'fullscreen' => '', 'related' => '', 'autoplay' => '', 'loop' => '', 'start' => '', 'info' => '', 'annotation' => '', 'cc' => '', 'style' => '', 'link' => '', 'react' => '', 'stop' => '', 'sweetspot' => '', 'disablekb' => '', 'ratio' => '', 'autohide' => '', 'controls' => '', 'profile' => '', 'embedplus' => '', 'audio' => '', 'id' => '', 'url' => '', 'rel' => '', 'fs' => '', 'cc_load_policy' => '', 'iv_load_policy' => '', 'showinfo' => '', 'youtubeurl' => '', 'template' => '', 'list' => '', 'hd' => '', 'color' => '', 'theme' => '', 'ssl' => '', 'height' => '', 'width' => '', '
|
91 |
|
92 |
// If no profile specified and an alternative shortcode used, get that shortcodes default profile
|
93 |
|
@@ -109,8 +109,8 @@ function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_s
|
|
109 |
if ( ( $url != '' ) && ( $content == '' ) ) { $content = $url; }
|
110 |
if ( ( $youtubeurl != '' ) && ( $content == '' ) ) { $content = $youtubeurl; }
|
111 |
|
112 |
-
|
113 |
-
|
114 |
|
115 |
if ( ( $rel != '' ) && ( $related == '' ) ) { $related = $rel;}
|
116 |
if ( ( $fs != '' ) && ( $fullscreen == '' ) ) { $fullscreen = $fs;}
|
@@ -137,7 +137,7 @@ function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_s
|
|
137 |
|
138 |
// Create YouTube code
|
139 |
|
140 |
-
$youtube_code = aye_generate_youtube_code( $content, $type, $width, $height, aye_convert( $fullscreen ), aye_convert( $related ), aye_convert( $autoplay ), aye_convert( $loop ), $start, aye_convert( $info ), aye_convert_3( $annotation ), aye_convert( $cc ), $style, aye_convert( $link ), aye_convert( $react ), $stop, aye_convert( $sweetspot ), aye_convert( $disablekb ), $ratio, $autohide,
|
141 |
|
142 |
return do_shortcode( $youtube_code );
|
143 |
}
|
@@ -157,8 +157,8 @@ function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_s
|
|
157 |
*/
|
158 |
|
159 |
function aye_thumbnail_sc( $paras = '', $content = '' ) {
|
160 |
-
extract( shortcode_atts( array( 'style' => '', 'class' => '', 'rel' => '', 'target' => '', 'width' => '', 'height' => '', 'alt' => '', 'version' => '' ), $paras ) );
|
161 |
-
return do_shortcode( aye_generate_thumbnail_code( $content, $style, $class, $rel, $target, $width, $height, $alt, $version ) );
|
162 |
}
|
163 |
|
164 |
add_shortcode( 'youtube_thumb', 'aye_thumbnail_sc' );
|
@@ -265,7 +265,7 @@ function aye_video_name_shortcode( $paras = '', $content = '' ) {
|
|
265 |
// Check what type of video it is and whether it's valid
|
266 |
|
267 |
$return = aye_validate_id( $id, true );
|
268 |
-
if ( !$return[ 'type' ] ) { return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.' ), $id ) ); }
|
269 |
if ( strlen( $return[ 'type' ] ) != 1 ) { return aye_error( $return[ 'type' ] ); }
|
270 |
|
271 |
// Return the video title
|
87 |
|
88 |
function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_shortcode = '' ) {
|
89 |
|
90 |
+
extract( shortcode_atts( array( 'type' => '', 'width' => '', 'height' => '', 'fullscreen' => '', 'related' => '', 'autoplay' => '', 'loop' => '', 'start' => '', 'info' => '', 'annotation' => '', 'cc' => '', 'style' => '', 'link' => '', 'react' => '', 'stop' => '', 'sweetspot' => '', 'disablekb' => '', 'ratio' => '', 'autohide' => '', 'controls' => '', 'profile' => '', 'embedplus' => '', 'audio' => '', 'id' => '', 'url' => '', 'rel' => '', 'fs' => '', 'cc_load_policy' => '', 'iv_load_policy' => '', 'showinfo' => '', 'youtubeurl' => '', 'template' => '', 'list' => '', 'hd' => '', 'color' => '', 'theme' => '', 'ssl' => '', 'height' => '', 'width' => '', 'dynamic' => '', 'h' => '', 'w' => '', 'search' => '', 'user' => '' ), $paras ) );
|
91 |
|
92 |
// If no profile specified and an alternative shortcode used, get that shortcodes default profile
|
93 |
|
109 |
if ( ( $url != '' ) && ( $content == '' ) ) { $content = $url; }
|
110 |
if ( ( $youtubeurl != '' ) && ( $content == '' ) ) { $content = $youtubeurl; }
|
111 |
|
112 |
+
if ( ( $h != '' ) && ( $height == '' ) ) { $height = $h; }
|
113 |
+
if ( ( $w != '' ) && ( $width == '' ) ) { $width = $w; }
|
114 |
|
115 |
if ( ( $rel != '' ) && ( $related == '' ) ) { $related = $rel;}
|
116 |
if ( ( $fs != '' ) && ( $fullscreen == '' ) ) { $fullscreen = $fs;}
|
137 |
|
138 |
// Create YouTube code
|
139 |
|
140 |
+
$youtube_code = aye_generate_youtube_code( $content, $type, $width, $height, aye_convert( $fullscreen ), aye_convert( $related ), aye_convert( $autoplay ), aye_convert( $loop ), $start, aye_convert( $info ), aye_convert_3( $annotation ), aye_convert( $cc ), $style, aye_convert( $link ), aye_convert( $react ), $stop, aye_convert( $sweetspot ), aye_convert( $disablekb ), $ratio, $autohide, $controls, $profile, $list, aye_convert( $audio ), $template, aye_convert( $hd ), $color, $theme, aye_convert( $ssl ), aye_convert( $dynamic ), aye_convert( $search ), aye_convert( $user ) );
|
141 |
|
142 |
return do_shortcode( $youtube_code );
|
143 |
}
|
157 |
*/
|
158 |
|
159 |
function aye_thumbnail_sc( $paras = '', $content = '' ) {
|
160 |
+
extract( shortcode_atts( array( 'style' => '', 'class' => '', 'rel' => '', 'target' => '', 'width' => '', 'height' => '', 'alt' => '', 'version' => '', 'nolink' => '' ), $paras ) );
|
161 |
+
return do_shortcode( aye_generate_thumbnail_code( $content, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink ) );
|
162 |
}
|
163 |
|
164 |
add_shortcode( 'youtube_thumb', 'aye_thumbnail_sc' );
|
265 |
// Check what type of video it is and whether it's valid
|
266 |
|
267 |
$return = aye_validate_id( $id, true );
|
268 |
+
if ( !$return[ 'type' ] ) { return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) ); }
|
269 |
if ( strlen( $return[ 'type' ] ) != 1 ) { return aye_error( $return[ 'type' ] ); }
|
270 |
|
271 |
// Return the video title
|
js/aye-ga-tracker UNCOMPRESSED.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
function recordOutboundLink(category, action, label) {
|
2 |
-
_gaq.push(['_trackEvent', category, action, label]);
|
3 |
-
}
|
|
|
|
|
|
js/aye-ga-tracker.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
function recordOutboundLink(category,action,label){_gaq.push(['_trackEvent',category,action,label])}
|
|
js/aye-mce-button.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(){tinymce.create('tinymce.plugins.youtube',{init:function(ed,url){ed.addButton('YouTube',{title:'YouTube Embed',onclick:function(){if(ed.selection.getContent()==''){var yeOut='Insert video URL or ID here'}else{var yeOut=ed.selection.getContent()}ed.selection.setContent('[youtube]'+yeOut+'[/youtube]')}})},createControl:function(n,cm){return null}});tinymce.PluginManager.add('YouTube',tinymce.plugins.youtube)})();
|
|
js/aye-mce-button.min.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
(function(){
|
2 |
+
<?php $cookie_name='aye_mce_shortcode'; if(isset($_COOKIE[$cookie_name])) {$shortcode=$_COOKIE[$cookie_name];} else {$shortcode='youtube';} ?>
|
3 |
+
var shortcode="<?php echo $shortcode; ?>";tinymce.create('tinymce.plugins.youtube',{init:function(ed,url){ed.addButton('YouTube',{title:'YouTube Embed',onclick:function(){if(ed.selection.getContent()==''){var yeOut='Insert video URL or ID here'}else{var yeOut=ed.selection.getContent()}ed.selection.setContent('['+shortcode+']'+yeOut+'[/'+shortcode+']')}})},createControl:function(n,cm){return null}});tinymce.PluginManager.add('YouTube',tinymce.plugins.youtube)})();
|
js/{aye-mce-button UNCOMPRESSED.js → aye-mce-button.php}
RENAMED
@@ -1,4 +1,14 @@
|
|
|
|
|
|
1 |
(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
tinymce.create('tinymce.plugins.youtube', {
|
3 |
init : function(ed, url) {
|
4 |
ed.addButton('YouTube', {
|
@@ -9,7 +19,7 @@
|
|
9 |
} else {
|
10 |
var yeOut = ed.selection.getContent();
|
11 |
}
|
12 |
-
ed.selection.setContent('[
|
13 |
}
|
14 |
});
|
15 |
},
|
1 |
+
// Function to add MCE button. Includes build of output text
|
2 |
+
|
3 |
(function() {
|
4 |
+
<?php
|
5 |
+
|
6 |
+
// Get cookie of default shortcode to use
|
7 |
+
|
8 |
+
$cookie_name = 'aye_mce_shortcode';
|
9 |
+
if ( isset( $_COOKIE[ $cookie_name ] ) ) { $shortcode = $_COOKIE[ $cookie_name ]; } else { $shortcode = 'youtube'; }
|
10 |
+
?>
|
11 |
+
var shortcode = "<?php echo $shortcode; ?>";
|
12 |
tinymce.create('tinymce.plugins.youtube', {
|
13 |
init : function(ed, url) {
|
14 |
ed.addButton('YouTube', {
|
19 |
} else {
|
20 |
var yeOut = ed.selection.getContent();
|
21 |
}
|
22 |
+
ed.selection.setContent('[' + shortcode + ']' + yeOut + '[/' + shortcode + ']');
|
23 |
}
|
24 |
});
|
25 |
},
|
languages/youtube-embed.mo
CHANGED
Binary file
|
languages/youtube-embed.po
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: Artiss
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
"Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -13,31 +13,64 @@ msgstr ""
|
|
13 |
"X-Poedit-Basepath: ../\n"
|
14 |
"X-Poedit-SearchPath-0: .\n"
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
#: includes/aye-add-to-admin-bar.php:36
|
17 |
-
#: includes/aye-add-to-admin-bar.php:
|
18 |
msgid "YouTube Embed"
|
19 |
msgstr ""
|
20 |
|
21 |
-
#: includes/aye-add-to-admin-bar.php:
|
22 |
-
#: includes/aye-admin-config.php:
|
|
|
|
|
|
|
|
|
|
|
23 |
msgid "Options"
|
24 |
msgstr ""
|
25 |
|
26 |
-
#: includes/aye-add-to-admin-bar.php:
|
27 |
-
#: includes/aye-admin-config.php:
|
28 |
msgid "Profiles"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/aye-add-to-admin-bar.php:
|
32 |
-
#: includes/aye-admin-config.php:
|
33 |
msgid "Lists"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: includes/aye-add-to-admin-bar.php:99
|
37 |
-
#: includes/aye-admin-config.php:117
|
38 |
-
msgid "README"
|
39 |
-
msgstr ""
|
40 |
-
|
41 |
#: includes/aye-admin-config.php:29
|
42 |
msgid "Settings"
|
43 |
msgstr ""
|
@@ -46,118 +79,115 @@ msgstr ""
|
|
46 |
msgid "Support"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/aye-admin-config.php:
|
50 |
-
msgid "
|
51 |
-
msgstr ""
|
52 |
-
|
53 |
-
#: includes/aye-admin-config.php:82
|
54 |
-
msgid "Artiss YouTube Embed Settings"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/aye-admin-config.php:
|
58 |
msgid "YouTube"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/aye-admin-config.php:
|
62 |
-
|
|
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: includes/aye-admin-config.php:
|
66 |
-
msgid "
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/aye-admin-config.php:
|
70 |
-
|
|
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/aye-admin-config.php:
|
74 |
-
msgid "Artiss YouTube Embed
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/aye-admin-config.php:
|
78 |
-
|
79 |
-
msgid "About Artiss YouTube Embed"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: includes/aye-admin-config.php:
|
83 |
-
msgid "
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: includes/aye-admin-config.php:
|
87 |
-
#: includes/aye-admin-config.php:
|
88 |
-
#: includes/aye-admin-config.php:
|
89 |
-
#: includes/aye-admin-config.php:
|
90 |
msgid "Help"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: includes/aye-admin-config.php:
|
94 |
msgid "This screen allows you to select non-specific options for the Artiss YouTube Embed plugin. For the default embedding settings, please select the <a href=\"admin.php?page=aye-profile-options\">Profiles</a> administration option."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/aye-admin-config.php:
|
98 |
-
#: includes/aye-admin-config.php:
|
99 |
-
#: includes/aye-admin-config.php:
|
100 |
msgid "Remember to click the Save Settings button at the bottom of the screen for new settings to take effect."
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: includes/aye-admin-config.php:
|
104 |
-
#: includes/aye-admin-config.php:
|
105 |
-
#: includes/aye-admin-config.php:
|
106 |
-
#: includes/aye-admin-config.php:
|
107 |
msgid "For more information:"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: includes/aye-admin-config.php:
|
111 |
-
#: includes/aye-admin-config.php:
|
112 |
-
#: includes/aye-admin-config.php:
|
113 |
-
#: includes/aye-admin-config.php:
|
114 |
msgid "Artiss YouTube Embed Plugin Documentation"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/aye-admin-config.php:
|
118 |
-
#: includes/aye-admin-config.php:
|
119 |
-
#: includes/aye-admin-config.php:
|
120 |
-
#: includes/aye-admin-config.php:
|
121 |
msgid "YouTube Player Documentation"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: includes/aye-admin-config.php:
|
125 |
-
#: includes/aye-admin-config.php:
|
126 |
-
#: includes/aye-admin-config.php:
|
127 |
-
#: includes/aye-admin-config.php:
|
128 |
-
#: includes/aye-display-about.php:
|
129 |
msgid "This plugin, and all support, is supplied for free, but <a title=\"Donate\" href=\"http://artiss.co.uk/donate\" target=\"_blank\">donations</a> are always welcome."
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: includes/aye-admin-config.php:
|
133 |
msgid "This screen allows you to set the options for the default and additional profiles. If you don't specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: includes/aye-admin-config.php:
|
137 |
msgid "EmbedPlus website"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: includes/aye-admin-config.php:
|
141 |
msgid "This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID."
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: includes/aye-admin-config.php:
|
145 |
msgid "This screen provides useful information about this plugin along with methods of support."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/aye-admin-config.php:
|
149 |
msgid "Welcome to Artiss YouTube Embed"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/aye-admin-config.php:
|
153 |
msgid "Thank you for installing this plugin."
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: includes/aye-admin-config.php:
|
157 |
msgid "These new menu options will allow you to configure your videos to just how you want them and provide links for help and support."
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: includes/aye-admin-config.php:
|
161 |
msgid "Even if you do nothing else, please visit the Profiles option to check your default video values."
|
162 |
msgstr ""
|
163 |
|
@@ -165,72 +195,77 @@ msgstr ""
|
|
165 |
msgid "This function does not support playlists"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: includes/aye-display-about.php:
|
169 |
#, php-format
|
170 |
msgid "You are using Artiss YouTube Embed version %s. It was written by David Artiss."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: includes/aye-display-about.php:
|
|
|
|
|
|
|
|
|
174 |
msgid "Copyrights"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: includes/aye-display-about.php:
|
178 |
msgid "YouTube, and all associated logos, is the copyright of Google Inc."
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: includes/aye-display-about.php:
|
182 |
msgid "EmbedPlus is copyright. Read the <a href=\"http://embedplus.com/terms.aspx\" target=\"_blank\">Terms & Conditions of Use</a>."
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: includes/aye-display-about.php:
|
186 |
msgid "Acknowledgements"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: includes/aye-display-about.php:
|
190 |
msgid "Images have been compressed with <a href=\"http://www.smushit.com/ysmush.it/\">Smush.it</a>."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: includes/aye-display-about.php:
|
194 |
msgid "JavaScript has been compressed with <a href=\"http://javascriptcompressor.com/\">JavaScript Compressor</a>."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: includes/aye-display-about.php:
|
198 |
-
msgid "YouTube icons are
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: includes/aye-display-about.php:
|
|
|
|
|
|
|
|
|
202 |
msgid "Support Information"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: includes/aye-display-about.php:
|
206 |
msgid "Useful support information and links can be found by clicking on the Help tab at the top of each of the Artiss YouTube Embed administration screens."
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: includes/aye-display-about.php:
|
210 |
msgid "Stay in Touch"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/aye-display-about.php:
|
214 |
msgid "<a href=\"http://www.artiss.co.uk/wp-plugins\">See the full list</a> of Artiss plugins, including beta releases."
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: includes/aye-display-about.php:
|
218 |
msgid "<a href=\"http://www.twitter.com/artiss_tech\">Follow Artiss.co.uk</a> on Twitter."
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: includes/aye-display-about.php:
|
222 |
msgid "<a href=\"http://www.artiss.co.uk/feed\">Subscribe</a> to the Artiss.co.uk news feed."
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: includes/aye-display-readme.php:16
|
226 |
-
msgid " README"
|
227 |
-
msgstr ""
|
228 |
-
|
229 |
#: includes/aye-function-calls.php:162
|
230 |
#: includes/aye-function-calls.php:223
|
231 |
-
#: includes/aye-generate-download-code.php:
|
|
|
232 |
#: includes/aye-generate-shorturl-code.php:34
|
233 |
-
#: includes/aye-generate-thumbnail-code.php:
|
234 |
#: includes/aye-generate-transcript-code.php:38
|
235 |
#, php-format
|
236 |
msgid "The YouTube ID of %s is invalid."
|
@@ -245,15 +280,15 @@ msgstr ""
|
|
245 |
msgid "No YouTube ID was found."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: includes/aye-generate-embed-code.php:
|
249 |
msgid "No video/playlist ID has been supplied"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: includes/aye-generate-embed-code.php:
|
253 |
msgid "A video list cannot be viewed within this feed - please view the original content"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: includes/aye-generate-embed-code.php:
|
257 |
msgid "Click here to view the video on YouTube"
|
258 |
msgstr ""
|
259 |
|
@@ -261,287 +296,379 @@ msgstr ""
|
|
261 |
msgid "No video ID has been supplied"
|
262 |
msgstr ""
|
263 |
|
|
|
|
|
|
|
|
|
|
|
264 |
#: includes/aye-generate-widgets.php:25
|
265 |
msgid "Embed YouTube Widget."
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: includes/aye-options-general.php:
|
269 |
#: includes/aye-options-lists.php:26
|
270 |
msgid "Settings Saved."
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: includes/aye-options-general.php:
|
274 |
msgid "Cache cleared."
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: includes/aye-options-general.php:
|
278 |
msgid "These are the general settings for Artiss YouTube Embed. Please select <a href=\"admin.php?page=aye-profile-options\">Profiles</a> for default embedding settings."
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
msgid "Embedding"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: includes/aye-options-general.php:
|
286 |
msgid "Add Metadata"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: includes/aye-options-general.php:
|
290 |
-
msgid "Allow rich metadata to be added to code. <a href=\"http://www.artiss.co.uk/
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: includes/aye-options-general.php:
|
294 |
msgid "Comment Embedding"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: includes/aye-options-general.php:
|
298 |
-
msgid "Allow YouTube URLs in comments - will display as embedded videos. <a href=\"http://www.artiss.co.uk/
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: includes/aye-options-general.php:
|
302 |
-
#: includes/aye-options-general.php:141
|
303 |
-
#: includes/aye-options-general.php:153
|
304 |
#: includes/aye-options-general.php:174
|
|
|
|
|
305 |
msgid "Profile to use"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: includes/aye-options-general.php:
|
309 |
msgid "Feed"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: includes/aye-options-general.php:
|
313 |
msgid "Text link"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: includes/aye-options-general.php:
|
317 |
msgid "Thumbnail"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: includes/aye-options-general.php:
|
321 |
msgid "Thumbnail & Text Link"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: includes/aye-options-general.php:
|
325 |
msgid "Videos cannot be embedded in feeds. Select how you wish them to be shown instead"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: includes/aye-options-general.php:
|
329 |
msgid "Thumbnail to use"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: includes/aye-options-general.php:
|
333 |
-
#: includes/aye-shared-functions.php:
|
334 |
msgid "Default"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/aye-options-general.php:
|
338 |
msgid "Default (HQ)"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: includes/aye-options-general.php:
|
342 |
msgid "Start"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: includes/aye-options-general.php:
|
346 |
msgid "Middle"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: includes/aye-options-general.php:
|
350 |
msgid "End"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: includes/aye-options-general.php:
|
354 |
msgid "Which thumbnail to use"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
msgid "Alternative Shortcodes"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
362 |
msgid "Alternative Shortcode 1"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: includes/aye-options-general.php:
|
366 |
msgid "Alternative Shortcode 2"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: includes/aye-options-general.php:
|
370 |
msgid "Migration"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
374 |
msgid "Bracket Embedding"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: includes/aye-options-general.php:
|
378 |
msgid "Allow embedding using URLs within brackets. Activating impacts performance"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/aye-options-general.php:
|
382 |
msgid "Alternative Embedding"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: includes/aye-options-general.php:
|
386 |
msgid "Allow all other types of embedding. Activating impacts performance"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: includes/aye-options-general.php:
|
390 |
msgid "For above 2 options"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/aye-options-general.php:
|
394 |
msgid "Admin Options"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/aye-options-general.php:
|
398 |
-
msgid "Show
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/aye-options-general.php:
|
402 |
msgid "Show the YouTube button on the post editor"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
msgid "Add to Admin Bar"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/aye-options-general.php:
|
410 |
msgid "Add link to options screen to Admin Bar"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
msgid "Profile & List Sizes"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: includes/aye-options-general.php:
|
418 |
msgid "Number of Profiles"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/aye-options-general.php:
|
422 |
msgid "Maximum number of profiles"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/aye-options-general.php:
|
426 |
msgid "Number of Lists"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: includes/aye-options-general.php:
|
430 |
msgid "Maximum number of lists"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: includes/aye-options-general.php:
|
434 |
msgid "Performance"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: includes/aye-options-general.php:
|
438 |
msgid "Embed Cache"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: includes/aye-options-general.php:
|
442 |
msgid "How many hours to retain embed output. 0 to switch off"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: includes/aye-options-general.php:
|
446 |
msgid "Video Information Cache"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: includes/aye-options-general.php:
|
450 |
msgid "How many hours to retain video information, including it's validity. 0 to switch off"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: includes/aye-options-general.php:
|
454 |
msgid "Transcript Cache"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: includes/aye-options-general.php:
|
458 |
msgid "How many hours to store transcripts for in cache. 0 to switch off"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
msgid "Clear Cache"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: includes/aye-options-general.php:
|
466 |
-
|
467 |
-
msgid "Select this option to remove all YouTube Embed cache. You currently have %d cached video(s)"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: includes/aye-options-general.php:
|
471 |
msgid "YouTube API"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: includes/aye-options-general.php:
|
475 |
msgid "The YouTube API is used to validate video IDs and to determine if it is a video or playlist."
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: includes/aye-options-general.php:
|
479 |
msgid "API State"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: includes/aye-options-general.php:
|
483 |
msgid "API should not be used"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: includes/aye-options-general.php:
|
487 |
msgid "HTTP API used and errors are reported"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: includes/aye-options-general.php:
|
491 |
msgid "HTTPS API used and errors are reported"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: includes/aye-options-general.php:
|
495 |
msgid "HTTP API used and no errors are reported"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: includes/aye-options-general.php:
|
499 |
msgid "HTTPS API used and no errors are reported"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: includes/aye-options-general.php:
|
503 |
msgid "Error Reporting"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: includes/aye-options-general.php:
|
507 |
msgid "Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output."
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: includes/aye-options-general.php:
|
511 |
msgid "Video Playback Error Message"
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: includes/aye-options-general.php:
|
515 |
msgid "This is the message that will be shown on the post"
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: includes/aye-options-general.php:
|
519 |
msgid "Security"
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: includes/aye-options-general.php:
|
523 |
msgid "Privacy-Enhanced Mode"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: includes/aye-options-general.php:
|
527 |
-
msgid "
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: includes/aye-options-general.php:
|
531 |
-
msgid "
|
|
|
|
|
|
|
|
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
msgid "Allow Frame Border on IFRAME"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/aye-options-general.php:
|
539 |
msgid "FRAMEBORDER is not HTML5 compliant"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: includes/aye-options-general.php:
|
543 |
-
#: includes/aye-options-lists.php:
|
544 |
-
#: includes/aye-options-profiles.php:
|
545 |
msgid "Save Settings"
|
546 |
msgstr ""
|
547 |
|
@@ -553,468 +680,508 @@ msgstr ""
|
|
553 |
msgid "Errors were found with your video list. See the list below for details."
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: includes/aye-options-lists.php:
|
557 |
msgid "List"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: includes/aye-options-lists.php:
|
561 |
msgid "Change list"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: includes/aye-options-lists.php:
|
565 |
msgid "These are the options for list "
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: includes/aye-options-lists.php:
|
569 |
msgid "Update the name, if required, and specify a list of YouTube video IDs. Use the drop-down on the right hand side to swap between lists."
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: includes/aye-options-lists.php:
|
573 |
msgid "List name"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: includes/aye-options-lists.php:
|
577 |
msgid "The name you wish to give this list"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: includes/aye-options-lists.php:
|
581 |
msgid "Video IDs (one per line)"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: includes/aye-options-lists.php:
|
585 |
-
#: includes/aye-options-widgets.php:
|
586 |
msgid "Video ID"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: includes/aye-options-lists.php:
|
590 |
-
#: includes/aye-options-widgets.php:19
|
591 |
msgid "Video Title"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: includes/aye-options-lists.php:
|
595 |
msgid "Status"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: includes/aye-options-lists.php:
|
599 |
msgid "This is a playlist"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: includes/aye-options-lists.php:
|
603 |
msgid "Invalid video ID"
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: includes/aye-options-lists.php:
|
607 |
msgid "YouTube API error"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/aye-options-lists.php:
|
611 |
msgid "Valid video"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: includes/aye-options-lists.php:
|
615 |
msgid "The video ID is valid"
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: includes/aye-options-lists.php:
|
619 |
msgid "The video ID is invalid"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: includes/aye-options-profiles.php:
|
623 |
msgid " Profile Saved."
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: includes/aye-options-profiles.php:
|
627 |
msgid "Change profile"
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: includes/aye-options-profiles.php:
|
631 |
msgid "These are the options for the default profile."
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: includes/aye-options-profiles.php:
|
635 |
#, php-format
|
636 |
msgid "These are the options for profile %s."
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: includes/aye-options-profiles.php:
|
640 |
msgid "Use the drop-down on the right hand side to swap between profiles."
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: includes/aye-options-profiles.php:
|
644 |
msgid "Profile name"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: includes/aye-options-profiles.php:
|
648 |
msgid "The name you wish to give this profile"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/aye-options-profiles.php:
|
652 |
msgid "Video Embed Type"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: includes/aye-options-profiles.php:
|
656 |
msgid "The type of player to use for videos."
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: includes/aye-options-profiles.php:
|
660 |
-
#: includes/aye-options-profiles.php:
|
661 |
-
#: includes/aye-options-profiles.php:
|
662 |
-
#: includes/aye-options-widgets.php:
|
663 |
msgid "IFRAME"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/aye-options-profiles.php:
|
667 |
-
msgid "Uses
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/aye-options-profiles.php:
|
671 |
-
#: includes/aye-options-profiles.php:
|
672 |
-
#: includes/aye-options-profiles.php:
|
673 |
-
#: includes/aye-options-widgets.php:
|
674 |
msgid "OBJECT"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: includes/aye-options-profiles.php:
|
678 |
msgid "Use the AS3 Flash player."
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: includes/aye-options-profiles.php:
|
682 |
-
#: includes/aye-options-widgets.php:
|
683 |
msgid "Chromeless"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: includes/aye-options-profiles.php:
|
687 |
-
msgid "Use the <a href=\"http://www.artiss.co.uk/
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: includes/aye-options-profiles.php:
|
691 |
-
#: includes/aye-options-profiles.php:
|
692 |
-
#: includes/aye-options-widgets.php:
|
693 |
msgid "EmbedPlus"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: includes/aye-options-profiles.php:
|
697 |
-
msgid "Use <a href=\"http://www.artiss.co.uk/
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: includes/aye-options-profiles.php:
|
701 |
msgid "Playlist Embed Type"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: includes/aye-options-profiles.php:
|
705 |
msgid "The type of player to use when showing playlists."
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: includes/aye-options-profiles.php:
|
709 |
msgid "Options For All Player Types"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: includes/aye-options-profiles.php:
|
713 |
-
#: includes/aye-options-widgets.php:
|
714 |
msgid "Template"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: includes/aye-options-profiles.php:
|
718 |
-
|
|
|
|
|
|
|
|
|
719 |
msgid "Style"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: includes/aye-options-profiles.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
msgid "Video size"
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: includes/aye-options-profiles.php:
|
727 |
msgid "The width x height of the video, in pixels"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: includes/aye-options-profiles.php:
|
731 |
msgid "Default Sizes"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: includes/aye-options-profiles.php:
|
735 |
msgid "Use above sizes"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/aye-options-profiles.php:
|
739 |
msgid "Select one of these default sizes to override the above video sizes"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: includes/aye-options-profiles.php:
|
743 |
-
#: includes/aye-options-widgets.php:
|
744 |
msgid "Dynamically Resize"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: includes/aye-options-profiles.php:
|
748 |
msgid "Show full width and resize with the browser"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: includes/aye-options-profiles.php:
|
752 |
msgid "Set Maximum Size"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: includes/aye-options-profiles.php:
|
756 |
msgid "Use above width to define maximum size"
|
757 |
msgstr ""
|
758 |
|
759 |
-
#: includes/aye-options-profiles.php:
|
760 |
msgid "Audio Only"
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: includes/aye-options-profiles.php:
|
764 |
msgid "Only show the toolbar for audio only playback"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: includes/aye-options-profiles.php:
|
768 |
-
#: includes/aye-options-widgets.php:
|
769 |
msgid "Autoplay"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: includes/aye-options-profiles.php:
|
773 |
msgid "The video will start playing when the player loads"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: includes/aye-options-profiles.php:
|
777 |
msgid "Options Not Supported by EmbedPlus"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: includes/aye-options-profiles.php:
|
781 |
msgid "Auto hide"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: includes/aye-options-profiles.php:
|
785 |
msgid "Controls & progress bar remain visible"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: includes/aye-options-profiles.php:
|
789 |
msgid "Controls & progress bar fade out"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: includes/aye-options-profiles.php:
|
793 |
msgid "Progress bar fades"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: includes/aye-options-profiles.php:
|
797 |
msgid "Video controls will automatically hide after a video begins playing"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: includes/aye-options-profiles.php:
|
801 |
msgid "Controls"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: includes/aye-options-profiles.php:
|
805 |
-
msgid "
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: includes/aye-options-profiles.php:
|
809 |
-
msgid "
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: includes/aye-options-profiles.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
msgid "Use SSL? <a href=\"http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS\">Read more</a>"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: includes/aye-options-profiles.php:
|
817 |
-
#: includes/aye-options-widgets.php:
|
818 |
msgid "Loop Video"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: includes/aye-options-profiles.php:
|
822 |
msgid "Play the initial video again and again. In the case of a playlist, this will play the entire playlist and then start again at the first video"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: includes/aye-options-profiles.php:
|
826 |
msgid "Information"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: includes/aye-options-profiles.php:
|
830 |
-
msgid "Display the video title and uploader before the video starts"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/aye-options-profiles.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
834 |
msgid "Theme"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: includes/aye-options-profiles.php:
|
838 |
msgid "Dark"
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: includes/aye-options-profiles.php:
|
842 |
msgid "Light"
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: includes/aye-options-profiles.php:
|
846 |
msgid "Display player controls within a dark or light control bar"
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: includes/aye-options-profiles.php:
|
850 |
-
msgid "
|
851 |
-
msgstr ""
|
852 |
-
|
853 |
-
#: includes/aye-options-profiles.php:260
|
854 |
-
msgid "Annotations"
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: includes/aye-options-profiles.php:
|
858 |
-
msgid "
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: includes/aye-options-profiles.php:
|
862 |
-
msgid "
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: includes/aye-options-profiles.php:
|
866 |
-
msgid "
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: includes/aye-options-profiles.php:
|
870 |
-
msgid "
|
871 |
msgstr ""
|
872 |
|
873 |
-
#: includes/aye-options-profiles.php:
|
874 |
-
msgid "
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: includes/aye-options-profiles.php:
|
878 |
-
msgid "
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: includes/aye-options-profiles.php:
|
882 |
-
msgid "
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: includes/aye-options-profiles.php:
|
886 |
-
msgid "
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: includes/aye-options-profiles.php:
|
890 |
-
msgid "Video
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: includes/aye-options-profiles.php:
|
894 |
-
msgid "
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: includes/aye-options-profiles.php:
|
898 |
-
msgid "
|
899 |
msgstr ""
|
900 |
|
901 |
-
#: includes/aye-options-profiles.php:
|
902 |
-
msgid "
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: includes/aye-options-profiles.php:
|
906 |
-
msgid "
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: includes/aye-options-profiles.php:
|
910 |
-
msgid "
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/aye-options-profiles.php:
|
914 |
-
msgid "
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: includes/aye-options-profiles.php:
|
918 |
-
msgid "
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: includes/aye-options-profiles.php:
|
922 |
-
msgid "
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: includes/aye-options-profiles.php:
|
926 |
msgid "Options Not Supported by HTML5 Player"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: includes/aye-options-profiles.php:
|
930 |
msgid "Window Mode"
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: includes/aye-options-profiles.php:
|
934 |
msgid "Opaque"
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: includes/aye-options-profiles.php:
|
938 |
msgid "Transparent"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: includes/aye-options-profiles.php:
|
942 |
msgid "Window"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: includes/aye-options-profiles.php:
|
946 |
msgid "Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. <a href=\"http://www.communitymx.com/content/article.cfm?cid=e5141\">Learn more</a>."
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: includes/aye-options-profiles.php:
|
950 |
msgid "Options Only Supported By EmbedPlus"
|
951 |
msgstr ""
|
952 |
|
953 |
-
#: includes/aye-options-profiles.php:
|
954 |
msgid "Learn more about EmbedPlus"
|
955 |
msgstr ""
|
956 |
|
957 |
-
#: includes/aye-options-profiles.php:
|
958 |
msgid "Fallback Embed Type"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: includes/aye-options-profiles.php:
|
962 |
msgid "The type of player to use if Flash is not available and EmbedPlus cannot be used."
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: includes/aye-options-profiles.php:
|
966 |
msgid "Play HD"
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: includes/aye-options-profiles.php:
|
970 |
msgid "Play the video in HD if possible"
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: includes/aye-options-profiles.php:
|
974 |
msgid "Real-time Reactions"
|
975 |
msgstr ""
|
976 |
|
977 |
-
#: includes/aye-options-profiles.php:
|
978 |
msgid "Show the Real-time Reactions button"
|
979 |
msgstr ""
|
980 |
|
981 |
-
#: includes/aye-options-profiles.php:
|
982 |
msgid "Sweet Spots"
|
983 |
msgstr ""
|
984 |
|
985 |
-
#: includes/aye-options-profiles.php:
|
986 |
msgid "Find sweet spots for the next and previous buttons"
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: includes/aye-options-profiles.php:
|
990 |
-
msgid "Would you like the video below to be yours? <a href=\"http://www.artiss.co.uk/
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: includes/aye-options-profiles.php:
|
994 |
msgid "YouTube Video Sample"
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: includes/aye-options-profiles.php:
|
998 |
-
msgid "
|
999 |
msgstr ""
|
1000 |
|
1001 |
-
#: includes/aye-options-profiles.php:
|
1002 |
-
msgid "Use the drop-down below to change which parameters the video uses - press the Change Video button to update it."
|
1003 |
-
msgstr ""
|
1004 |
-
|
1005 |
-
#: includes/aye-options-profiles.php:358
|
1006 |
msgid "Standard"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: includes/aye-options-profiles.php:
|
1010 |
msgid "3D"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: includes/aye-options-profiles.php:
|
1014 |
msgid "Playlist"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: includes/aye-options-profiles.php:
|
1018 |
msgid "Change video"
|
1019 |
msgstr ""
|
1020 |
|
@@ -1022,84 +1189,88 @@ msgstr ""
|
|
1022 |
msgid "Widget Title"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
-
#: includes/aye-options-widgets.php:
|
1026 |
msgid "ID Type"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: includes/aye-options-widgets.php:
|
1030 |
msgid "Video or Playlist"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: includes/aye-options-widgets.php:
|
1034 |
msgid "Search"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: includes/aye-options-widgets.php:
|
1038 |
msgid "User"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: includes/aye-options-widgets.php:
|
1042 |
-
#: includes/aye-shared-functions.php:
|
1043 |
msgid "Profile"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
-
#: includes/aye-options-widgets.php:
|
1047 |
msgid "Size"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
-
#: includes/aye-options-widgets.php:
|
1051 |
-
#: includes/aye-options-widgets.php:
|
1052 |
-
#: includes/aye-options-widgets.php:
|
1053 |
-
#: includes/aye-options-widgets.php:
|
1054 |
-
#: includes/aye-options-widgets.php:
|
1055 |
msgid "Profile default"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
-
#: includes/aye-options-widgets.php:
|
1059 |
-
#: includes/aye-options-widgets.php:
|
1060 |
-
#: includes/aye-options-widgets.php:
|
1061 |
msgid "No"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: includes/aye-options-widgets.php:
|
1065 |
-
#: includes/aye-options-widgets.php:
|
1066 |
-
#: includes/aye-options-widgets.php:
|
1067 |
msgid "Yes"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
-
#: includes/aye-options-widgets.php:
|
1071 |
msgid "Embed Type"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
-
#: includes/aye-options-widgets.php:
|
1075 |
msgid "Start (seconds)"
|
1076 |
msgstr ""
|
1077 |
|
1078 |
-
#: includes/aye-options-widgets.php:
|
1079 |
msgid "Stop (seconds)"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
-
#: includes/aye-options-widgets.php:
|
1083 |
msgid "Non-EmbedPlus Options"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: includes/aye-options-widgets.php:
|
1087 |
msgid "List Playback"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: includes/aye-options-widgets.php:
|
1091 |
msgid "Play each video in order"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
-
#: includes/aye-options-widgets.php:
|
1095 |
msgid "Play videos randomly"
|
1096 |
msgstr ""
|
1097 |
|
1098 |
-
#: includes/aye-options-widgets.php:
|
1099 |
msgid "Play one random video"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
-
#: includes/aye-
|
|
|
|
|
|
|
|
|
1103 |
#, php-format
|
1104 |
msgid "An error occurred accessing the YouTube API for video ID %s - %s"
|
1105 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: Artiss YouTube Embed\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-12-20 09:29-0000\n"
|
6 |
+
"PO-Revision-Date: 2012-12-20 09:29-0000\n"
|
7 |
"Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
13 |
"X-Poedit-Basepath: ../\n"
|
14 |
"X-Poedit-SearchPath-0: .\n"
|
15 |
|
16 |
+
#: includes/artiss-plugin-ads.php:46
|
17 |
+
#: includes/aye-admin-config.php:56
|
18 |
+
msgid "Donate"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: includes/artiss-plugin-ads.php:47
|
22 |
+
msgid "If you like this plugin and appreciate the effort being put into it, <a href=\"http://www.artiss.co.uk/donate\">please consider donating</a>."
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: includes/artiss-plugin-ads.php:48
|
26 |
+
msgid "Follow Me"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: includes/artiss-plugin-ads.php:49
|
30 |
+
msgid "Please stay in touch with the latest news via one of the following social streams..."
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: includes/artiss-plugin-ads.php:51
|
34 |
+
msgid "Follow Artiss.co.uk on Twitter"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: includes/artiss-plugin-ads.php:52
|
38 |
+
msgid "Follow Artiss.co.uk on Facebook"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: includes/artiss-plugin-ads.php:53
|
42 |
+
msgid "Follow Artiss.co.uk on Google+"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: includes/artiss-plugin-ads.php:54
|
46 |
+
msgid "Follow Artiss.co.uk on RSS feed"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
#: includes/aye-add-to-admin-bar.php:36
|
50 |
+
#: includes/aye-add-to-admin-bar.php:76
|
51 |
msgid "YouTube Embed"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: includes/aye-add-to-admin-bar.php:82
|
55 |
+
#: includes/aye-admin-config.php:103
|
56 |
+
msgid "Instructions"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/aye-add-to-admin-bar.php:91
|
60 |
+
#: includes/aye-admin-config.php:110
|
61 |
msgid "Options"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: includes/aye-add-to-admin-bar.php:100
|
65 |
+
#: includes/aye-admin-config.php:120
|
66 |
msgid "Profiles"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/aye-add-to-admin-bar.php:109
|
70 |
+
#: includes/aye-admin-config.php:130
|
71 |
msgid "Lists"
|
72 |
msgstr ""
|
73 |
|
|
|
|
|
|
|
|
|
|
|
74 |
#: includes/aye-admin-config.php:29
|
75 |
msgid "Settings"
|
76 |
msgstr ""
|
79 |
msgid "Support"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: includes/aye-admin-config.php:88
|
83 |
+
msgid "About Artiss YouTube Embeds"
|
|
|
|
|
|
|
|
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: includes/aye-admin-config.php:88
|
87 |
msgid "YouTube"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: includes/aye-admin-config.php:94
|
91 |
+
#: includes/aye-display-about.php:14
|
92 |
+
msgid "About Artiss YouTube Embed"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: includes/aye-admin-config.php:94
|
96 |
+
msgid "About"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: includes/aye-admin-config.php:103
|
100 |
+
#: includes/aye-display-instructions.php:14
|
101 |
+
msgid "Artiss YouTube Embed Instructions"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: includes/aye-admin-config.php:110
|
105 |
+
msgid "Artiss YouTube Embed Options"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: includes/aye-admin-config.php:120
|
109 |
+
msgid "Artiss YouTube Embed Profiles"
|
|
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: includes/aye-admin-config.php:130
|
113 |
+
msgid "Artiss YouTube Embed Lists"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: includes/aye-admin-config.php:254
|
117 |
+
#: includes/aye-admin-config.php:296
|
118 |
+
#: includes/aye-admin-config.php:339
|
119 |
+
#: includes/aye-admin-config.php:381
|
120 |
msgid "Help"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: includes/aye-admin-config.php:269
|
124 |
msgid "This screen allows you to select non-specific options for the Artiss YouTube Embed plugin. For the default embedding settings, please select the <a href=\"admin.php?page=aye-profile-options\">Profiles</a> administration option."
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: includes/aye-admin-config.php:270
|
128 |
+
#: includes/aye-admin-config.php:312
|
129 |
+
#: includes/aye-admin-config.php:355
|
130 |
msgid "Remember to click the Save Settings button at the bottom of the screen for new settings to take effect."
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/aye-admin-config.php:271
|
134 |
+
#: includes/aye-admin-config.php:313
|
135 |
+
#: includes/aye-admin-config.php:356
|
136 |
+
#: includes/aye-admin-config.php:397
|
137 |
msgid "For more information:"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/aye-admin-config.php:272
|
141 |
+
#: includes/aye-admin-config.php:314
|
142 |
+
#: includes/aye-admin-config.php:357
|
143 |
+
#: includes/aye-admin-config.php:398
|
144 |
msgid "Artiss YouTube Embed Plugin Documentation"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/aye-admin-config.php:273
|
148 |
+
#: includes/aye-admin-config.php:315
|
149 |
+
#: includes/aye-admin-config.php:358
|
150 |
+
#: includes/aye-admin-config.php:399
|
151 |
msgid "YouTube Player Documentation"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/aye-admin-config.php:274
|
155 |
+
#: includes/aye-admin-config.php:317
|
156 |
+
#: includes/aye-admin-config.php:359
|
157 |
+
#: includes/aye-admin-config.php:400
|
158 |
+
#: includes/aye-display-about.php:52
|
159 |
msgid "This plugin, and all support, is supplied for free, but <a title=\"Donate\" href=\"http://artiss.co.uk/donate\" target=\"_blank\">donations</a> are always welcome."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/aye-admin-config.php:311
|
163 |
msgid "This screen allows you to set the options for the default and additional profiles. If you don't specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required."
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/aye-admin-config.php:316
|
167 |
msgid "EmbedPlus website"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: includes/aye-admin-config.php:354
|
171 |
msgid "This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID."
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: includes/aye-admin-config.php:396
|
175 |
msgid "This screen provides useful information about this plugin along with methods of support."
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: includes/aye-admin-config.php:458
|
179 |
msgid "Welcome to Artiss YouTube Embed"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/aye-admin-config.php:459
|
183 |
msgid "Thank you for installing this plugin."
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/aye-admin-config.php:460
|
187 |
msgid "These new menu options will allow you to configure your videos to just how you want them and provide links for help and support."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/aye-admin-config.php:461
|
191 |
msgid "Even if you do nothing else, please visit the Profiles option to check your default video values."
|
192 |
msgstr ""
|
193 |
|
195 |
msgid "This function does not support playlists"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/aye-display-about.php:26
|
199 |
#, php-format
|
200 |
msgid "You are using Artiss YouTube Embed version %s. It was written by David Artiss."
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: includes/aye-display-about.php:28
|
204 |
+
msgid "Powered by YouTube"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: includes/aye-display-about.php:32
|
208 |
msgid "Copyrights"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: includes/aye-display-about.php:34
|
212 |
msgid "YouTube, and all associated logos, is the copyright of Google Inc."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: includes/aye-display-about.php:36
|
216 |
msgid "EmbedPlus is copyright. Read the <a href=\"http://embedplus.com/terms.aspx\" target=\"_blank\">Terms & Conditions of Use</a>."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: includes/aye-display-about.php:38
|
220 |
msgid "Acknowledgements"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: includes/aye-display-about.php:40
|
224 |
msgid "Images have been compressed with <a href=\"http://www.smushit.com/ysmush.it/\">Smush.it</a>."
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: includes/aye-display-about.php:42
|
228 |
msgid "JavaScript has been compressed with <a href=\"http://javascriptcompressor.com/\">JavaScript Compressor</a>."
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: includes/aye-display-about.php:44
|
232 |
+
msgid "YouTube icons are from <a href=\"http://www.youtube.com/t/creators_downloads\">YouTube</a>. Other icons are by <a href=\"http://p.yusukekamiyamane.com/\">Yusuke Kamiyamane</a>."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: includes/aye-display-about.php:46
|
236 |
+
msgid "Video downloads are courtesy of <a href=\"http://www.videodownloadx.com/\">Videodownloadx</a>."
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: includes/aye-display-about.php:48
|
240 |
msgid "Support Information"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: includes/aye-display-about.php:50
|
244 |
msgid "Useful support information and links can be found by clicking on the Help tab at the top of each of the Artiss YouTube Embed administration screens."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: includes/aye-display-about.php:54
|
248 |
msgid "Stay in Touch"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: includes/aye-display-about.php:56
|
252 |
msgid "<a href=\"http://www.artiss.co.uk/wp-plugins\">See the full list</a> of Artiss plugins, including beta releases."
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: includes/aye-display-about.php:58
|
256 |
msgid "<a href=\"http://www.twitter.com/artiss_tech\">Follow Artiss.co.uk</a> on Twitter."
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: includes/aye-display-about.php:60
|
260 |
msgid "<a href=\"http://www.artiss.co.uk/feed\">Subscribe</a> to the Artiss.co.uk news feed."
|
261 |
msgstr ""
|
262 |
|
|
|
|
|
|
|
|
|
263 |
#: includes/aye-function-calls.php:162
|
264 |
#: includes/aye-function-calls.php:223
|
265 |
+
#: includes/aye-generate-download-code.php:36
|
266 |
+
#: includes/aye-generate-embed-code.php:114
|
267 |
#: includes/aye-generate-shorturl-code.php:34
|
268 |
+
#: includes/aye-generate-thumbnail-code.php:39
|
269 |
#: includes/aye-generate-transcript-code.php:38
|
270 |
#, php-format
|
271 |
msgid "The YouTube ID of %s is invalid."
|
280 |
msgid "No YouTube ID was found."
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: includes/aye-generate-embed-code.php:64
|
284 |
msgid "No video/playlist ID has been supplied"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: includes/aye-generate-embed-code.php:181
|
288 |
msgid "A video list cannot be viewed within this feed - please view the original content"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: includes/aye-generate-embed-code.php:185
|
292 |
msgid "Click here to view the video on YouTube"
|
293 |
msgstr ""
|
294 |
|
296 |
msgid "No video ID has been supplied"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: includes/aye-generate-thumbnail-code.php:51
|
300 |
+
#, php-format
|
301 |
+
msgid "YouTube Video %s"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
#: includes/aye-generate-widgets.php:25
|
305 |
msgid "Embed YouTube Widget."
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: includes/aye-options-general.php:62
|
309 |
#: includes/aye-options-lists.php:26
|
310 |
msgid "Settings Saved."
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: includes/aye-options-general.php:86
|
314 |
msgid "Cache cleared."
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: includes/aye-options-general.php:106
|
318 |
msgid "These are the general settings for Artiss YouTube Embed. Please select <a href=\"admin.php?page=aye-profile-options\">Profiles</a> for default embedding settings."
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: includes/aye-options-general.php:113
|
322 |
+
msgid "Remove Adverts"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: includes/aye-options-general.php:114
|
326 |
+
msgid "If you've <a href=\"http://www.artiss.co.uk/donate\">donated</a>, tick here to remove the adverts from these administration screens"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: includes/aye-options-general.php:119
|
330 |
msgid "Embedding"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: includes/aye-options-general.php:123
|
334 |
msgid "Add Metadata"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: includes/aye-options-general.php:124
|
338 |
+
msgid "Allow rich metadata to be added to code. <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-metadata\">Learn more</a>"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/aye-options-general.php:128
|
342 |
msgid "Comment Embedding"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/aye-options-general.php:129
|
346 |
+
msgid "Allow YouTube URLs in comments - will display as embedded videos. <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-comments\">Learn more</a>"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: includes/aye-options-general.php:133
|
|
|
|
|
350 |
#: includes/aye-options-general.php:174
|
351 |
+
#: includes/aye-options-general.php:186
|
352 |
+
#: includes/aye-options-general.php:207
|
353 |
msgid "Profile to use"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/aye-options-general.php:140
|
357 |
msgid "Feed"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: includes/aye-options-general.php:142
|
361 |
msgid "Text link"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: includes/aye-options-general.php:143
|
365 |
msgid "Thumbnail"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: includes/aye-options-general.php:144
|
369 |
msgid "Thumbnail & Text Link"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: includes/aye-options-general.php:145
|
373 |
msgid "Videos cannot be embedded in feeds. Select how you wish them to be shown instead"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: includes/aye-options-general.php:149
|
377 |
msgid "Thumbnail to use"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: includes/aye-options-general.php:151
|
381 |
+
#: includes/aye-shared-functions.php:481
|
382 |
msgid "Default"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: includes/aye-options-general.php:152
|
386 |
msgid "Default (HQ)"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: includes/aye-options-general.php:153
|
390 |
msgid "Start"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: includes/aye-options-general.php:154
|
394 |
msgid "Middle"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: includes/aye-options-general.php:155
|
398 |
msgid "End"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: includes/aye-options-general.php:156
|
402 |
msgid "Which thumbnail to use"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: includes/aye-options-general.php:160
|
406 |
+
msgid "Allow shortcodes in widgets"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: includes/aye-options-general.php:161
|
410 |
+
msgid "Allow shortcodes to be used in widgets - this will apply to <strong>all</strong> widgets"
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: includes/aye-options-general.php:165
|
414 |
msgid "Alternative Shortcodes"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: includes/aye-options-general.php:165
|
418 |
+
msgid "Specify up to 2 alternative shortcodes to compliment the standard <code>youtube</code> shortcode. <strong>NB: These should be specified without the surrounding square brackets.</strong>"
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: includes/aye-options-general.php:169
|
422 |
msgid "Alternative Shortcode 1"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: includes/aye-options-general.php:181
|
426 |
msgid "Alternative Shortcode 2"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: includes/aye-options-general.php:193
|
430 |
msgid "Migration"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: includes/aye-options-general.php:193
|
434 |
+
msgid "Switch on compatibility with other embedding plugins. For more details on migrating from another plugin, please <a href=\"http://www.artiss.co.uk/youtube-embed/compatibility\">click here</a>."
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#: includes/aye-options-general.php:197
|
438 |
msgid "Bracket Embedding"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: includes/aye-options-general.php:198
|
442 |
msgid "Allow embedding using URLs within brackets. Activating impacts performance"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: includes/aye-options-general.php:202
|
446 |
msgid "Alternative Embedding"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: includes/aye-options-general.php:203
|
450 |
msgid "Allow all other types of embedding. Activating impacts performance"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: includes/aye-options-general.php:210
|
454 |
msgid "For above 2 options"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: includes/aye-options-general.php:214
|
458 |
msgid "Admin Options"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/aye-options-general.php:218
|
462 |
+
msgid "Show Editor Button"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/aye-options-general.php:219
|
466 |
msgid "Show the YouTube button on the post editor"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: includes/aye-options-general.php:223
|
470 |
+
msgid "Editor Button Shortcode"
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: includes/aye-options-general.php:224
|
474 |
+
msgid "Shortcode for editor button to use."
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#: includes/aye-options-general.php:228
|
478 |
msgid "Add to Admin Bar"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: includes/aye-options-general.php:229
|
482 |
msgid "Add link to options screen to Admin Bar"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: includes/aye-options-general.php:233
|
486 |
+
msgid "Profiles Screen Access"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: includes/aye-options-general.php:235
|
490 |
+
#: includes/aye-options-general.php:245
|
491 |
+
msgid "Administrator"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: includes/aye-options-general.php:236
|
495 |
+
#: includes/aye-options-general.php:246
|
496 |
+
msgid "Editor"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: includes/aye-options-general.php:237
|
500 |
+
#: includes/aye-options-general.php:247
|
501 |
+
msgid "Author"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: includes/aye-options-general.php:238
|
505 |
+
#: includes/aye-options-general.php:248
|
506 |
+
msgid "Contributor"
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: includes/aye-options-general.php:239
|
510 |
+
msgid "Specify the user access required for the profiles screen"
|
511 |
+
msgstr ""
|
512 |
+
|
513 |
+
#: includes/aye-options-general.php:243
|
514 |
+
msgid "Lists Screen Access"
|
515 |
+
msgstr ""
|
516 |
+
|
517 |
+
#: includes/aye-options-general.php:249
|
518 |
+
msgid "Specify the user access required for the lists screen"
|
519 |
+
msgstr ""
|
520 |
+
|
521 |
+
#: includes/aye-options-general.php:253
|
522 |
msgid "Profile & List Sizes"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: includes/aye-options-general.php:257
|
526 |
msgid "Number of Profiles"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: includes/aye-options-general.php:258
|
530 |
msgid "Maximum number of profiles"
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: includes/aye-options-general.php:262
|
534 |
msgid "Number of Lists"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: includes/aye-options-general.php:263
|
538 |
msgid "Maximum number of lists"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: includes/aye-options-general.php:267
|
542 |
msgid "Performance"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/aye-options-general.php:271
|
546 |
msgid "Embed Cache"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: includes/aye-options-general.php:272
|
550 |
msgid "How many hours to retain embed output. 0 to switch off"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: includes/aye-options-general.php:276
|
554 |
msgid "Video Information Cache"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: includes/aye-options-general.php:277
|
558 |
msgid "How many hours to retain video information, including it's validity. 0 to switch off"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: includes/aye-options-general.php:281
|
562 |
msgid "Transcript Cache"
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: includes/aye-options-general.php:282
|
566 |
msgid "How many hours to store transcripts for in cache. 0 to switch off"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: includes/aye-options-general.php:291
|
570 |
+
msgid "You currently have cache for"
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: includes/aye-options-general.php:291
|
574 |
+
msgid "and"
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: includes/aye-options-general.php:295
|
578 |
msgid "Clear Cache"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: includes/aye-options-general.php:296
|
582 |
+
msgid "Select this option to remove all YouTube Embed cache."
|
|
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: includes/aye-options-general.php:299
|
586 |
msgid "YouTube API"
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: includes/aye-options-general.php:301
|
590 |
msgid "The YouTube API is used to validate video IDs and to determine if it is a video or playlist."
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: includes/aye-options-general.php:305
|
594 |
msgid "API State"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: includes/aye-options-general.php:307
|
598 |
msgid "API should not be used"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: includes/aye-options-general.php:308
|
602 |
msgid "HTTP API used and errors are reported"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: includes/aye-options-general.php:309
|
606 |
msgid "HTTPS API used and errors are reported"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: includes/aye-options-general.php:310
|
610 |
msgid "HTTP API used and no errors are reported"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: includes/aye-options-general.php:311
|
614 |
msgid "HTTPS API used and no errors are reported"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: includes/aye-options-general.php:316
|
618 |
msgid "Error Reporting"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: includes/aye-options-general.php:318
|
622 |
msgid "Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output."
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: includes/aye-options-general.php:321
|
626 |
msgid "Video Playback Error Message"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: includes/aye-options-general.php:322
|
630 |
msgid "This is the message that will be shown on the post"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: includes/aye-options-general.php:325
|
634 |
msgid "Security"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: includes/aye-options-general.php:330
|
638 |
msgid "Privacy-Enhanced Mode"
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: includes/aye-options-general.php:332
|
642 |
+
msgid "Cookies should always be stored"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: includes/aye-options-general.php:333
|
646 |
+
msgid "Cookies should never be stored"
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: includes/aye-options-general.php:334
|
650 |
+
msgid "Cookies should be stored based on user's Do Not Track setting"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: includes/aye-options-general.php:335
|
654 |
+
msgid "Read more about <a href=\"http://donottrack.us/\">Do Not Track</a>"
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: includes/aye-options-general.php:338
|
658 |
+
msgid "Compatibility"
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: includes/aye-options-general.php:341
|
662 |
msgid "Allow Frame Border on IFRAME"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: includes/aye-options-general.php:342
|
666 |
msgid "FRAMEBORDER is not HTML5 compliant"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: includes/aye-options-general.php:347
|
670 |
+
#: includes/aye-options-lists.php:125
|
671 |
+
#: includes/aye-options-profiles.php:371
|
672 |
msgid "Save Settings"
|
673 |
msgstr ""
|
674 |
|
680 |
msgid "Errors were found with your video list. See the list below for details."
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: includes/aye-options-lists.php:94
|
684 |
msgid "List"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: includes/aye-options-lists.php:104
|
688 |
msgid "Change list"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: includes/aye-options-lists.php:107
|
692 |
msgid "These are the options for list "
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: includes/aye-options-lists.php:107
|
696 |
msgid "Update the name, if required, and specify a list of YouTube video IDs. Use the drop-down on the right hand side to swap between lists."
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: includes/aye-options-lists.php:112
|
700 |
msgid "List name"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: includes/aye-options-lists.php:114
|
704 |
msgid "The name you wish to give this list"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: includes/aye-options-lists.php:118
|
708 |
msgid "Video IDs (one per line)"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/aye-options-lists.php:136
|
712 |
+
#: includes/aye-options-widgets.php:19
|
713 |
msgid "Video ID"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: includes/aye-options-lists.php:136
|
|
|
717 |
msgid "Video Title"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: includes/aye-options-lists.php:136
|
721 |
msgid "Status"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: includes/aye-options-lists.php:152
|
725 |
msgid "This is a playlist"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: includes/aye-options-lists.php:156
|
729 |
msgid "Invalid video ID"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: includes/aye-options-lists.php:160
|
733 |
msgid "YouTube API error"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: includes/aye-options-lists.php:163
|
737 |
msgid "Valid video"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: includes/aye-options-lists.php:181
|
741 |
msgid "The video ID is valid"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: includes/aye-options-lists.php:184
|
745 |
msgid "The video ID is invalid"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: includes/aye-options-profiles.php:93
|
749 |
msgid " Profile Saved."
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: includes/aye-options-profiles.php:120
|
753 |
msgid "Change profile"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: includes/aye-options-profiles.php:125
|
757 |
msgid "These are the options for the default profile."
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: includes/aye-options-profiles.php:127
|
761 |
#, php-format
|
762 |
msgid "These are the options for profile %s."
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: includes/aye-options-profiles.php:129
|
766 |
msgid "Use the drop-down on the right hand side to swap between profiles."
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: includes/aye-options-profiles.php:135
|
770 |
msgid "Profile name"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: includes/aye-options-profiles.php:137
|
774 |
msgid "The name you wish to give this profile"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: includes/aye-options-profiles.php:141
|
778 |
msgid "Video Embed Type"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: includes/aye-options-profiles.php:142
|
782 |
msgid "The type of player to use for videos."
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: includes/aye-options-profiles.php:143
|
786 |
+
#: includes/aye-options-profiles.php:153
|
787 |
+
#: includes/aye-options-profiles.php:349
|
788 |
+
#: includes/aye-options-widgets.php:89
|
789 |
msgid "IFRAME"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: includes/aye-options-profiles.php:143
|
793 |
+
msgid "Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 player. This is the current YouTube default."
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: includes/aye-options-profiles.php:144
|
797 |
+
#: includes/aye-options-profiles.php:154
|
798 |
+
#: includes/aye-options-profiles.php:350
|
799 |
+
#: includes/aye-options-widgets.php:91
|
800 |
msgid "OBJECT"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: includes/aye-options-profiles.php:144
|
804 |
msgid "Use the AS3 Flash player."
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: includes/aye-options-profiles.php:145
|
808 |
+
#: includes/aye-options-widgets.php:93
|
809 |
msgid "Chromeless"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: includes/aye-options-profiles.php:145
|
813 |
+
msgid "Use the <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-chromeless\">Chromeless</a> version of the AS3 Flash Player."
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: includes/aye-options-profiles.php:146
|
817 |
+
#: includes/aye-options-profiles.php:386
|
818 |
+
#: includes/aye-options-widgets.php:95
|
819 |
msgid "EmbedPlus"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: includes/aye-options-profiles.php:146
|
823 |
+
msgid "Use <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus\">EmbedPlus</a>, if Flash is available."
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: includes/aye-options-profiles.php:151
|
827 |
msgid "Playlist Embed Type"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: includes/aye-options-profiles.php:152
|
831 |
msgid "The type of player to use when showing playlists."
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: includes/aye-options-profiles.php:159
|
835 |
msgid "Options For All Player Types"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: includes/aye-options-profiles.php:163
|
839 |
+
#: includes/aye-options-widgets.php:49
|
840 |
msgid "Template"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: includes/aye-options-profiles.php:164
|
844 |
+
msgid "Wrapper for video output. Must include <code>%video%</code> tag to show video position"
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: includes/aye-options-profiles.php:168
|
848 |
+
#: includes/aye-options-widgets.php:55
|
849 |
msgid "Style"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: includes/aye-options-profiles.php:169
|
853 |
+
msgid "CSS elements to apply to video"
|
854 |
+
msgstr ""
|
855 |
+
|
856 |
+
#: includes/aye-options-profiles.php:175
|
857 |
+
msgid "Show Download Link"
|
858 |
+
msgstr ""
|
859 |
+
|
860 |
+
#: includes/aye-options-profiles.php:176
|
861 |
+
#, php-format
|
862 |
+
msgid "Show a link to %s under the video"
|
863 |
+
msgstr ""
|
864 |
+
|
865 |
+
#: includes/aye-options-profiles.php:180
|
866 |
+
msgid "Download Text"
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#: includes/aye-options-profiles.php:181
|
870 |
+
msgid "Text or HTML to display to prompt download"
|
871 |
+
msgstr ""
|
872 |
+
|
873 |
+
#: includes/aye-options-profiles.php:185
|
874 |
+
msgid "Download Style"
|
875 |
+
msgstr ""
|
876 |
+
|
877 |
+
#: includes/aye-options-profiles.php:186
|
878 |
+
msgid "CSS elements to apply to video download link"
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: includes/aye-options-profiles.php:192
|
882 |
msgid "Video size"
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: includes/aye-options-profiles.php:193
|
886 |
msgid "The width x height of the video, in pixels"
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: includes/aye-options-profiles.php:197
|
890 |
msgid "Default Sizes"
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: includes/aye-options-profiles.php:199
|
894 |
msgid "Use above sizes"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: includes/aye-options-profiles.php:205
|
898 |
msgid "Select one of these default sizes to override the above video sizes"
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: includes/aye-options-profiles.php:209
|
902 |
+
#: includes/aye-options-widgets.php:73
|
903 |
msgid "Dynamically Resize"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: includes/aye-options-profiles.php:210
|
907 |
msgid "Show full width and resize with the browser"
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: includes/aye-options-profiles.php:214
|
911 |
msgid "Set Maximum Size"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: includes/aye-options-profiles.php:215
|
915 |
msgid "Use above width to define maximum size"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: includes/aye-options-profiles.php:222
|
919 |
msgid "Audio Only"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: includes/aye-options-profiles.php:223
|
923 |
msgid "Only show the toolbar for audio only playback"
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: includes/aye-options-profiles.php:227
|
927 |
+
#: includes/aye-options-widgets.php:101
|
928 |
msgid "Autoplay"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: includes/aye-options-profiles.php:228
|
932 |
msgid "The video will start playing when the player loads"
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: includes/aye-options-profiles.php:233
|
936 |
msgid "Options Not Supported by EmbedPlus"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: includes/aye-options-profiles.php:238
|
940 |
msgid "Auto hide"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: includes/aye-options-profiles.php:240
|
944 |
msgid "Controls & progress bar remain visible"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: includes/aye-options-profiles.php:241
|
948 |
msgid "Controls & progress bar fade out"
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: includes/aye-options-profiles.php:242
|
952 |
msgid "Progress bar fades"
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: includes/aye-options-profiles.php:243
|
956 |
msgid "Video controls will automatically hide after a video begins playing"
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: includes/aye-options-profiles.php:247
|
960 |
msgid "Controls"
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: includes/aye-options-profiles.php:249
|
964 |
+
msgid "Controls do not display & Flash player loads immediately"
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: includes/aye-options-profiles.php:250
|
968 |
+
msgid "Controls display & Flash player loads immediately"
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: includes/aye-options-profiles.php:251
|
972 |
+
msgid "Controls display & Flash player loads once video starts"
|
973 |
+
msgstr ""
|
974 |
+
|
975 |
+
#: includes/aye-options-profiles.php:252
|
976 |
+
msgid "Whether the video player controls will display. For AS3 player it also defines when the Flash player will load"
|
977 |
+
msgstr ""
|
978 |
+
|
979 |
+
#: includes/aye-options-profiles.php:257
|
980 |
msgid "Use SSL? <a href=\"http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS\">Read more</a>"
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: includes/aye-options-profiles.php:261
|
984 |
+
#: includes/aye-options-widgets.php:147
|
985 |
msgid "Loop Video"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: includes/aye-options-profiles.php:262
|
989 |
msgid "Play the initial video again and again. In the case of a playlist, this will play the entire playlist and then start again at the first video"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: includes/aye-options-profiles.php:266
|
993 |
msgid "Information"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: includes/aye-options-profiles.php:267
|
997 |
+
msgid "Display the video title and uploader before the video starts. If displaying a playlist this will show video thumbnails"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: includes/aye-options-profiles.php:271
|
1001 |
+
msgid "Related Videos"
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: includes/aye-options-profiles.php:272
|
1005 |
+
msgid "Load related videos once playback starts. Also toggles the search option."
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: includes/aye-options-profiles.php:276
|
1009 |
msgid "Theme"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: includes/aye-options-profiles.php:278
|
1013 |
msgid "Dark"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: includes/aye-options-profiles.php:279
|
1017 |
msgid "Light"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: includes/aye-options-profiles.php:280
|
1021 |
msgid "Display player controls within a dark or light control bar"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: includes/aye-options-profiles.php:284
|
1025 |
+
msgid "Progress Bar Colour"
|
|
|
|
|
|
|
|
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: includes/aye-options-profiles.php:286
|
1029 |
+
msgid "Red"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: includes/aye-options-profiles.php:287
|
1033 |
+
msgid "White (desaturated)"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: includes/aye-options-profiles.php:288
|
1037 |
+
msgid "The colour that will be used in the player's video progress bar to highlight the amount of the video that's already been seen"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: includes/aye-options-profiles.php:292
|
1041 |
+
msgid "Modest Branding"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: includes/aye-options-profiles.php:293
|
1045 |
+
msgid "Reduce branding on video."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: includes/aye-options-profiles.php:298
|
1049 |
+
msgid "Options for AS3 Player"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: includes/aye-options-profiles.php:299
|
1053 |
+
msgid "The following options are not supported if using EmbedPlus or if the IFRAME player uses HTML5."
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: includes/aye-options-profiles.php:303
|
1057 |
+
msgid "Annotations"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: includes/aye-options-profiles.php:304
|
1061 |
+
msgid "Video annotations are shown by default"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: includes/aye-options-profiles.php:308
|
1065 |
+
msgid "Closed Captions"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: includes/aye-options-profiles.php:309
|
1069 |
+
msgid "Show closed captions (subtitles) by default, even if the user has turned captions off"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: includes/aye-options-profiles.php:313
|
1073 |
+
msgid "Disable Keyboard"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: includes/aye-options-profiles.php:314
|
1077 |
+
msgid "Disable the player keyboard controls"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: includes/aye-options-profiles.php:318
|
1081 |
+
msgid "Fullscreen"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: includes/aye-options-profiles.php:319
|
1085 |
+
msgid "A button will allow the viewer to watch the video fullscreen"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: includes/aye-options-profiles.php:323
|
1089 |
+
msgid "Link to YouTube"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: includes/aye-options-profiles.php:324
|
1093 |
+
msgid "Video links back to YouTube when clicked"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: includes/aye-options-profiles.php:329
|
1097 |
msgid "Options Not Supported by HTML5 Player"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: includes/aye-options-profiles.php:333
|
1101 |
msgid "Window Mode"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: includes/aye-options-profiles.php:335
|
1105 |
msgid "Opaque"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: includes/aye-options-profiles.php:336
|
1109 |
msgid "Transparent"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: includes/aye-options-profiles.php:337
|
1113 |
msgid "Window"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: includes/aye-options-profiles.php:338
|
1117 |
msgid "Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. <a href=\"http://www.communitymx.com/content/article.cfm?cid=e5141\">Learn more</a>."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: includes/aye-options-profiles.php:343
|
1121 |
msgid "Options Only Supported By EmbedPlus"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: includes/aye-options-profiles.php:343
|
1125 |
msgid "Learn more about EmbedPlus"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: includes/aye-options-profiles.php:347
|
1129 |
msgid "Fallback Embed Type"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: includes/aye-options-profiles.php:348
|
1133 |
msgid "The type of player to use if Flash is not available and EmbedPlus cannot be used."
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: includes/aye-options-profiles.php:354
|
1137 |
msgid "Play HD"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: includes/aye-options-profiles.php:355
|
1141 |
msgid "Play the video in HD if possible"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: includes/aye-options-profiles.php:359
|
1145 |
msgid "Real-time Reactions"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: includes/aye-options-profiles.php:360
|
1149 |
msgid "Show the Real-time Reactions button"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: includes/aye-options-profiles.php:364
|
1153 |
msgid "Sweet Spots"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: includes/aye-options-profiles.php:365
|
1157 |
msgid "Find sweet spots for the next and previous buttons"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: includes/aye-options-profiles.php:375
|
1161 |
+
msgid "Would you like the video below to be yours? <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-sponsorship\">Click here</a> for sponsorship information."
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: includes/aye-options-profiles.php:382
|
1165 |
msgid "YouTube Video Sample"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: includes/aye-options-profiles.php:383
|
1169 |
+
msgid "The video below uses the above, saved profile settings. Use the drop-down below to change which parameters the video uses - press the Change Video button to update it."
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: includes/aye-options-profiles.php:385
|
|
|
|
|
|
|
|
|
1173 |
msgid "Standard"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: includes/aye-options-profiles.php:387
|
1177 |
msgid "3D"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: includes/aye-options-profiles.php:388
|
1181 |
msgid "Playlist"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: includes/aye-options-profiles.php:391
|
1185 |
msgid "Change video"
|
1186 |
msgstr ""
|
1187 |
|
1189 |
msgid "Widget Title"
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: includes/aye-options-widgets.php:27
|
1193 |
msgid "ID Type"
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: includes/aye-options-widgets.php:29
|
1197 |
msgid "Video or Playlist"
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: includes/aye-options-widgets.php:31
|
1201 |
msgid "Search"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: includes/aye-options-widgets.php:33
|
1205 |
msgid "User"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
+
#: includes/aye-options-widgets.php:41
|
1209 |
+
#: includes/aye-shared-functions.php:488
|
1210 |
msgid "Profile"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
+
#: includes/aye-options-widgets.php:61
|
1214 |
msgid "Size"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
+
#: includes/aye-options-widgets.php:75
|
1218 |
+
#: includes/aye-options-widgets.php:87
|
1219 |
+
#: includes/aye-options-widgets.php:103
|
1220 |
+
#: includes/aye-options-widgets.php:135
|
1221 |
+
#: includes/aye-options-widgets.php:149
|
1222 |
msgid "Profile default"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
+
#: includes/aye-options-widgets.php:77
|
1226 |
+
#: includes/aye-options-widgets.php:105
|
1227 |
+
#: includes/aye-options-widgets.php:151
|
1228 |
msgid "No"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: includes/aye-options-widgets.php:79
|
1232 |
+
#: includes/aye-options-widgets.php:107
|
1233 |
+
#: includes/aye-options-widgets.php:153
|
1234 |
msgid "Yes"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: includes/aye-options-widgets.php:85
|
1238 |
msgid "Embed Type"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: includes/aye-options-widgets.php:113
|
1242 |
msgid "Start (seconds)"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: includes/aye-options-widgets.php:119
|
1246 |
msgid "Stop (seconds)"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: includes/aye-options-widgets.php:124
|
1250 |
msgid "Non-EmbedPlus Options"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: includes/aye-options-widgets.php:133
|
1254 |
msgid "List Playback"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: includes/aye-options-widgets.php:137
|
1258 |
msgid "Play each video in order"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: includes/aye-options-widgets.php:139
|
1262 |
msgid "Play videos randomly"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: includes/aye-options-widgets.php:141
|
1266 |
msgid "Play one random video"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: includes/aye-set-defaults.php:103
|
1270 |
+
msgid "The video cannot be shown at the moment. Please try again later."
|
1271 |
+
msgstr ""
|
1272 |
+
|
1273 |
+
#: includes/aye-shared-functions.php:240
|
1274 |
#, php-format
|
1275 |
msgid "An error occurred accessing the YouTube API for video ID %s - %s"
|
1276 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,15 +1,17 @@
|
|
1 |
=== Artiss YouTube Embed ===
|
2 |
-
Contributors:
|
3 |
Donate link: http://artiss.co.uk/donate
|
4 |
-
Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, search, sidebar, simple, smart, url, user, valid, video, widget, width, xhtml, youtube, youtuber
|
5 |
Requires at least: 2.9
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
|
10 |
|
11 |
== Description ==
|
12 |
|
|
|
|
|
13 |
Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet powerful, method of embedding YouTube videos into your WordPress site. Options include:
|
14 |
|
15 |
* XHTML and HTML5 compliant - works with all the latest browsers
|
@@ -23,10 +25,14 @@ Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet power
|
|
23 |
* Code is cached for maximum performance
|
24 |
* Using a different YouTube plugin? Documentation and tools are provided to help you migrate to Artiss YouTube Embed
|
25 |
* Fully internationalized ready for translations. **If you would like to add a translation to his plugin then please [contact me](http://artiss.co.uk/contact "Contact")**
|
|
|
|
|
26 |
* And much, much more!
|
27 |
|
28 |
It has all the features of other similar plugins - Smart YouTube, for instance. In fact if there's a feature in another YouTube embedding plugin that this doesn't have, let me know - I haven't come across it!
|
29 |
|
|
|
|
|
30 |
To add a video to a post or page simply use the shortcode `[youtube]video[/youtube]`, where `video` is the ID or URL of the video. Alternatively, you can add one (or more) widgets to your sidebar.
|
31 |
|
32 |
Within the administration area of your blog you will find a new menu named `YouTube` (see screenshot 1). Click on the `Options` sub-menu to set a number of general options. Alternatively click on the `Profiles` sub-menu to set the default options which define the output of your videos - any videos you display (unless overridden by parameters - more on that later) will use the settings from the Profiles screen.
|
@@ -60,28 +66,27 @@ The following parameters work with all embed types:
|
|
60 |
* **start** - a number of seconds from where to start the video playing
|
61 |
* **style** - apply CSS elements directly to the video output
|
62 |
* **template** - specify a template (see section on Templates for further details)
|
63 |
-
* **title** - the title of the video
|
64 |
* **type** - which embedding type to use, this can be `embedplus`, `iframe`, `object` or `chromeless`
|
65 |
* **width** - the video width, in pixels
|
66 |
|
67 |
The following parameters will not work with EmbedPlus:
|
68 |
|
69 |
* **autohide** - 0, 1 or 2, this parameter indicates whether the video controls will automatically hide after a video begins playing. The default behaviour, a value of 2, is for the video progress bar to fade out while the player controls (play button, volume control, etc.) remain visible. If this parameter is set to 0, the video progress bar and the video player controls will be visible throughout the video. If this parameter is set to 1, then the video progress bar and the player controls will slide out of view a couple of seconds after the video starts playing. They will only reappear if the user moves her mouse over the video player or presses a key on her keyboard.
|
70 |
-
* **
|
|
|
71 |
* **https** - yes or no, whether to use HTTPS for the video
|
72 |
-
* **info** - yes or no, show video information
|
73 |
* **loop** - yes or no, whether to start the video again once it ends
|
|
|
74 |
* **theme** - dark or light, display player controls (like a 'play' button or volume control) within a dark or light control bar
|
75 |
|
76 |
The following parameters will not work with EmbedPlus or if IFRAME uses HTML5:
|
77 |
|
78 |
* **annotation** - yes or no, this determines if annotations are shown
|
79 |
* **cc** - yes or no, decided whether closed captions (subtitles) are displayed
|
80 |
-
* **color** - white or red, the colour of the progress bar (see the FAQ about having a white progress bar with the light theme)
|
81 |
* **disablekb** - yes or no, disable keyboard controls
|
82 |
* **fullscreen** - yes or no, this will add the fullscreen button to the toolbar. This also works with EmbedPlus.
|
83 |
* **link** - yes or no, link video to YouTube
|
84 |
-
* **related** - yes or no, show related videos
|
85 |
* **search** - yes or no, create a playlist based on a search word. The search word should be specified instead of a video ID. See "Automatically Generate Playlists" option for more details
|
86 |
* **user** - yes or no, create a playlist based on a user's uploads. The search word should be specified instead of a video ID. See "Automatically Generate Playlists" option for more details
|
87 |
|
@@ -140,7 +145,7 @@ The template consists simply of any HTML that you wish but with `%video%` where
|
|
140 |
|
141 |
e.g. `<div align="center">%video%</div>`
|
142 |
|
143 |
-
Be wary that when adding template via a parameter that any HTML included may cause your video to have
|
144 |
|
145 |
== Profiles ==
|
146 |
|
@@ -200,7 +205,7 @@ The second option, `Alternative Embedding`, activates a short of other alternati
|
|
200 |
|
201 |
In both cases, activating these will impact performance so should only be used if absolutely necessary.
|
202 |
|
203 |
-
[Read more details](http://www.artiss.co.uk/
|
204 |
|
205 |
== Further options ==
|
206 |
|
@@ -208,9 +213,11 @@ In both cases, activating these will impact performance so should only be used i
|
|
208 |
|
209 |
Artiss YouTube embed also has the ability to return a thumbnail of a video (sorry, this doesn't work with playlists). There are two methods you can use for this - a shortcode or a function call.
|
210 |
|
211 |
-
Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt' )` to add a thumbnail to any part of your theme.
|
|
|
|
|
212 |
|
213 |
-
|
214 |
|
215 |
The parameters are as follows...
|
216 |
|
@@ -232,6 +239,8 @@ e.g. `[youtube_thumb target="_blank" alt="Demo video"]id[/youtube_thumb]`
|
|
232 |
|
233 |
This overrides the `TARGET` and `ALT` elements of the thumbnail.
|
234 |
|
|
|
|
|
235 |
**Video name**
|
236 |
|
237 |
You can retrieve the name of a video via 1 of 2 methods.
|
@@ -256,11 +265,13 @@ This will create a link to a video using the short URL standard.
|
|
256 |
|
257 |
To use the shortcode method simply insert `[youtube_url id=xx]` anywhere within a post to return a shortened URL. `xx` is the ID of the video.
|
258 |
|
259 |
-
**
|
|
|
|
|
260 |
|
261 |
-
|
262 |
|
263 |
-
|
264 |
|
265 |
e.g. `<a href="<?php echo get_video_download( 'Z_sCoHGIpU0' ); ?>">Download the video</a>`
|
266 |
|
@@ -308,6 +319,8 @@ For problems, suggestions or enhancements for this plugin, there is [a dedicated
|
|
308 |
|
309 |
== Reviews & Mentions ==
|
310 |
|
|
|
|
|
311 |
[New Technology Finds The Most Buzzed-About Parts Of Videos](http://www.socialtimes.com/2011/03/new-technology-finds-the-most-buzzed-about-parts-of-videos-interview/ "New Technology Finds The Most Buzzed-About Parts Of Videos") - SocialTimes.
|
312 |
|
313 |
[Andesch tips on WordPress plugins!](http://andershagstrom.se/andesch-tipsar-om-wordpress-plugins/ "Andesch tipsar om WordPress-plugins!") - Anders.
|
@@ -337,7 +350,7 @@ Artiss YouTube Embed is now using the latest version of the YouTube Player, name
|
|
337 |
|
338 |
Equally, some options are not supported depending on whether you use the IFRAME or OBJECT embedding method.
|
339 |
|
340 |
-
[Read more about which options are supported](http://www.artiss.co.uk/
|
341 |
|
342 |
= How do I add a border to the video =
|
343 |
|
@@ -377,7 +390,7 @@ If you don't include Metadata then it will also validate as HTML5 compliant.
|
|
377 |
|
378 |
The [W3C Markup Validation Service](http://validator.w3.org/ "W3C Markup Validation Service") was used to test the above.
|
379 |
|
380 |
-
You can [read more about this here](http://www.artiss.co.uk/
|
381 |
|
382 |
= Which browsers does the output work on? =
|
383 |
|
@@ -407,11 +420,37 @@ If you wish to have full control over your YouTube output I would suggest placin
|
|
407 |
|
408 |
= My OPTIONS table seems to be full of cache entries for YouTube Embed =
|
409 |
|
410 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
|
412 |
-
|
413 |
|
414 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
|
416 |
= Which version of PHP does this plugin work with? =
|
417 |
|
@@ -425,12 +464,82 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
425 |
2. The main options screen
|
426 |
3. The profiles screen
|
427 |
4. The lists screen - videos have been added and validated. The drop-down help is also shown
|
428 |
-
5. The
|
429 |
-
6. The default
|
430 |
-
7. The default visual editor options with the YouTube Embed button
|
431 |
|
432 |
== Changelog ==
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
= 2.5.1 =
|
435 |
* Bug: Fixed a bug with Admin Bar when using WP 3.1 - 3.3 (thanks to Carl D'Halluin for finding this)
|
436 |
|
@@ -598,6 +707,33 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
598 |
|
599 |
== Upgrade Notice ==
|
600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
= 2.5.1 =
|
602 |
* Upgrade if you are using a WordPress version before 3.3
|
603 |
|
1 |
=== Artiss YouTube Embed ===
|
2 |
+
Contributors: Applian
|
3 |
Donate link: http://artiss.co.uk/donate
|
4 |
+
Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, search, seo, sidebar, simple, smart, url, user, valid, video, widget, width, xhtml, youtube, youtuber
|
5 |
Requires at least: 2.9
|
6 |
+
Tested up to: 3.5
|
7 |
+
Stable tag: 2.7
|
8 |
|
9 |
A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
**I'm looking at potentially removing some of the existing features to keep the plugin streamlined - please [vote](http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote "YouTube Embed Features Vote") on what you'd like me to keep and what you'd be happy for me to jettison!**
|
14 |
+
|
15 |
Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet powerful, method of embedding YouTube videos into your WordPress site. Options include:
|
16 |
|
17 |
* XHTML and HTML5 compliant - works with all the latest browsers
|
25 |
* Code is cached for maximum performance
|
26 |
* Using a different YouTube plugin? Documentation and tools are provided to help you migrate to Artiss YouTube Embed
|
27 |
* Fully internationalized ready for translations. **If you would like to add a translation to his plugin then please [contact me](http://artiss.co.uk/contact "Contact")**
|
28 |
+
* Support for Do Not Track
|
29 |
+
* Compatible with [Video SEO for WordPress](http://yoast.com/wordpress/video-seo/ "Video SEO for WordPress")
|
30 |
* And much, much more!
|
31 |
|
32 |
It has all the features of other similar plugins - Smart YouTube, for instance. In fact if there's a feature in another YouTube embedding plugin that this doesn't have, let me know - I haven't come across it!
|
33 |
|
34 |
+
Artiss YouTube Embed has been rated 5/5 by [ThemesPlugins.com](http://www.themesplugins.com/wordpress-Plugin/useful-free-wordpress-plugin-youtube-videos-adjust-hide-link/ "Artiss YouTube Embed").
|
35 |
+
|
36 |
To add a video to a post or page simply use the shortcode `[youtube]video[/youtube]`, where `video` is the ID or URL of the video. Alternatively, you can add one (or more) widgets to your sidebar.
|
37 |
|
38 |
Within the administration area of your blog you will find a new menu named `YouTube` (see screenshot 1). Click on the `Options` sub-menu to set a number of general options. Alternatively click on the `Profiles` sub-menu to set the default options which define the output of your videos - any videos you display (unless overridden by parameters - more on that later) will use the settings from the Profiles screen.
|
66 |
* **start** - a number of seconds from where to start the video playing
|
67 |
* **style** - apply CSS elements directly to the video output
|
68 |
* **template** - specify a template (see section on Templates for further details)
|
|
|
69 |
* **type** - which embedding type to use, this can be `embedplus`, `iframe`, `object` or `chromeless`
|
70 |
* **width** - the video width, in pixels
|
71 |
|
72 |
The following parameters will not work with EmbedPlus:
|
73 |
|
74 |
* **autohide** - 0, 1 or 2, this parameter indicates whether the video controls will automatically hide after a video begins playing. The default behaviour, a value of 2, is for the video progress bar to fade out while the player controls (play button, volume control, etc.) remain visible. If this parameter is set to 0, the video progress bar and the video player controls will be visible throughout the video. If this parameter is set to 1, then the video progress bar and the player controls will slide out of view a couple of seconds after the video starts playing. They will only reappear if the user moves her mouse over the video player or presses a key on her keyboard.
|
75 |
+
* **color** - white or red, the colour of the progress bar (see the FAQ about having a white progress bar with the light theme)
|
76 |
+
* **controls** - 0, 1 or 2, this decides whether the controls should display and when the Flash will load. A value of 0 will not show the controls but 1 or 2 will. A value of 2 will load Flash once the user initiates playback - otherwise it's loaded straight away.
|
77 |
* **https** - yes or no, whether to use HTTPS for the video
|
78 |
+
* **info** - yes or no, show video information. If displaying a playlist this will show video thumbnails
|
79 |
* **loop** - yes or no, whether to start the video again once it ends
|
80 |
+
* **related** - yes or no, show related videos
|
81 |
* **theme** - dark or light, display player controls (like a 'play' button or volume control) within a dark or light control bar
|
82 |
|
83 |
The following parameters will not work with EmbedPlus or if IFRAME uses HTML5:
|
84 |
|
85 |
* **annotation** - yes or no, this determines if annotations are shown
|
86 |
* **cc** - yes or no, decided whether closed captions (subtitles) are displayed
|
|
|
87 |
* **disablekb** - yes or no, disable keyboard controls
|
88 |
* **fullscreen** - yes or no, this will add the fullscreen button to the toolbar. This also works with EmbedPlus.
|
89 |
* **link** - yes or no, link video to YouTube
|
|
|
90 |
* **search** - yes or no, create a playlist based on a search word. The search word should be specified instead of a video ID. See "Automatically Generate Playlists" option for more details
|
91 |
* **user** - yes or no, create a playlist based on a user's uploads. The search word should be specified instead of a video ID. See "Automatically Generate Playlists" option for more details
|
92 |
|
145 |
|
146 |
e.g. `<div align="center">%video%</div>`
|
147 |
|
148 |
+
Be wary that when adding template via a parameter that any HTML included may cause your video to have `<pre>` tags wrapped around it. The easiest way to check and fix this is to view any post in the HTML editor and remove any PRE tags that have been added.
|
149 |
|
150 |
== Profiles ==
|
151 |
|
205 |
|
206 |
In both cases, activating these will impact performance so should only be used if absolutely necessary.
|
207 |
|
208 |
+
[Read more details](http://www.artiss.co.uk/youtube-embed/compatibility "Artiss YouTube Embed Compatibility") on which options to select for which plugin.
|
209 |
|
210 |
== Further options ==
|
211 |
|
213 |
|
214 |
Artiss YouTube embed also has the ability to return a thumbnail of a video (sorry, this doesn't work with playlists). There are two methods you can use for this - a shortcode or a function call.
|
215 |
|
216 |
+
Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt', 'nolink' )` to add a thumbnail to any part of your theme.
|
217 |
+
|
218 |
+
Like the video embed equivalent, the `id` is the video ID and `alt` is the alternative text for the thumbnail image (optional). `nolink`, if set to `true`, will output the thumbnail without a link to the YouTube video, allowing you to add your own.
|
219 |
|
220 |
+
The parameters are different, however, but, again, are separated by ampersand.
|
221 |
|
222 |
The parameters are as follows...
|
223 |
|
239 |
|
240 |
This overrides the `TARGET` and `ALT` elements of the thumbnail.
|
241 |
|
242 |
+
You can also use `nolink` as a parameter with the shortcode, which works in the same way as with the function call.
|
243 |
+
|
244 |
**Video name**
|
245 |
|
246 |
You can retrieve the name of a video via 1 of 2 methods.
|
265 |
|
266 |
To use the shortcode method simply insert `[youtube_url id=xx]` anywhere within a post to return a shortened URL. `xx` is the ID of the video.
|
267 |
|
268 |
+
**Downloading Videos**
|
269 |
+
|
270 |
+
If you wish your users to be able to download a YouTube video or playlist then you can do this automatically or manually via either a shortcode of PHP function call.
|
271 |
|
272 |
+
In the Profiles screen within administration there is an option to automatically show a download link. You can specify some text or HTML to display as well as CSS.
|
273 |
|
274 |
+
If you'd prefer to do this manually then the function call is named `get_video_download` and has one parameter - the video ID. It will return the download link URL.
|
275 |
|
276 |
e.g. `<a href="<?php echo get_video_download( 'Z_sCoHGIpU0' ); ?>">Download the video</a>`
|
277 |
|
319 |
|
320 |
== Reviews & Mentions ==
|
321 |
|
322 |
+
[Your YouTube Plugin is fantastic�it just saved my life on this site. Thank you!](https://twitter.com/AaronWatters/status/237957701605404672?uid=16257815&iid=am-130280753913455685118891763&nid=4+248 "Twitter - Aaron Watters") - Sonic Clamp.
|
323 |
+
|
324 |
[New Technology Finds The Most Buzzed-About Parts Of Videos](http://www.socialtimes.com/2011/03/new-technology-finds-the-most-buzzed-about-parts-of-videos-interview/ "New Technology Finds The Most Buzzed-About Parts Of Videos") - SocialTimes.
|
325 |
|
326 |
[Andesch tips on WordPress plugins!](http://andershagstrom.se/andesch-tipsar-om-wordpress-plugins/ "Andesch tipsar om WordPress-plugins!") - Anders.
|
350 |
|
351 |
Equally, some options are not supported depending on whether you use the IFRAME or OBJECT embedding method.
|
352 |
|
353 |
+
[Read more about which options are supported](http://www.artiss.co.uk/youtube-embed/further-help#ye-api "API Support").
|
354 |
|
355 |
= How do I add a border to the video =
|
356 |
|
390 |
|
391 |
The [W3C Markup Validation Service](http://validator.w3.org/ "W3C Markup Validation Service") was used to test the above.
|
392 |
|
393 |
+
You can [read more about this here](http://www.artiss.co.uk/youtube-embed/further-help#ye-standards "Standards Compliance").
|
394 |
|
395 |
= Which browsers does the output work on? =
|
396 |
|
420 |
|
421 |
= My OPTIONS table seems to be full of cache entries for YouTube Embed =
|
422 |
|
423 |
+
Due to a housekeeping limitation in WordPress cache entries, which are stored in the OPTIONS table, may get left behind. There are 2 solutions to clearing this.
|
424 |
+
|
425 |
+
First of all, in the Options menu in YouTube Embed administration, there is an option in the performance section named "Clear Cache". Simply tick this box and click on the "Save Settings" button to clear out any cache.
|
426 |
+
|
427 |
+
However, the best option is to install the plugin [Artiss Transient Cleaner](http://wordpress.org/extend/plugins/artiss-transient-cleaner/ "Artiss Transient Cleaner"), which will housekeep the OPTIONS table automatically.
|
428 |
+
|
429 |
+
= Is this plugin compatible with Turn Off The Lights? =
|
430 |
+
|
431 |
+
If you display the video responsively then it doesn't work with [Turn Off The Lights](http://www.stefanvd.net/project/turnoffthelights.htm "Turn Off The Lights"). Switch this option off and it will.
|
432 |
+
|
433 |
+
I've raised this with the developer of Turn Off The Lights and he is going to implement a change in the future to improve compatibility with responsive video.
|
434 |
+
|
435 |
+
= I get the message "Blocked plug-in" in Safari =
|
436 |
+
|
437 |
+
Your version of Flash is out-of-date and needs updating.
|
438 |
|
439 |
+
= The "autostart" feature is not working in iOS =
|
440 |
|
441 |
+
Unfortunately, this is a restriction that has been put in place by Apple.
|
442 |
+
|
443 |
+
= I cannot get the video to start at a specific point in iOS =
|
444 |
+
|
445 |
+
This is a [known issue](https://code.google.com/p/gdata-issues/issues/detail?id=2937 "start position problem on iOS Mobile Safari") with the YouTube player and is with Google to fix.
|
446 |
+
|
447 |
+
= I can't get the video to play at a specific resolution by default =
|
448 |
+
|
449 |
+
There is no way to specify this - YouTube makes the decision on which version to play depending on a number of factors. The old version of their player had an "HD" option but that too didn't guarantee HD playback.
|
450 |
+
|
451 |
+
= I have another issue or a request =
|
452 |
+
|
453 |
+
Before reporting it please bear in mind that this plugin uses the standard YouTube API. Adding extra functionality to the player itself is not possible and there are [known issues](https://code.google.com/p/gdata-issues/issues/list?q=label:API-YouTube "YouTube API Known Issues") with it. I would also recommend performing a Google search for your issue too first, as this will often resolve a lot of queries.
|
454 |
|
455 |
= Which version of PHP does this plugin work with? =
|
456 |
|
464 |
2. The main options screen
|
465 |
3. The profiles screen
|
466 |
4. The lists screen - videos have been added and validated. The drop-down help is also shown
|
467 |
+
5. The default widget options
|
468 |
+
6. The default visual editor options with the YouTube Embed button
|
|
|
469 |
|
470 |
== Changelog ==
|
471 |
|
472 |
+
= 2.7 =
|
473 |
+
* Maintenance: Using new website for video download link
|
474 |
+
* Maintenance: README updated with new compatibility details and modified FAQs
|
475 |
+
* Bug: Fixed a bug where some option screen text was not displaying
|
476 |
+
* Bug: Fixed the feature pointer, which was no longer working
|
477 |
+
* Enhancement: Added profile options to allow you to switch on video download link, as well as style the output
|
478 |
+
|
479 |
+
= 2.6.2 =
|
480 |
+
* Bug: Fixed bug in uninstall routine
|
481 |
+
* Enhancement: Replaced user of print_r in cache key generator with serialize, as this can cause problems with some hosting configurations
|
482 |
+
|
483 |
+
= 2.6.1 =
|
484 |
+
* Bug: Fixed minimised script that adds editor button
|
485 |
+
* Bug: Updated broken advert links
|
486 |
+
* Bug: Fixed link in admin bar when using WP 3.1 - 3.3
|
487 |
+
* Bug: Removed un-necessary cookie update that was causing errors in some situations
|
488 |
+
* Maintenance: Updated WP 3.3+ admin bar options to correctly reflect permissions, naming and ordering of equivalent admin menu
|
489 |
+
|
490 |
+
= 2.6 =
|
491 |
+
* Bug: Fixed a bug that means videos have zero width on new installations until the default profile is updated (thanks to Aidan from [Noise Republic](http://www.noiserepublic.co.uk "Noise Republic") for reporting that)
|
492 |
+
* Bug: Corrected URLs pointing to help screens at artiss.co.uk
|
493 |
+
* Bug: Resolved issue where translated IDs were not corrected if included in a URL (thanks to kchayka for reporting that)
|
494 |
+
* Bug: Fixed problem where video ID is not found in full URL if not specified first (thanks to christopherw for reporting that)
|
495 |
+
* Bug: Modest branding profile switch wasn't doing anything - the option was hard-coded on. Now corrected
|
496 |
+
* Bug: User defined error message now decodes correctly (thanks to kchayka for reporting that)
|
497 |
+
* Bug: No longer caches the video output if a random playlist has been selected
|
498 |
+
* Maintenance: Updated advertisement engine code
|
499 |
+
* Maintenance: Renamed README menu to Instructions
|
500 |
+
* Maintenance: Assorted on-screen wording improvements
|
501 |
+
* Maintenance: Removed title option as it's un-supported
|
502 |
+
* Maintenance: Updated the uninstall routine
|
503 |
+
* Maintenance: Cleaned code and updated translation files
|
504 |
+
* Enhancement: Added Do Not Track compatibility. Once active, if user has Do Not Track in use then cookies will not be stored
|
505 |
+
* Enhancement: New option to specify the shortcode that the editor button uses. A cookie is used to store this
|
506 |
+
* Enhancement: New option to switch on shortcodes in widgets. This will allow all shortcodes in widgets, though, not just those for this plugin
|
507 |
+
* Enhancement: Reviewed and updated access right to admin screen. Added option to choose what level has access to profiles and/or lists screen
|
508 |
+
* Enhancement: Many functions were only activated if user was not in Administration screens. However, using AJAX on your site triggers the administration flag and, hence, the functions would not work. Changed this
|
509 |
+
* Enhancement: Added option to modify access to Profile and Lists screen
|
510 |
+
* Enhancement: Improved the cache clearing option and statistics
|
511 |
+
* Enhancement: Reflected on profile screen that modest branding now works with HTML5 player
|
512 |
+
* Enhancement: Added option to thumbnail output to suppress the link, so that you can add your own
|
513 |
+
* Enhancement: Updated "Controls" option to support new third parameter and update definitions. Ensured backwards compatibility with old parameter options
|
514 |
+
|
515 |
+
= 2.5.6 =
|
516 |
+
* Maintenance: Restricted access to Options and Profiles screen to administrators
|
517 |
+
* Bug: Fixed bug which caused errors to be generated on new installations of plugin
|
518 |
+
* Enhancement: Set a default width if the `content_width` global variable is set to zero
|
519 |
+
|
520 |
+
= 2.5.5 =
|
521 |
+
* Maintenance: Updated sponsorship - now includes option to switch off if user has donated
|
522 |
+
* Maintenance: Updated options screen to reflect the fact that the `related` and `color` parameters are now supported by the HTML5 player
|
523 |
+
* Maintenance: Updated options screen to show that the `info` parameter, if used alongside a playlist will show thumbnails of the videos
|
524 |
+
* Maintenance: Removed redundant GA code, which was never used
|
525 |
+
* Maintenance: Combined scripts
|
526 |
+
* Bug: Fixed internationalisation
|
527 |
+
* Bug: Fixed output of video information on the Lists option screen
|
528 |
+
* Bug: Modified cache key so that length does not exceed MySQL field maximum
|
529 |
+
* Bug: Added close anchor for media meta - causes unclosed anchor under IE9 (thanks to Marcel Bootsman for identifying this)
|
530 |
+
* Bug: Responsive video was not working on a demonstration video in Profile screen
|
531 |
+
|
532 |
+
= 2.5.4 =
|
533 |
+
* Bug: Fixed bug that prevented some fields in options screens to not save
|
534 |
+
|
535 |
+
= 2.5.3 =
|
536 |
+
* Bug: Fixed further issues with the widget code (thanks to Rose-Anne Constantineau for reporting it and helping me test the result)
|
537 |
+
* Maintenance: Improved some of the internationalisation texts
|
538 |
+
* Maintenance: Neatened up some of the code output
|
539 |
+
|
540 |
+
= 2.5.2 =
|
541 |
+
* Bug: Fixed a bug where widgets weren't showing single videos (thanks to Josh Callaghan for reporting this)
|
542 |
+
|
543 |
= 2.5.1 =
|
544 |
* Bug: Fixed a bug with Admin Bar when using WP 3.1 - 3.3 (thanks to Carl D'Halluin for finding this)
|
545 |
|
707 |
|
708 |
== Upgrade Notice ==
|
709 |
|
710 |
+
= 2.7 =
|
711 |
+
* Update to fix some bugs and add minor new features
|
712 |
+
|
713 |
+
= 2.6.2 =
|
714 |
+
* Update to fix an uninstaller bug and a problem that may affect some hosts
|
715 |
+
|
716 |
+
= 2.6.1 =
|
717 |
+
* Update to fix some bugs introduced in 2.6
|
718 |
+
|
719 |
+
= 2.6 =
|
720 |
+
* Upgrade to implement numerous bug fixes and enhancements
|
721 |
+
|
722 |
+
= 2.5.6 =
|
723 |
+
* Upgrade to fix critical bug for new installations
|
724 |
+
|
725 |
+
= 2.5.5 =
|
726 |
+
* Upgrade for various bug fixes and maintenance updates
|
727 |
+
|
728 |
+
= 2.5.4 =
|
729 |
+
* Upgrade to fix an issue with options not updating
|
730 |
+
|
731 |
+
= 2.5.3 =
|
732 |
+
* Upgrade to fix issues with widgets
|
733 |
+
|
734 |
+
= 2.5.2 =
|
735 |
+
* Upgrade if you use widgets to display videos
|
736 |
+
|
737 |
= 2.5.1 =
|
738 |
* Upgrade if you are using a WordPress version before 3.3
|
739 |
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
screenshot-6.png
CHANGED
Binary file
|
screenshot-7.png
DELETED
Binary file
|
uninstall.php
CHANGED
@@ -9,18 +9,20 @@
|
|
9 |
*/
|
10 |
|
11 |
// If the uninstall was not called by WordPress, exit
|
12 |
-
|
13 |
-
|
14 |
-
}
|
15 |
|
16 |
// Read the general options (will tell us how many profile and list options there should be
|
|
|
17 |
$options = get_option( 'youtube_embed_general' );
|
18 |
|
19 |
// If the general options existed, delete it!
|
|
|
20 |
if ( is_array( $options ) ) {
|
21 |
delete_option( 'youtube_embed_general' );
|
22 |
|
23 |
// If the number of profiles field exists, delete each one in turn
|
|
|
24 |
if ( array_key_exists( 'profile_no', $options ) ) {
|
25 |
$loop = 0;
|
26 |
while ( $loop <= $options[ 'profile_no' ] ) {
|
@@ -30,6 +32,7 @@ if ( is_array( $options ) ) {
|
|
30 |
}
|
31 |
|
32 |
// If the number of lists field exists, delete each one in turn
|
|
|
33 |
if ( !array_key_exists( 'list_no', $options ) ) {
|
34 |
$loop = 1;
|
35 |
while ( $loop <= $options[ 'list_no' ] ) {
|
@@ -40,8 +43,20 @@ if ( is_array( $options ) ) {
|
|
40 |
}
|
41 |
|
42 |
// Delete all other options
|
|
|
43 |
delete_option( 'widget_youtube_embed_widget' );
|
|
|
|
|
44 |
delete_option( 'youtube_embed_shortcode' );
|
45 |
delete_option( 'youtube_embed_url' );
|
|
|
46 |
delete_option( 'youtube_embed_activated' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
?>
|
9 |
*/
|
10 |
|
11 |
// If the uninstall was not called by WordPress, exit
|
12 |
+
|
13 |
+
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit(); }
|
|
|
14 |
|
15 |
// Read the general options (will tell us how many profile and list options there should be
|
16 |
+
|
17 |
$options = get_option( 'youtube_embed_general' );
|
18 |
|
19 |
// If the general options existed, delete it!
|
20 |
+
|
21 |
if ( is_array( $options ) ) {
|
22 |
delete_option( 'youtube_embed_general' );
|
23 |
|
24 |
// If the number of profiles field exists, delete each one in turn
|
25 |
+
|
26 |
if ( array_key_exists( 'profile_no', $options ) ) {
|
27 |
$loop = 0;
|
28 |
while ( $loop <= $options[ 'profile_no' ] ) {
|
32 |
}
|
33 |
|
34 |
// If the number of lists field exists, delete each one in turn
|
35 |
+
|
36 |
if ( !array_key_exists( 'list_no', $options ) ) {
|
37 |
$loop = 1;
|
38 |
while ( $loop <= $options[ 'list_no' ] ) {
|
43 |
}
|
44 |
|
45 |
// Delete all other options
|
46 |
+
|
47 |
delete_option( 'widget_youtube_embed_widget' );
|
48 |
+
|
49 |
+
delete_option( 'youtube_embed_general' );
|
50 |
delete_option( 'youtube_embed_shortcode' );
|
51 |
delete_option( 'youtube_embed_url' );
|
52 |
+
delete_option( 'youtube_embed_editor_sc' );
|
53 |
delete_option( 'youtube_embed_activated' );
|
54 |
+
|
55 |
+
// Delete cookie
|
56 |
+
|
57 |
+
$path = str_replace( 'http://', '', site_url( '/', 'http' ) );
|
58 |
+
$pos = strpos( $path, '/' );
|
59 |
+
$path = substr( $path, $pos ) . 'wp-content/';
|
60 |
+
|
61 |
+
setcookie( 'aye_mce_shortcode', '', time() - 3600, $path );
|
62 |
?>
|
youtube-embed.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Artiss YouTube Embed
|
4 |
-
Plugin URI: http://www.artiss.co.uk/
|
5 |
Description: Embed YouTube Videos in WordPress
|
6 |
-
Version: 2.
|
7 |
Author: David Artiss
|
8 |
Author URI: http://www.artiss.co.uk
|
9 |
*/
|
@@ -17,7 +17,7 @@ Author URI: http://www.artiss.co.uk
|
|
17 |
* @since 2.0
|
18 |
*/
|
19 |
|
20 |
-
define( 'youtube_embed_version', '2.
|
21 |
|
22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
23 |
|
@@ -31,32 +31,37 @@ include_once( $functions_dir . 'aye-set-defaults.php' ); // Set default opti
|
|
31 |
|
32 |
include_once( $functions_dir . 'aye-add-to-admin-bar.php' ); // Add link to the admin bar
|
33 |
|
|
|
|
|
34 |
include_once( $functions_dir . 'aye-generate-embed-code.php' ); // Generate YouTube embed code
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
|
52 |
-
include_once( $functions_dir . 'aye-
|
|
|
|
|
53 |
|
54 |
-
|
|
|
|
|
55 |
|
56 |
include_once( $functions_dir . 'aye-shortcodes.php' ); // Shortcodes
|
57 |
|
58 |
include_once( $functions_dir . 'aye-deprecated.php' ); // Deprecated options
|
59 |
-
|
60 |
}
|
61 |
|
62 |
include_once($functions_dir . 'aye-generate-widgets.php'); // Generate widgets
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Artiss YouTube Embed
|
4 |
+
Plugin URI: http://www.artiss.co.uk/youtube-embed
|
5 |
Description: Embed YouTube Videos in WordPress
|
6 |
+
Version: 2.7
|
7 |
Author: David Artiss
|
8 |
Author URI: http://www.artiss.co.uk
|
9 |
*/
|
17 |
* @since 2.0
|
18 |
*/
|
19 |
|
20 |
+
define( 'youtube_embed_version', '2.7' );
|
21 |
|
22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
23 |
|
31 |
|
32 |
include_once( $functions_dir . 'aye-add-to-admin-bar.php' ); // Add link to the admin bar
|
33 |
|
34 |
+
include_once( $functions_dir . 'aye-function-calls.php' ); // Function calls
|
35 |
+
|
36 |
include_once( $functions_dir . 'aye-generate-embed-code.php' ); // Generate YouTube embed code
|
37 |
|
38 |
+
include_once( $functions_dir . 'aye-generate-download-code.php' ); // Generate download URLs
|
39 |
|
40 |
+
include_once( $functions_dir . 'aye-generate-shorturl-code.php' ); // Generate short URLs
|
41 |
|
42 |
+
include_once( $functions_dir . 'aye-generate-thumbnail-code.php' ); // Generate thumbnail code
|
43 |
|
44 |
+
include_once( $functions_dir . 'aye-generate-transcript-code.php' ); // Generate transcripts
|
45 |
|
46 |
+
if ( is_admin() ) {
|
47 |
|
48 |
+
if ( !function_exists( 'artiss_plugin_ads' ) ) {
|
49 |
|
50 |
+
include_once( $functions_dir . 'artiss-plugin-ads.php' ); // Option screen ads
|
51 |
|
52 |
+
}
|
53 |
|
54 |
+
include_once( $functions_dir . 'aye-admin-config.php' ); // Administration configuration
|
55 |
+
|
56 |
+
include_once( $functions_dir . 'aye-add-mce-button.php' ); // Editor button
|
57 |
|
58 |
+
} else {
|
59 |
+
|
60 |
+
include_once( $functions_dir . 'aye-update-post-content.php' ); // Process post content
|
61 |
|
62 |
include_once( $functions_dir . 'aye-shortcodes.php' ); // Shortcodes
|
63 |
|
64 |
include_once( $functions_dir . 'aye-deprecated.php' ); // Deprecated options
|
|
|
65 |
}
|
66 |
|
67 |
include_once($functions_dir . 'aye-generate-widgets.php'); // Generate widgets
|