Version Description
- 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 for reporting that)
- Bug: Corrected URLs pointing to help screens at artiss.co.uk
- Bug: Resolved issue where translated IDs were not corrected if included in a URL (thanks to kchayka for reporting that)
- Bug: Fixed problem where video ID is not found in full URL if not specified first (thanks to christopherw for reporting that)
- Bug: Modest branding profile switch wasn't doing anything - the option was hard-coded on. Now corrected
- Bug: User defined error message now decodes correctly (thanks to kchayka for reporting that)
- Bug: No longer caches the video output if a random playlist has been selected
- Maintenance: Updated advertisement engine code
- Maintenance: Renamed README menu to Instructions
- Maintenance: Assorted on-screen wording improvements
- Maintenance: Removed title option as it's un-supported
- Maintenance: Updated the uninstall routine
- Maintenance: Cleaned code and updated translation files
- Enhancement: Added Do Not Track compatibility. Once active, if user has Do Not Track in use then cookies will not be stored
- Enhancement: New option to specify the shortcode that the editor button uses. A cookie is used to store this
- Enhancement: New option to switch on shortcodes in widgets. This will allow all shortcodes in widgets, though, not just those for this plugin
- Enhancement: Reviewed and updated access right to admin screen. Added option to choose what level has access to profiles and/or lists screen
- 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
- Enhancement: Added option to modify access to Profile and Lists screen
- Enhancement: Improved the cache clearing option and statistics
- Enhancement: Reflected on profile screen that modest branding now works with HTML5 player
- Enhancement: Added option to thumbnail output to suppress the link, so that you can add your own
- Enhancement: Updated "Controls" option to support new third parameter and update definitions. Ensured backwards compatibility with old parameter options
Download this release
Release Info
Developer | dartiss |
Plugin | YouTube Embed |
Version | 2.6 |
Comparing to | |
See all releases |
Code changes from version 2.5.6 to 2.6
- css/aye-admin UNCOMPRESSED.css +0 -50
- css/aye-admin-3.1 UNCOMPRESSED.css +0 -47
- css/aye-admin-3.1.css +47 -1
- css/aye-admin-3.1.min.css +1 -0
- css/aye-admin.css +50 -1
- css/aye-admin.min.css +1 -0
- css/aye-main UNCOMPRESSED.css +0 -17
- css/aye-main.css +17 -1
- css/aye-main.min.css +1 -0
- images/Thumbs.db +0 -0
- includes/artiss-plugin-ads.php +86 -73
- includes/aye-add-mce-button.php +12 -3
- includes/aye-add-scripts.php +11 -4
- includes/aye-add-to-admin-bar.php +37 -37
- includes/aye-admin-config.php +91 -76
- includes/aye-display-about.php +2 -0
- includes/aye-display-instructions.php +31 -0
- includes/aye-display-readme.php +0 -27
- includes/aye-function-calls.php +4 -4
- includes/aye-generate-embed-code.php +627 -621
- includes/aye-generate-thumbnail-code.php +14 -8
- includes/aye-generate-transcript-code.php +1 -1
- includes/aye-generate-widgets.php +133 -135
- includes/aye-options-general.php +102 -49
- includes/aye-options-lists.php +5 -3
- includes/aye-options-profiles.php +65 -60
- includes/aye-options-widgets.php +1 -7
- includes/aye-set-defaults.php +67 -25
- includes/aye-shared-functions.php +70 -14
- includes/aye-shortcodes.php +6 -6
- js/aye-mce-button.js +0 -1
- js/aye-mce-button.min.php +1 -0
- js/{aye-mce-button UNCOMPRESSED.js → aye-mce-button.php} +11 -1
- languages/youtube-embed.mo +0 -0
- languages/youtube-embed.po +426 -345
- readme.txt +49 -9
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- uninstall.php +14 -3
- youtube-embed.php +16 -17
css/aye-admin UNCOMPRESSED.css
DELETED
@@ -1,50 +0,0 @@
|
|
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-3.1 UNCOMPRESSED.css
DELETED
@@ -1,47 +0,0 @@
|
|
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.css
CHANGED
@@ -1 +1,47 @@
|
|
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 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-main UNCOMPRESSED.css
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
.ye-container {
|
2 |
-
position: relative;
|
3 |
-
padding-bottom: 56.25%;
|
4 |
-
padding-top: 30px;
|
5 |
-
height: 0;
|
6 |
-
overflow: hidden;
|
7 |
-
}
|
8 |
-
|
9 |
-
.ye-container iframe,
|
10 |
-
.ye-container object,
|
11 |
-
.ye-container embed {
|
12 |
-
position: absolute;
|
13 |
-
top: 0;
|
14 |
-
left: 0;
|
15 |
-
width: 100%;
|
16 |
-
height: 100%;
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/aye-main.css
CHANGED
@@ -1 +1,17 @@
|
|
1 |
-
.ye-container
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ye-container {
|
2 |
+
position: relative;
|
3 |
+
padding-bottom: 56.25%;
|
4 |
+
padding-top: 30px;
|
5 |
+
height: 0;
|
6 |
+
overflow: hidden;
|
7 |
+
}
|
8 |
+
|
9 |
+
.ye-container iframe,
|
10 |
+
.ye-container object,
|
11 |
+
.ye-container embed {
|
12 |
+
position: absolute;
|
13 |
+
top: 0;
|
14 |
+
left: 0;
|
15 |
+
width: 100%;
|
16 |
+
height: 100%;
|
17 |
+
}
|
css/aye-main.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.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%;}
|
images/Thumbs.db
ADDED
Binary file
|
includes/artiss-plugin-ads.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Artiss Plugin Ads (1.
|
4 |
*
|
5 |
* Generate an advert - intended for use within Artiss plugin administration screens/
|
6 |
* All output is responsive and is image based.
|
@@ -14,47 +14,48 @@
|
|
14 |
* Combine 2 ads and add additional information
|
15 |
*
|
16 |
* @param string trans Translation name
|
|
|
17 |
* @uses artiss_fetch_ad_code Get a random advert
|
18 |
*/
|
19 |
|
20 |
function artiss_plugin_ads( $trans, $width = 750 ) {
|
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 |
/**
|
@@ -67,93 +68,105 @@ function artiss_plugin_ads( $trans, $width = 750 ) {
|
|
67 |
|
68 |
function artiss_fetch_ad_code( $ad_number ) {
|
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 |
-
$ad_code = substr( $ad_code, 0, $pos + 5 ) . 'style="float: left; padding-right: 10px;" ' . substr( $ad_code, $pos + 5 );
|
150 |
|
151 |
-
|
152 |
|
153 |
-
|
154 |
-
$return[ 'ad' ] = $ad_number;
|
155 |
-
$return[ 'sub-ad' ] = $sub_ad;
|
156 |
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
?>
|
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.
|
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 |
/**
|
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,13 @@
|
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* Plugin initialisation
|
12 |
*
|
@@ -17,7 +24,7 @@
|
|
17 |
|
18 |
function aye_plugin_init() {
|
19 |
|
20 |
-
|
21 |
|
22 |
load_plugin_textdomain( 'youtube-embed', false, $language_dir );
|
23 |
|
@@ -35,9 +42,9 @@ add_action( 'init', 'aye_plugin_init' );
|
|
35 |
|
36 |
function aye_main_scripts() {
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
|
42 |
}
|
43 |
|
@@ -56,7 +63,7 @@ function aye_admin_css() {
|
|
56 |
global $wp_version;
|
57 |
if ( ( float ) $wp_version >= 3.2 ) { $version = ''; } else { $version = '-3.1'; }
|
58 |
|
59 |
-
wp_enqueue_style( 'tinymce_button', plugins_url() . '/youtube-embed/css/aye-admin' . $version . '.css' );
|
60 |
|
61 |
}
|
62 |
|
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 |
*
|
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 |
|
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 |
|
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,7 +21,7 @@
|
|
21 |
|
22 |
function aye_admin_bar_render_3_1() {
|
23 |
|
24 |
-
|
25 |
|
26 |
if ( current_user_can( 'edit_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
|
27 |
|
@@ -55,52 +55,52 @@ 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 |
-
|
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 |
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( 'edit_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
|
27 |
|
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 |
+
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 |
+
$wp_admin_bar -> add_menu( array(
|
72 |
+
'id' => 'aye-menu',
|
73 |
+
'title' => __( 'YouTube Embed', 'youtube-embed' ) ) );
|
74 |
|
75 |
+
$wp_admin_bar -> add_menu( array(
|
76 |
+
'parent' => 'aye-menu',
|
77 |
+
'id' => 'aye-options',
|
78 |
+
'title' => __( 'Options', 'youtube-embed' ),
|
79 |
+
'href' => admin_url( 'admin.php?page=aye-general-options' ),
|
80 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
81 |
|
82 |
+
$wp_admin_bar -> add_menu( array(
|
83 |
+
'parent' => 'aye-menu',
|
84 |
+
'id' => 'aye-profile',
|
85 |
+
'title' => __( 'Profiles', 'youtube-embed' ),
|
86 |
+
'href' => admin_url( 'admin.php?page=aye-profile-options' ),
|
87 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
88 |
|
89 |
+
$wp_admin_bar -> add_menu( array(
|
90 |
+
'parent' => 'aye-menu',
|
91 |
+
'id' => 'aye-lists',
|
92 |
+
'title' => __( 'Lists', 'youtube-embed' ),
|
93 |
+
'href' => admin_url( 'admin.php?page=aye-list-options' ),
|
94 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
95 |
|
96 |
+
$wp_admin_bar -> add_menu( array(
|
97 |
+
'parent' => 'aye-menu',
|
98 |
+
'id' => 'aye-readme',
|
99 |
+
'title' => __( 'README', 'youtube-embed' ),
|
100 |
+
'href' => admin_url( 'admin.php?page=aye-support-readme' ),
|
101 |
+
'meta' => array( 'target' => '_blank' ) ) );
|
102 |
+
}
|
103 |
+
}
|
104 |
}
|
105 |
|
106 |
add_action( 'admin_bar_menu', 'aye_admin_bar_render_3_3', 40 );
|
includes/aye-admin-config.php
CHANGED
@@ -7,6 +7,15 @@
|
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* Add Settings link to plugin list
|
12 |
*
|
@@ -73,59 +82,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', 'youtube-embed' ), __( 'README', 'youtube-embed' ), 'edit_posts', 'aye-support-readme', 'aye_support_readme' );
|
118 |
-
}
|
119 |
|
120 |
-
|
121 |
|
122 |
-
|
123 |
|
124 |
-
|
125 |
|
126 |
-
|
127 |
|
128 |
-
|
|
|
|
|
129 |
|
130 |
}
|
131 |
|
@@ -143,19 +158,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 +216,15 @@ function aye_list_options() {
|
|
201 |
}
|
202 |
|
203 |
/**
|
204 |
-
* Include
|
205 |
*
|
206 |
-
*
|
207 |
*
|
208 |
* @since 2.4
|
209 |
*/
|
210 |
|
211 |
-
function
|
212 |
-
include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-display-
|
213 |
}
|
214 |
|
215 |
/**
|
@@ -238,12 +253,12 @@ function aye_support_about() {
|
|
238 |
|
239 |
function aye_add_options_help() {
|
240 |
|
241 |
-
|
242 |
-
|
243 |
|
244 |
-
|
245 |
|
246 |
-
|
247 |
}
|
248 |
|
249 |
/**
|
@@ -261,8 +276,8 @@ function aye_options_help() {
|
|
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.', 'youtube-embed' ) . '</p>';
|
262 |
$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>';
|
263 |
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</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.', 'youtube-embed' ) . '</h4>';
|
267 |
|
268 |
return $help_text;
|
@@ -280,12 +295,12 @@ function aye_options_help() {
|
|
280 |
|
281 |
function aye_add_profiles_help() {
|
282 |
|
283 |
-
|
284 |
-
|
285 |
|
286 |
-
|
287 |
|
288 |
-
|
289 |
}
|
290 |
|
291 |
/**
|
@@ -303,9 +318,9 @@ function aye_profiles_help() {
|
|
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.', 'youtube-embed' ) . '</p>';
|
304 |
$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>';
|
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.', 'youtube-embed' ) . '</h4>';
|
310 |
|
311 |
return $help_text;
|
@@ -323,12 +338,12 @@ function aye_profiles_help() {
|
|
323 |
|
324 |
function aye_add_lists_help() {
|
325 |
|
326 |
-
|
327 |
-
|
328 |
|
329 |
-
|
330 |
|
331 |
-
|
332 |
}
|
333 |
|
334 |
/**
|
@@ -346,8 +361,8 @@ function aye_lists_help() {
|
|
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.', 'youtube-embed' ) . '</p>';
|
347 |
$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>';
|
348 |
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</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.', 'youtube-embed' ) . '</h4>';
|
352 |
|
353 |
return $help_text;
|
@@ -365,12 +380,12 @@ function aye_lists_help() {
|
|
365 |
|
366 |
function aye_add_about_help() {
|
367 |
|
368 |
-
|
369 |
-
|
370 |
|
371 |
-
|
372 |
|
373 |
-
|
374 |
}
|
375 |
|
376 |
/**
|
@@ -387,8 +402,8 @@ function aye_about_help() {
|
|
387 |
|
388 |
$help_text = '<p>' . __( 'This screen provides useful information about this plugin along with methods of support.', 'youtube-embed' ) . '</p>';
|
389 |
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</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.', 'youtube-embed' ) . '</h4>';
|
393 |
|
394 |
return $help_text;
|
@@ -416,9 +431,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 +446,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,10 +462,10 @@ function aye_admin_enqueue_scripts() {
|
|
447 |
|
448 |
function aye_admin_print_footer_scripts() {
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
?>
|
455 |
<script>
|
456 |
jQuery(function () {
|
7 |
* @package Artiss-YouTube-Embed
|
8 |
*/
|
9 |
|
10 |
+
/**
|
11 |
+
* Show Admin Messages
|
12 |
+
*
|
13 |
+
* Display messages on the administration screen
|
14 |
+
*
|
15 |
+
* @since 2.6
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
|
19 |
/**
|
20 |
* Add Settings link to plugin list
|
21 |
*
|
82 |
|
83 |
function aye_menu_initialise() {
|
84 |
|
85 |
+
// Get level access for profile and list screens.
|
86 |
+
|
87 |
+
$options = aye_set_general_defaults();
|
88 |
+
$profile_access = $options[ 'profile_access' ];
|
89 |
+
$list_access = $options[ 'list_access' ];
|
90 |
|
91 |
+
// Depending on WordPress version and available functions decide which (if any) contextual help system to use
|
92 |
|
93 |
+
$contextual_help = aye_contextual_help_type();
|
94 |
|
95 |
+
// Add main admin option
|
96 |
|
97 |
+
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' );
|
98 |
|
99 |
+
// Add about sub-menu
|
100 |
|
101 |
+
if ( $contextual_help == 'new' ) { global $aye_about_hook; }
|
102 |
|
103 |
+
$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' );
|
104 |
|
105 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_about_hook, 'aye_add_about_help' ); }
|
106 |
|
107 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_about_hook, aye_about_help() ); }
|
108 |
|
109 |
+
// Add instructions sub-menu
|
110 |
|
111 |
+
if ( function_exists( 'wp_readme_parser' ) ) {
|
112 |
+
add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Instructions', 'youtube-embed' ), __( 'Instructions', 'youtube-embed' ), 'edit_posts', 'aye-support-instructions', 'aye_support_instructions' );
|
113 |
+
}
|
114 |
|
115 |
+
// Add options sub-menu
|
116 |
|
117 |
+
if ( $contextual_help == 'new' ) { global $aye_options_hook; }
|
118 |
|
119 |
+
$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' );
|
120 |
|
121 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_options_hook, 'aye_add_options_help' ); }
|
122 |
|
123 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_options_hook, aye_options_help() ); }
|
124 |
|
125 |
+
// Add profiles sub-menu
|
126 |
|
127 |
+
if ( $contextual_help == 'new' ) { global $aye_profiles_hook; }
|
128 |
|
129 |
+
$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' );
|
130 |
|
131 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_profiles_hook, 'aye_add_profiles_help' ); }
|
|
|
|
|
132 |
|
133 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_profiles_hook, aye_profiles_help() ); }
|
134 |
|
135 |
+
// Add lists sub-menu
|
136 |
|
137 |
+
if ( $contextual_help == 'new' ) { global $aye_lists_hook; }
|
138 |
|
139 |
+
$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' );
|
140 |
|
141 |
+
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_lists_hook, 'aye_add_lists_help' ); }
|
142 |
+
|
143 |
+
if ( $contextual_help == 'old' ) { add_contextual_help( $aye_lists_hook, aye_lists_help() ); }
|
144 |
|
145 |
}
|
146 |
|
158 |
|
159 |
function aye_contextual_help_type() {
|
160 |
|
161 |
+
global $wp_version;
|
162 |
|
163 |
+
$type = false;
|
164 |
|
165 |
+
if ( ( float ) $wp_version >= 3.3 ) {
|
166 |
+
$type = 'new';
|
167 |
+
} else {
|
168 |
+
if ( function_exists( 'add_contextual_help' ) ) {
|
169 |
+
$type = 'old';
|
170 |
+
}
|
171 |
+
}
|
172 |
|
173 |
+
return $type;
|
174 |
}
|
175 |
|
176 |
/**
|
216 |
}
|
217 |
|
218 |
/**
|
219 |
+
* Include instructions screen
|
220 |
*
|
221 |
+
* Display the instructions
|
222 |
*
|
223 |
* @since 2.4
|
224 |
*/
|
225 |
|
226 |
+
function aye_support_instructions() {
|
227 |
+
include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-display-instructions.php' );
|
228 |
}
|
229 |
|
230 |
/**
|
253 |
|
254 |
function aye_add_options_help() {
|
255 |
|
256 |
+
global $aye_options_hook;
|
257 |
+
$screen = get_current_screen();
|
258 |
|
259 |
+
if ( $screen->id != $aye_options_hook ) { return; }
|
260 |
|
261 |
+
$screen -> add_help_tab( array( 'id' => 'aye-options-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_options_help() ) );
|
262 |
}
|
263 |
|
264 |
/**
|
276 |
$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>';
|
277 |
$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>';
|
278 |
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
|
279 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
280 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
281 |
$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>';
|
282 |
|
283 |
return $help_text;
|
295 |
|
296 |
function aye_add_profiles_help() {
|
297 |
|
298 |
+
global $aye_profiles_hook;
|
299 |
+
$screen = get_current_screen();
|
300 |
|
301 |
+
if ( $screen->id != $aye_profiles_hook ) { return; }
|
302 |
|
303 |
+
$screen -> add_help_tab( array( 'id' => 'aye-profiles-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_profiles_help() ) );
|
304 |
}
|
305 |
|
306 |
/**
|
318 |
$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>';
|
319 |
$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>';
|
320 |
$help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
321 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
322 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
323 |
+
$help_text .= '<p><a href="http://embedplus.com/">' . __( 'EmbedPlus website', 'youtube-embed' ) . '</a></p>';
|
324 |
$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>';
|
325 |
|
326 |
return $help_text;
|
338 |
|
339 |
function aye_add_lists_help() {
|
340 |
|
341 |
+
global $aye_lists_hook;
|
342 |
+
$screen = get_current_screen();
|
343 |
|
344 |
+
if ( $screen->id != $aye_lists_hook ) { return; }
|
345 |
|
346 |
+
$screen -> add_help_tab( array( 'id' => 'aye-lists-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_lists_help() ) );
|
347 |
}
|
348 |
|
349 |
/**
|
361 |
$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>';
|
362 |
$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>';
|
363 |
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
|
364 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
365 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
366 |
$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>';
|
367 |
|
368 |
return $help_text;
|
380 |
|
381 |
function aye_add_about_help() {
|
382 |
|
383 |
+
global $aye_about_hook;
|
384 |
+
$screen = get_current_screen();
|
385 |
|
386 |
+
if ( $screen->id != $aye_about_hook ) { return; }
|
387 |
|
388 |
+
$screen -> add_help_tab( array( 'id' => 'aye-about-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_about_help() ) );
|
389 |
}
|
390 |
|
391 |
/**
|
402 |
|
403 |
$help_text = '<p>' . __( 'This screen provides useful information about this plugin along with methods of support.', 'youtube-embed' ) . '</p>';
|
404 |
$help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
|
405 |
+
$help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
|
406 |
+
$help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
|
407 |
$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>';
|
408 |
|
409 |
return $help_text;
|
431 |
|
432 |
if ( get_option( 'youtube_embed_activated' ) && ( ( float ) $wp_version >= 3.3 ) ) {
|
433 |
|
434 |
+
add_action( 'admin_enqueue_scripts', 'aye_admin_enqueue_scripts' );
|
435 |
|
436 |
+
delete_option( 'youtube_embed_activated' );
|
437 |
}
|
438 |
|
439 |
/**
|
446 |
|
447 |
function aye_admin_enqueue_scripts() {
|
448 |
|
449 |
+
wp_enqueue_style( 'wp-pointer' );
|
450 |
+
wp_enqueue_script( 'wp-pointer' );
|
451 |
|
452 |
+
add_action( 'admin_print_footer_scripts', 'aye_admin_print_footer_scripts' );
|
453 |
}
|
454 |
|
455 |
/**
|
462 |
|
463 |
function aye_admin_print_footer_scripts() {
|
464 |
|
465 |
+
$pointer_content = '<h3>' . __( 'Welcome to Artiss YouTube Embed', 'youtube-embed' ) . '</h3>';
|
466 |
+
$pointer_content .= '<p style="font-style:italic;">' . __( 'Thank you for installing this plugin.', 'youtube-embed' ) . '</p>';
|
467 |
+
$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>';
|
468 |
+
$pointer_content .= '<p>' . __( 'Even if you do nothing else, please visit the Profiles option to check your default video values.', 'youtube-embed' ) . '</p>';
|
469 |
?>
|
470 |
<script>
|
471 |
jQuery(function () {
|
includes/aye-display-about.php
CHANGED
@@ -21,6 +21,8 @@ $options = aye_set_general_defaults();
|
|
21 |
if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
22 |
?>
|
23 |
|
|
|
|
|
24 |
<p><?php echo sprintf( __( 'You are using Artiss YouTube Embed version %s. It was written by David Artiss.', 'youtube-embed' ), youtube_embed_version ); ?></p>
|
25 |
|
26 |
<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>
|
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>
|
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,27 +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">
|
12 |
-
<div class="icon32" id="icon-edit-pages"></div>
|
13 |
-
|
14 |
-
<h2><?php _e( 'Artiss YouTube Embed README', '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 |
-
if ( !function_exists( 'wp_readme_parser' ) ) {
|
21 |
-
echo '<p>You shouldn\'t be able to see this but I guess that odd things can happen!<p>';
|
22 |
-
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>';
|
23 |
-
} else {
|
24 |
-
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' );
|
25 |
-
}
|
26 |
-
?>
|
27 |
-
</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 |
}
|
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 |
}
|
includes/aye-generate-embed-code.php
CHANGED
@@ -1,623 +1,629 @@
|
|
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 |
-
if (
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
if ( $
|
355 |
-
|
356 |
-
//
|
357 |
-
|
358 |
-
$
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
if ( $
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
if ( $
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
$result .= "
|
383 |
-
|
384 |
-
$result .= "\t<param
|
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 |
-
$result .= $tab . "
|
445 |
-
|
446 |
-
if (
|
447 |
-
|
448 |
-
$result .= $tab . "
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
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 |
-
$loop
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
?>
|
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 . print_r( $general, true ) . print_r( $options, true ) . print_r( $list, true ) . print_r( $return, true ) );
|
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 |
+
// Now add a commented header and trailer
|
480 |
+
|
481 |
+
$result = "\n<!-- YouTube Embed v" . youtube_embed_version . " | http://www.artiss.co.uk/youtube-embed -->\n" . $result;
|
482 |
+
$result .= "<!-- End of YouTube Embed code -->\n";
|
483 |
+
|
484 |
+
// Cache the output
|
485 |
+
|
486 |
+
if ( $general[ 'embed_cache' ] != 0 ) { set_transient( $cache_key, $result, 3600 * $general[ 'embed_cache' ] ); }
|
487 |
+
|
488 |
+
return $result;
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Validate a supplied profile name
|
493 |
+
*
|
494 |
+
* Returns a profile number for a supplied name
|
495 |
+
*
|
496 |
+
* @since 2.0
|
497 |
+
*
|
498 |
+
* @param string $name The name of the profile to find
|
499 |
+
* @param string $number The number of profiles available
|
500 |
+
* @return string The profile number (defaults to 0)
|
501 |
+
*/
|
502 |
+
|
503 |
+
function aye_validate_profile( $name, $number ) {
|
504 |
+
|
505 |
+
$profile = 0;
|
506 |
+
$name = strtolower( $name );
|
507 |
+
|
508 |
+
if ( ( $name != '' ) && ( $name != 'default' ) ) {
|
509 |
+
|
510 |
+
// Loop around, fetching in profile names
|
511 |
+
|
512 |
+
$loop = 1;
|
513 |
+
while ( ( $loop <= $number ) && ( $profile == 0 ) ) {
|
514 |
+
if ( ( $name == $loop ) or ( $name == 'Profile ' . $loop ) ) {
|
515 |
+
$profile = $loop;
|
516 |
+
} else {
|
517 |
+
$profiles = get_option( 'youtube_embed_profile' . $loop );
|
518 |
+
$profname = strtolower( $profiles[ 'name' ] );
|
519 |
+
if ( $profname == $name ) { $profile = $loop; }
|
520 |
+
}
|
521 |
+
$loop ++;
|
522 |
+
}
|
523 |
+
}
|
524 |
+
return $profile;
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Validate a supplied list name
|
529 |
+
*
|
530 |
+
* Returns a list for a supplied list number or name name - blank if not a valid list
|
531 |
+
*
|
532 |
+
* @since 2.0
|
533 |
+
*
|
534 |
+
* @param string $name The name of the list to find
|
535 |
+
* @param string $number The number of lists available
|
536 |
+
* @return string The list (defaults to blank)
|
537 |
+
*/
|
538 |
+
|
539 |
+
function aye_validate_list( $name, $number ) {
|
540 |
+
|
541 |
+
$list = '';
|
542 |
+
|
543 |
+
// If the parameter contains commas, assume to be a comma seperated list and move into an array
|
544 |
+
|
545 |
+
if ( strpos( $name, ',' ) !== false ) {
|
546 |
+
$list = explode( ',', $name );
|
547 |
+
} else {
|
548 |
+
|
549 |
+
// No comma, so check if this is a named list
|
550 |
+
|
551 |
+
$name = strtolower( $name );
|
552 |
+
|
553 |
+
if ( $name != '' ) {
|
554 |
+
|
555 |
+
// Loop around, fetching in profile names
|
556 |
+
|
557 |
+
$loop = 1;
|
558 |
+
while ( ( $loop <= $number ) && ( $list == '' ) ) {
|
559 |
+
$listfiles = get_option( 'youtube_embed_list' . $loop );
|
560 |
+
if ( ( $name == strval( $loop ) ) or ( $name == 'List ' . $loop ) ) {
|
561 |
+
$list = $listfiles[ 'list' ];
|
562 |
+
} else {
|
563 |
+
$listname = strtolower( $listfiles[ 'name' ] );
|
564 |
+
if ( $listname == $name ) { $list = $listfiles[ 'list' ]; }
|
565 |
+
}
|
566 |
+
$loop ++;
|
567 |
+
}
|
568 |
+
}
|
569 |
+
if ( $list != '' ) { $list = explode( "\n", $list ); }
|
570 |
+
}
|
571 |
+
return $list;
|
572 |
+
}
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Get URL parameters
|
576 |
+
*
|
577 |
+
* Extract a requested parameter from a URL
|
578 |
+
*
|
579 |
+
* @since 2.0
|
580 |
+
*
|
581 |
+
* @param string $id The ID of the video
|
582 |
+
* @param string $para The parameter to extract
|
583 |
+
* @param string $current The current parameter value
|
584 |
+
* @return string The parameter value
|
585 |
+
*/
|
586 |
+
|
587 |
+
function aye_get_url_para( $id, $para, $current ) {
|
588 |
+
|
589 |
+
// Look for an ampersand
|
590 |
+
|
591 |
+
$start_pos = false;
|
592 |
+
if ( strpos( $id, '&' . $para . '=' ) !== false ) { $start_pos = strpos( $id, '&' . $para . '=' ) + 6 + strlen( $para ); }
|
593 |
+
|
594 |
+
// If a parameter was found, look for the end of it
|
595 |
+
|
596 |
+
if ( $start_pos !== false ) {
|
597 |
+
$end_pos = strpos( $id, '&', $start_pos + 1 );
|
598 |
+
if ( !$end_pos ) { $end_pos = strlen( $id ); }
|
599 |
+
|
600 |
+
// Extract the parameter and return it
|
601 |
+
|
602 |
+
$current = substr( $id, $start_pos, $end_pos - $start_pos );
|
603 |
+
}
|
604 |
+
|
605 |
+
return $current;
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Decode a string
|
610 |
+
*
|
611 |
+
* Decode an HTML encoded string. I'm not using htmlspecialchars_decode to maintain
|
612 |
+
* PHP 4 compatibility.
|
613 |
+
*
|
614 |
+
* @since 2.0.3
|
615 |
+
*
|
616 |
+
* @param string $encoded The encoded string
|
617 |
+
* @return string The decoded string
|
618 |
+
*/
|
619 |
+
|
620 |
+
function aye_decode( $encoded ) {
|
621 |
+
|
622 |
+
$find = array( '&', '"', ''', '<', '>' );
|
623 |
+
$replace = array( '&', '"', "'", '<', '>' );
|
624 |
+
|
625 |
+
$decoded = str_replace( $find, $replace, $encoded );
|
626 |
+
|
627 |
+
return $decoded;
|
628 |
+
}
|
629 |
?>
|
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 );
|
@@ -47,15 +49,19 @@ function aye_generate_thumbnail_code( $id, $style, $class, $rel, $target, $width
|
|
47 |
|
48 |
// Now create the required code
|
49 |
if ( $alt == '' ) { $alt = sprintf( __( 'YouTube Video %s' ), $id ); }
|
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 );
|
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
@@ -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 |
|
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,140 +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 |
-
include ( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-options-widgets.php' );
|
145 |
-
}
|
146 |
}
|
147 |
|
148 |
/**
|
@@ -154,7 +152,7 @@ class YouTubeEmbedWidget extends WP_Widget {
|
|
154 |
*/
|
155 |
|
156 |
function youtube_embed_register_widgets() {
|
157 |
-
|
158 |
}
|
159 |
add_action( 'widgets_init', 'youtube_embed_register_widgets' );
|
160 |
?>
|
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
@@ -14,66 +14,77 @@
|
|
14 |
<h2><?php _e( 'Artiss YouTube Embed Options', 'youtube-embed' ); ?></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 |
|
26 |
// If the number of profiles is less than zero, put it to 0
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
// If the number of lists is less than 1, put it to 1
|
33 |
|
34 |
if ( $options[ 'list_no' ] < 1 ) { $options[ 'list_no' ] = 1; }
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
54 |
|
55 |
// Update the options
|
56 |
|
57 |
update_option( 'youtube_embed_general', $options );
|
58 |
-
|
59 |
|
60 |
// Update the alternative shortcodes
|
61 |
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
-
|
67 |
|
68 |
update_option( 'youtube_embed_shortcode', $shortcode );
|
69 |
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
|
78 |
echo '<div class="updated fade"><p><strong>' . $update_message . "</strong></p></div>\n";
|
79 |
}
|
@@ -83,12 +94,15 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
|
|
83 |
$options = aye_set_general_defaults();
|
84 |
$shortcode = aye_set_shortcode_option();
|
85 |
$url = aye_set_url_option();
|
|
|
86 |
|
87 |
// Display ads
|
88 |
|
89 |
if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
90 |
?>
|
91 |
|
|
|
|
|
92 |
<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>
|
93 |
|
94 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-general-options' ?>">
|
@@ -97,7 +111,7 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
97 |
|
98 |
<tr>
|
99 |
<th scope="row"><?php _e( 'Remove Adverts', 'youtube-embed' ); ?></th>
|
100 |
-
<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
|
101 |
</tr>
|
102 |
|
103 |
</table></br>
|
@@ -107,12 +121,12 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
107 |
<table class="form-table">
|
108 |
<tr>
|
109 |
<th scope="row"><?php _e( 'Add Metadata', 'youtube-embed' ); ?></th>
|
110 |
-
<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/
|
111 |
</tr>
|
112 |
|
113 |
<tr>
|
114 |
<th scope="row"><?php _e( 'Comment Embedding', 'youtube-embed' ); ?></th>
|
115 |
-
<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/
|
116 |
</tr>
|
117 |
|
118 |
<tr>
|
@@ -141,6 +155,11 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
141 |
<option value="3"<?php if ( $options[ 'thumbnail' ] == "3" ) { echo " selected='selected'"; } ?>><?php _e ( 'End', 'youtube-embed' ); ?></option>
|
142 |
</select> <span class="description"><?php _e( 'Which thumbnail to use', 'youtube-embed' ); ?></span></td>
|
143 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
144 |
</table>
|
145 |
|
146 |
<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' ); ?>
|
@@ -171,7 +190,7 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
171 |
</tr>
|
172 |
</table>
|
173 |
|
174 |
-
<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/
|
175 |
|
176 |
<table class="form-table">
|
177 |
<tr>
|
@@ -196,14 +215,39 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
196 |
|
197 |
<table class="form-table">
|
198 |
<tr>
|
199 |
-
<th scope="row"><?php _e( 'Show
|
200 |
<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>
|
201 |
</tr>
|
202 |
|
|
|
|
|
|
|
|
|
|
|
203 |
<tr>
|
204 |
<th scope="row"><?php _e( 'Add to Admin Bar', 'youtube-embed' ); ?></th>
|
205 |
<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>
|
206 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
</table>
|
208 |
|
209 |
<br/><span class="yt_heading"><?php _e( 'Profile & List Sizes', 'youtube-embed' ); ?></span>
|
@@ -236,18 +280,21 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
236 |
<tr>
|
237 |
<th scope="row"><?php _e( 'Transcript Cache', 'youtube-embed' ); ?></th>
|
238 |
<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>
|
239 |
-
</tr>
|
240 |
|
241 |
<?php
|
242 |
global $wpdb;
|
243 |
-
$
|
|
|
|
|
|
|
|
|
244 |
?>
|
245 |
|
246 |
-
<tr>
|
247 |
<th scope="row"><?php _e( 'Clear Cache', 'youtube-embed' ); ?></th>
|
248 |
-
<td><input type="checkbox" name="youtube_embed_clear_cache" value="1"> <span class="description"><?php
|
249 |
-
</tr>
|
250 |
-
</table>
|
251 |
|
252 |
<br/><span class="yt_heading"><?php _e( 'YouTube API', 'youtube-embed' ); ?></span>
|
253 |
|
@@ -272,17 +319,23 @@ $numposts = $wpdb -> get_var( "SELECT COUNT(*) FROM $wpdb->options WHERE option_
|
|
272 |
|
273 |
<table class="form-table"><tr>
|
274 |
<th scope="row"><?php _e( 'Video Playback Error Message', 'youtube-embed' ); ?></th>
|
275 |
-
<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', 'youtube-embed' ); ?></span></td>
|
276 |
</tr></table>
|
277 |
|
278 |
<br/><span class="yt_heading"><?php _e( 'Security', 'youtube-embed' ); ?></span>
|
279 |
|
280 |
<table class="form-table"><tr>
|
|
|
|
|
281 |
<th scope="row"><?php _e( 'Privacy-Enhanced Mode', 'youtube-embed' ); ?></th>
|
282 |
-
<td><
|
|
|
|
|
|
|
|
|
283 |
</tr></table>
|
284 |
|
285 |
-
<br/><span class="yt_heading"><?php _e( '
|
286 |
|
287 |
<table class="form-table"><tr>
|
288 |
<th scope="row"><?php _e( 'Allow Frame Border on IFRAME', 'youtube-embed' ); ?></th>
|
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' ?>">
|
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>
|
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>
|
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' ); ?>
|
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>
|
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>
|
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 |
|
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>
|
includes/aye-options-lists.php
CHANGED
@@ -78,6 +78,8 @@ $general = aye_set_general_defaults();
|
|
78 |
if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
79 |
?>
|
80 |
|
|
|
|
|
81 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-list-options'; ?>">
|
82 |
|
83 |
<span class="alignright">
|
@@ -90,7 +92,7 @@ while ( $loop <= $general[ 'list_no' ] ) {
|
|
90 |
$listname = $listfiles[ 'name' ];
|
91 |
|
92 |
if ( $listname == '' ) { $listname = __( 'List', 'youtube-embed' ) . ' ' . $loop; }
|
93 |
-
|
94 |
echo '<option value="' . $loop . '"';
|
95 |
if ( $list_no == $loop ) { echo " selected='selected'"; }
|
96 |
echo '>' . $listname . "</option>\n";
|
@@ -176,10 +178,10 @@ if ( $options[ 'list' ] != '' ) {
|
|
176 |
|
177 |
echo '"><img src="' . plugins_url() . '/youtube-embed/images/';
|
178 |
if ( $status == 0 ) {
|
179 |
-
|
180 |
echo 'tick.png" alt="' . $alt_text . '" title="' . $alt_text . '" ';
|
181 |
} else {
|
182 |
-
|
183 |
echo 'cross.png" alt="' . $alt_text . '" title="' . $alt_text . '" ';
|
184 |
}
|
185 |
|
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">
|
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";
|
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
@@ -28,63 +28,63 @@ if ( $profile_no == '' ) { $profile_no = 0; }
|
|
28 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-profile' , 'youtube_embed_profile_nonce' ) ) ) {
|
29 |
|
30 |
$options[ 'name' ] = $_POST[ 'youtube_embed_name' ];
|
31 |
-
|
32 |
-
|
33 |
$options[ 'width' ] = $_POST[ 'youtube_embed_width' ];
|
34 |
-
|
35 |
|
36 |
-
|
37 |
if ( strpos( $options[ 'template' ], '%video%' ) === false ) { $options[ 'template' ] = '%video%'; }
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
$options[ 'privacy' ] = $_POST[ 'youtube_embed_privacy' ];
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
|
67 |
if ( $default_size !== '' ) {
|
68 |
$options[ 'width' ] = ltrim( substr( $default_size, 0, 4 ), '0' );
|
69 |
$options[ 'height'] = ltrim( substr( $default_size, -4, 4 ), '0' );
|
70 |
}
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
update_option( 'youtube_embed_profile' . $profile_no, $options );
|
90 |
echo '<div class="updated fade"><p><strong>' . __( $options[ 'name' ].' Profile Saved.' ) . "</strong></p></div>\n";
|
@@ -106,6 +106,8 @@ $general = aye_set_general_defaults();
|
|
106 |
if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
107 |
?>
|
108 |
|
|
|
|
|
109 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-profile-options' ?>">
|
110 |
|
111 |
<span class="alignright">
|
@@ -117,9 +119,9 @@ if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
|
117 |
|
118 |
<?php
|
119 |
if ( $profile_no == '0' ) {
|
120 |
-
|
121 |
} else {
|
122 |
-
|
123 |
}
|
124 |
echo ' ' . __( 'Use the drop-down on the right hand side to swap between profiles.', 'youtube-embed' );
|
125 |
?>
|
@@ -137,8 +139,8 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
137 |
<td><span class="description"><?php _e( 'The type of player to use for videos.', 'youtube-embed' ); ?></span><br/>
|
138 |
<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/>
|
139 |
<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/>
|
140 |
-
<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/
|
141 |
-
<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/
|
142 |
</td>
|
143 |
</tr>
|
144 |
|
@@ -223,7 +225,11 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
223 |
|
224 |
<tr>
|
225 |
<th scope="row"><?php _e( 'Controls', 'youtube-embed' ); ?></th>
|
226 |
-
<td><
|
|
|
|
|
|
|
|
|
227 |
</tr>
|
228 |
|
229 |
<tr>
|
@@ -262,6 +268,11 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
262 |
</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>
|
263 |
</tr>
|
264 |
|
|
|
|
|
|
|
|
|
|
|
265 |
</table>
|
266 |
|
267 |
<br/><span class="yt_heading"><?php _e( 'Options for AS3 Player', 'youtube-embed' ); ?></span>
|
@@ -293,11 +304,6 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
293 |
<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>
|
294 |
</tr>
|
295 |
|
296 |
-
<tr>
|
297 |
-
<th scope="row"><?php _e( 'Modest Branding', 'youtube-embed' ); ?></th>
|
298 |
-
<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>
|
299 |
-
</tr>
|
300 |
-
|
301 |
</table>
|
302 |
|
303 |
<br/><span class="yt_heading"><?php _e( 'Options Not Supported by HTML5 Player', 'youtube-embed' ); ?></span>
|
@@ -314,7 +320,7 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
314 |
|
315 |
</table>
|
316 |
|
317 |
-
<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/
|
318 |
|
319 |
<table class="form-table">
|
320 |
<tr valign="top">
|
@@ -346,7 +352,7 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
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 |
</div>
|
352 |
|
@@ -354,8 +360,7 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
354 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-profile-options#video' ?>">
|
355 |
<div class="ytbox_grey">
|
356 |
<h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
|
357 |
-
<p><?php _e( '
|
358 |
-
<p><?php _e( 'Use the drop-down below to change which parameters the video uses - press the Change Video button to update it.', 'youtube-embed' ); ?></p>
|
359 |
<p><select name="youtube_embed_video_type">
|
360 |
<option value="d"<?php if ( $video_type == "d" ) { echo " selected='selected'"; } ?>><?php _e( 'Standard', 'youtube-embed' ); ?></option>
|
361 |
<option value="p"<?php if ( $video_type == "p" ) { echo " selected='selected'"; } ?>><?php _e( 'EmbedPlus', 'youtube-embed' ); ?></option>
|
@@ -366,7 +371,7 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
|
|
366 |
<input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video', 'youtube-embed' ); ?>"/></p>
|
367 |
|
368 |
<p><?php
|
369 |
-
if ( $video_type == "d" ) { $id = '
|
370 |
if ( $video_type == "p" ) { $id = 'YVvn8dpSAt0'; $type = 'm'; }
|
371 |
if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; $type = ''; ; }
|
372 |
if ( $video_type == "l" ) { $id = '095393D5B42B2266'; $type = ''; }
|
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 |
|
65 |
+
$default_size = $_POST[ 'youtube_embed_size' ];
|
66 |
|
67 |
if ( $default_size !== '' ) {
|
68 |
$options[ 'width' ] = ltrim( substr( $default_size, 0, 4 ), '0' );
|
69 |
$options[ 'height'] = ltrim( substr( $default_size, -4, 4 ), '0' );
|
70 |
}
|
71 |
|
72 |
+
// Set width or height, if missing
|
73 |
+
|
74 |
+
if ( ( $options[ 'width' ] == '' ) && ( $options[ 'height' ] == '' ) ) {
|
75 |
+
if ( isset( $GLOBALS[ 'content_width' ] ) ) {
|
76 |
+
$options[ 'width' ] = $GLOBALS[ 'content_width' ];
|
77 |
+
} else {
|
78 |
+
$options[ 'width' ] = 560;
|
79 |
+
}
|
80 |
+
$options[ 'height' ] = 27 + round( ( $options[ 'width' ] / 16 ) * 9, 0 );
|
81 |
+
}
|
82 |
+
if ( ( $options[ 'width' ] == '' ) && ( $options[ 'height' ] != '' ) ) {
|
83 |
+
$options[ 'width' ] = round( ( $options[ 'height' ] / 9 ) * 16, 0 );
|
84 |
+
}
|
85 |
+
if ( ( $options[ 'width' ] != '' ) && ( $options[ 'height' ] == '' ) ) {
|
86 |
+
$options[ 'height' ] = 27 + round( ( $options[ 'width' ] / 16 ) * 9, 0 );
|
87 |
+
}
|
88 |
|
89 |
update_option( 'youtube_embed_profile' . $profile_no, $options );
|
90 |
echo '<div class="updated fade"><p><strong>' . __( $options[ 'name' ].' Profile Saved.' ) . "</strong></p></div>\n";
|
106 |
if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
|
107 |
?>
|
108 |
|
109 |
+
<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>
|
110 |
+
|
111 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-profile-options' ?>">
|
112 |
|
113 |
<span class="alignright">
|
119 |
|
120 |
<?php
|
121 |
if ( $profile_no == '0' ) {
|
122 |
+
_e( 'These are the options for the default profile.', 'youtube-embed' );
|
123 |
} else {
|
124 |
+
sprintf( _e( 'These are the options for profile %s.', 'youtube-embed' ), $profile_no );
|
125 |
}
|
126 |
echo ' ' . __( 'Use the drop-down on the right hand side to swap between profiles.', 'youtube-embed' );
|
127 |
?>
|
139 |
<td><span class="description"><?php _e( 'The type of player to use for videos.', 'youtube-embed' ); ?></span><br/>
|
140 |
<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/>
|
141 |
<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/>
|
142 |
+
<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/>
|
143 |
+
<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>
|
144 |
</td>
|
145 |
</tr>
|
146 |
|
225 |
|
226 |
<tr>
|
227 |
<th scope="row"><?php _e( 'Controls', 'youtube-embed' ); ?></th>
|
228 |
+
<td><select name="youtube_embed_controls">
|
229 |
+
<option value="0"<?php if ( $options[ 'controls' ] == "0" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls do not display & Flash player loads immediately', 'youtube-embed' ); ?></option>
|
230 |
+
<option value="1"<?php if ( $options[ 'controls' ] == "1" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls display & Flash player loads immediately', 'youtube-embed' ); ?></option>
|
231 |
+
<option value="2"<?php if ( $options[ 'controls' ] == "2" ) { echo " selected='selected'"; } ?>><?php _e( 'Controls display & Flash player loads once video starts', 'youtube-embed' ); ?></option>
|
232 |
+
</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>
|
233 |
</tr>
|
234 |
|
235 |
<tr>
|
268 |
</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>
|
269 |
</tr>
|
270 |
|
271 |
+
<tr>
|
272 |
+
<th scope="row"><?php _e( 'Modest Branding', 'youtube-embed' ); ?></th>
|
273 |
+
<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>
|
274 |
+
</tr>
|
275 |
+
|
276 |
</table>
|
277 |
|
278 |
<br/><span class="yt_heading"><?php _e( 'Options for AS3 Player', 'youtube-embed' ); ?></span>
|
304 |
<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>
|
305 |
</tr>
|
306 |
|
|
|
|
|
|
|
|
|
|
|
307 |
</table>
|
308 |
|
309 |
<br/><span class="yt_heading"><?php _e( 'Options Not Supported by HTML5 Player', 'youtube-embed' ); ?></span>
|
320 |
|
321 |
</table>
|
322 |
|
323 |
+
<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>
|
324 |
|
325 |
<table class="form-table">
|
326 |
<tr valign="top">
|
352 |
|
353 |
</form>
|
354 |
|
355 |
+
<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>
|
356 |
|
357 |
</div>
|
358 |
|
360 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-profile-options#video' ?>">
|
361 |
<div class="ytbox_grey">
|
362 |
<h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
|
363 |
+
<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>
|
|
|
364 |
<p><select name="youtube_embed_video_type">
|
365 |
<option value="d"<?php if ( $video_type == "d" ) { echo " selected='selected'"; } ?>><?php _e( 'Standard', 'youtube-embed' ); ?></option>
|
366 |
<option value="p"<?php if ( $video_type == "p" ) { echo " selected='selected'"; } ?>><?php _e( 'EmbedPlus', 'youtube-embed' ); ?></option>
|
371 |
<input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video', 'youtube-embed' ); ?>"/></p>
|
372 |
|
373 |
<p><?php
|
374 |
+
if ( $video_type == "d" ) { $id = 'dzn6xHxaCrw'; $type = ''; }
|
375 |
if ( $video_type == "p" ) { $id = 'YVvn8dpSAt0'; $type = 'm'; }
|
376 |
if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; $type = ''; ; }
|
377 |
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 |
|
@@ -12,12 +12,6 @@ $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 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', 'youtube-embed' ) . ': </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' );
|
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 |
|
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' );
|
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,38 @@ function aye_set_url_option() {
|
|
53 |
return $url;
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
/**
|
57 |
* Function to set general YouTube options
|
58 |
*
|
@@ -67,9 +107,9 @@ function aye_set_general_defaults() {
|
|
67 |
|
68 |
$options = get_option( 'youtube_embed_general' );
|
69 |
$changed = false;
|
70 |
-
$default_error =
|
71 |
|
72 |
-
|
73 |
|
74 |
if ( !is_array( $options ) ) {
|
75 |
if ( get_option( 'youtube_embed_editor' ) ) {
|
@@ -78,8 +118,8 @@ function aye_set_general_defaults() {
|
|
78 |
delete_option( 'youtube_embed_editor' );
|
79 |
$changed = true;
|
80 |
} else {
|
81 |
-
|
82 |
-
|
83 |
}
|
84 |
|
85 |
// 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
|
@@ -113,6 +153,9 @@ function aye_set_general_defaults() {
|
|
113 |
if ( !array_key_exists( 'thumbnail', $options ) ) { $options[ 'thumbnail' ] = 2; $changed = true; }
|
114 |
if ( !array_key_exists( 'privacy', $options ) ) { $options[ 'privacy' ] = 0; $changed = true; }
|
115 |
if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
|
|
|
|
|
|
|
116 |
|
117 |
// Update the options, if changed, and return the result
|
118 |
|
@@ -146,12 +189,12 @@ function aye_set_profile_defaults( $profile ) {
|
|
146 |
|
147 |
// Work out default dimensions
|
148 |
|
149 |
-
|
150 |
-
if ( isset( $
|
151 |
-
|
152 |
-
$height =
|
153 |
|
154 |
-
|
155 |
|
156 |
if ( !is_array( $options ) ) {
|
157 |
if ( ( $profile == 0 ) && ( get_option( 'youtube_embed' ) ) ) {
|
@@ -159,9 +202,9 @@ function aye_set_profile_defaults( $profile ) {
|
|
159 |
$options = $old_opts;
|
160 |
delete_option( 'youtube_embed' );
|
161 |
$changed = true;
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
}
|
166 |
|
167 |
// Because of upgrading, check each option - if not set, apply default
|
@@ -169,17 +212,17 @@ function aye_set_profile_defaults( $profile ) {
|
|
169 |
if ( !array_key_exists( 'name', $options ) ) { $options[ 'name' ] = $profname; $changed = true; }
|
170 |
|
171 |
if ( !array_key_exists( 'width', $options ) ) {
|
172 |
-
$
|
173 |
$options[ 'height' ] = $height;
|
174 |
$changed = true;
|
175 |
}
|
176 |
if ( !array_key_exists( 'height', $options ) ) { $options[ 'height' ] = 340; $changed = true; }
|
177 |
if ( !array_key_exists( 'fullscreen', $options ) ) { $options[ 'fullscreen' ] = ''; $changed = true; }
|
178 |
if ( !array_key_exists( 'template', $options ) ) { $options[ 'template' ] = '%video%'; $changed = true; }
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
if ( !array_key_exists( 'annotation', $options ) ) { $options[ 'annotation' ] = 1; $changed = true; }
|
184 |
if ( !array_key_exists( 'related', $options ) ) { $options[ 'related' ] = ''; $changed = true; }
|
185 |
if ( !array_key_exists( 'info', $options ) ) { $options[ 'info' ] = 1; $changed = true; }
|
@@ -188,22 +231,21 @@ function aye_set_profile_defaults( $profile ) {
|
|
188 |
if ( !array_key_exists( 'stop', $options ) ) { $options[ 'stop' ] = 0; $changed = true; }
|
189 |
if ( !array_key_exists( 'sweetspot', $options ) ) { $options[ 'sweetspot' ] = 1; $changed = true; }
|
190 |
if ( !array_key_exists( 'type', $options ) ) { $options[ 'type' ] = 'v'; $changed = true; }
|
191 |
-
|
192 |
if ( !array_key_exists( 'autohide', $options ) ) { $options[ 'autohide' ] = 2; $changed = true; }
|
193 |
if ( !array_key_exists( 'controls', $options ) ) { $options[ 'controls' ] = 1; $changed = true; }
|
194 |
if ( !array_key_exists( 'playlist', $options ) ) { $options[ 'playlist' ] = 'v'; $changed = true; }
|
195 |
if ( !array_key_exists( 'fallback', $options ) ) { $options[ 'fallback' ] = 'v'; $changed = true; }
|
196 |
if ( !array_key_exists( 'wmode', $options ) ) { $options[ 'wmode' ] = 'window'; $changed = true; }
|
197 |
if ( !array_key_exists( 'audio', $options ) ) { $options[ 'audio' ] = ''; $changed = true; }
|
198 |
-
|
199 |
if ( !array_key_exists( 'hd', $options ) ) { $options[ 'hd' ] = 1; $changed = true; }
|
200 |
-
|
201 |
if ( !array_key_exists( 'color', $options ) ) { $options[ 'color' ] = 'red'; $changed = true; }
|
202 |
if ( !array_key_exists( 'theme', $options ) ) { $options[ 'theme' ] = 'dark'; $changed = true; }
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
|
208 |
// Update the options, if changed, and return the result
|
209 |
|
@@ -232,7 +274,7 @@ function aye_set_list_defaults( $list ) {
|
|
232 |
$options = get_option( 'youtube_embed_list' . $list );
|
233 |
$changed = false;
|
234 |
|
235 |
-
|
236 |
|
237 |
if ( !is_array( $options ) ) { $options = array(); }
|
238 |
|
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 |
+
// Ensure cookie is set
|
84 |
+
|
85 |
+
$cookie_name = 'aye_mce_shortcode';
|
86 |
+
$expiry = 2147483647; // January 2038 (maximum value to avoid the integer overflow of the 2038 bug)
|
87 |
+
|
88 |
+
if ( !isset( $_COOKIE[ $cookie_name ] ) ) { setcookie( $cookie_name, $editor_sc, $expiry, aye_get_cookie_path() ); }
|
89 |
+
|
90 |
+
// Return the shortcode
|
91 |
+
|
92 |
+
return $editor_sc;
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
/**
|
97 |
* Function to set general YouTube options
|
98 |
*
|
107 |
|
108 |
$options = get_option( 'youtube_embed_general' );
|
109 |
$changed = false;
|
110 |
+
$default_error = '<p>' . __( 'The video cannot be shown at the moment. Please try again later.', 'youtube-embed' ) . '</p>';
|
111 |
|
112 |
+
// If the old options exist, import them and then delete them
|
113 |
|
114 |
if ( !is_array( $options ) ) {
|
115 |
if ( get_option( 'youtube_embed_editor' ) ) {
|
118 |
delete_option( 'youtube_embed_editor' );
|
119 |
$changed = true;
|
120 |
} else {
|
121 |
+
$options = array();
|
122 |
+
}
|
123 |
}
|
124 |
|
125 |
// 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
|
153 |
if ( !array_key_exists( 'thumbnail', $options ) ) { $options[ 'thumbnail' ] = 2; $changed = true; }
|
154 |
if ( !array_key_exists( 'privacy', $options ) ) { $options[ 'privacy' ] = 0; $changed = true; }
|
155 |
if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
|
156 |
+
if ( !array_key_exists( 'widgets', $options ) ) { $options[ 'widgets' ] = 0; $changed = true; }
|
157 |
+
if ( !array_key_exists( 'profile_access', $options ) ) { $options[ 'profile_access' ] = 'delete_plugins'; $changed = true; }
|
158 |
+
if ( !array_key_exists( 'list_access', $options ) ) { $options[ 'list_access' ] = 'delete_plugins'; $changed = true; }
|
159 |
|
160 |
// Update the options, if changed, and return the result
|
161 |
|
189 |
|
190 |
// Work out default dimensions
|
191 |
|
192 |
+
$width = 0;
|
193 |
+
if ( isset( $content_width ) ) { $width = $content_width; }
|
194 |
+
if ( ( $width == 0 ) or ( $width == '' ) ) { $width = 560; }
|
195 |
+
$height = 25 + round( ( $width / 16 ) * 9, 0 );
|
196 |
|
197 |
+
// If the old options exist, import them and then delete them
|
198 |
|
199 |
if ( !is_array( $options ) ) {
|
200 |
if ( ( $profile == 0 ) && ( get_option( 'youtube_embed' ) ) ) {
|
202 |
$options = $old_opts;
|
203 |
delete_option( 'youtube_embed' );
|
204 |
$changed = true;
|
205 |
+
} else {
|
206 |
+
$options = array();
|
207 |
+
}
|
208 |
}
|
209 |
|
210 |
// Because of upgrading, check each option - if not set, apply default
|
212 |
if ( !array_key_exists( 'name', $options ) ) { $options[ 'name' ] = $profname; $changed = true; }
|
213 |
|
214 |
if ( !array_key_exists( 'width', $options ) ) {
|
215 |
+
$options[ 'width' ] = $width;
|
216 |
$options[ 'height' ] = $height;
|
217 |
$changed = true;
|
218 |
}
|
219 |
if ( !array_key_exists( 'height', $options ) ) { $options[ 'height' ] = 340; $changed = true; }
|
220 |
if ( !array_key_exists( 'fullscreen', $options ) ) { $options[ 'fullscreen' ] = ''; $changed = true; }
|
221 |
if ( !array_key_exists( 'template', $options ) ) { $options[ 'template' ] = '%video%'; $changed = true; }
|
222 |
+
if ( !array_key_exists( 'autoplay', $options ) ) { $options[ 'autoplay' ] = ''; $changed = true; }
|
223 |
+
if ( !array_key_exists( 'start', $options ) ) { $options[ 'start' ] = 0; $changed = true; }
|
224 |
+
if ( !array_key_exists( 'loop', $options ) ) { $options[ 'loop' ] = ''; $changed = true; }
|
225 |
+
if ( !array_key_exists( 'cc', $options ) ) { $options[ 'cc' ] = ''; $changed = true; }
|
226 |
if ( !array_key_exists( 'annotation', $options ) ) { $options[ 'annotation' ] = 1; $changed = true; }
|
227 |
if ( !array_key_exists( 'related', $options ) ) { $options[ 'related' ] = ''; $changed = true; }
|
228 |
if ( !array_key_exists( 'info', $options ) ) { $options[ 'info' ] = 1; $changed = true; }
|
231 |
if ( !array_key_exists( 'stop', $options ) ) { $options[ 'stop' ] = 0; $changed = true; }
|
232 |
if ( !array_key_exists( 'sweetspot', $options ) ) { $options[ 'sweetspot' ] = 1; $changed = true; }
|
233 |
if ( !array_key_exists( 'type', $options ) ) { $options[ 'type' ] = 'v'; $changed = true; }
|
234 |
+
if ( !array_key_exists( 'disablekb', $options ) ) { $options[ 'disablekb' ] = ''; $changed = true; }
|
235 |
if ( !array_key_exists( 'autohide', $options ) ) { $options[ 'autohide' ] = 2; $changed = true; }
|
236 |
if ( !array_key_exists( 'controls', $options ) ) { $options[ 'controls' ] = 1; $changed = true; }
|
237 |
if ( !array_key_exists( 'playlist', $options ) ) { $options[ 'playlist' ] = 'v'; $changed = true; }
|
238 |
if ( !array_key_exists( 'fallback', $options ) ) { $options[ 'fallback' ] = 'v'; $changed = true; }
|
239 |
if ( !array_key_exists( 'wmode', $options ) ) { $options[ 'wmode' ] = 'window'; $changed = true; }
|
240 |
if ( !array_key_exists( 'audio', $options ) ) { $options[ 'audio' ] = ''; $changed = true; }
|
|
|
241 |
if ( !array_key_exists( 'hd', $options ) ) { $options[ 'hd' ] = 1; $changed = true; }
|
242 |
+
if ( !array_key_exists( 'style', $options ) ) { $options[ 'style' ] = ''; $changed = true; }
|
243 |
if ( !array_key_exists( 'color', $options ) ) { $options[ 'color' ] = 'red'; $changed = true; }
|
244 |
if ( !array_key_exists( 'theme', $options ) ) { $options[ 'theme' ] = 'dark'; $changed = true; }
|
245 |
+
if ( !array_key_exists( 'https', $options ) ) { $options[ 'https' ] = 0; $changed = true; }
|
246 |
+
if ( !array_key_exists( 'modest', $options ) ) { $options[ 'modest' ] = 1; $changed = true; }
|
247 |
+
if ( !array_key_exists( 'dynamic', $options ) ) { $options[ 'dynamic' ] = ''; $changed = true; }
|
248 |
+
if ( !array_key_exists( 'fixed', $options ) ) { $options[ 'fixed' ] = ''; $changed = true; }
|
249 |
|
250 |
// Update the options, if changed, and return the result
|
251 |
|
274 |
$options = get_option( 'youtube_embed_list' . $list );
|
275 |
$changed = false;
|
276 |
|
277 |
+
// If array doesn't exist create an empty one
|
278 |
|
279 |
if ( !is_array( $options ) ) { $options = array(); }
|
280 |
|
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 ) {
|
@@ -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 ) {
|
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' );
|
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' );
|
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 @@
|
|
|
1 |
+
(function(){<?php $cookie_name='aye_mce_shortcode';if(isset($_COOKIE[$cookie_name])){$shortcode=$_COOKIE[$cookie_name]}else{$shortcode='youtube'}?>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
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Artiss YouTube Embed\n"
|
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,36 +13,36 @@ msgstr ""
|
|
13 |
"X-Poedit-Basepath: ../\n"
|
14 |
"X-Poedit-SearchPath-0: .\n"
|
15 |
|
16 |
-
#: includes/artiss-plugin-ads.php:
|
17 |
-
#: includes/aye-admin-config.php:
|
18 |
msgid "Donate"
|
19 |
msgstr ""
|
20 |
|
21 |
-
#: includes/artiss-plugin-ads.php:
|
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:
|
26 |
msgid "Follow Me"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/artiss-plugin-ads.php:
|
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:
|
34 |
msgid "Follow Artiss.co.uk on Twitter"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/artiss-plugin-ads.php:
|
38 |
msgid "Follow Artiss.co.uk on Facebook"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/artiss-plugin-ads.php:
|
42 |
msgid "Follow Artiss.co.uk on Google+"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/artiss-plugin-ads.php:
|
46 |
msgid "Follow Artiss.co.uk on RSS feed"
|
47 |
msgstr ""
|
48 |
|
@@ -52,142 +52,145 @@ msgid "YouTube Embed"
|
|
52 |
msgstr ""
|
53 |
|
54 |
#: includes/aye-add-to-admin-bar.php:78
|
55 |
-
#: includes/aye-admin-config.php:
|
56 |
msgid "Options"
|
57 |
msgstr ""
|
58 |
|
59 |
#: includes/aye-add-to-admin-bar.php:85
|
60 |
-
#: includes/aye-admin-config.php:
|
61 |
msgid "Profiles"
|
62 |
msgstr ""
|
63 |
|
64 |
#: includes/aye-add-to-admin-bar.php:92
|
65 |
-
#: includes/aye-admin-config.php:
|
66 |
msgid "Lists"
|
67 |
msgstr ""
|
68 |
|
69 |
#: includes/aye-add-to-admin-bar.php:99
|
70 |
-
#: includes/aye-admin-config.php:117
|
71 |
msgid "README"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: includes/aye-admin-config.php:
|
75 |
msgid "Settings"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: includes/aye-admin-config.php:
|
79 |
msgid "Support"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: includes/aye-admin-config.php:
|
83 |
-
msgid "Artiss YouTube
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: includes/aye-admin-config.php:
|
87 |
msgid "YouTube"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: includes/aye-admin-config.php:
|
91 |
-
|
|
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: includes/aye-admin-config.php:
|
95 |
-
msgid "
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: includes/aye-admin-config.php:
|
99 |
-
|
|
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: includes/aye-admin-config.php:
|
103 |
-
|
104 |
-
msgid "Artiss YouTube Embed README"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: includes/aye-admin-config.php:
|
108 |
-
|
109 |
-
msgid "About Artiss YouTube Embed"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: includes/aye-admin-config.php:
|
113 |
-
msgid "
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: includes/aye-admin-config.php:
|
117 |
-
|
118 |
-
#: includes/aye-admin-config.php:331
|
119 |
-
#: includes/aye-admin-config.php:373
|
120 |
-
msgid "Help"
|
121 |
msgstr ""
|
122 |
|
123 |
#: includes/aye-admin-config.php:261
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
128 |
-
#: includes/aye-admin-config.php:
|
129 |
-
#: includes/aye-admin-config.php:
|
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:
|
134 |
-
#: includes/aye-admin-config.php:
|
135 |
-
#: includes/aye-admin-config.php:
|
136 |
-
#: includes/aye-admin-config.php:
|
137 |
msgid "For more information:"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: includes/aye-admin-config.php:
|
141 |
-
#: includes/aye-admin-config.php:
|
142 |
-
#: includes/aye-admin-config.php:
|
143 |
-
#: includes/aye-admin-config.php:
|
144 |
msgid "Artiss YouTube Embed Plugin Documentation"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: includes/aye-admin-config.php:
|
148 |
-
#: includes/aye-admin-config.php:
|
149 |
-
#: includes/aye-admin-config.php:
|
150 |
-
#: includes/aye-admin-config.php:
|
151 |
msgid "YouTube Player Documentation"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/aye-admin-config.php:
|
155 |
-
#: includes/aye-admin-config.php:
|
156 |
-
#: includes/aye-admin-config.php:
|
157 |
-
#: includes/aye-admin-config.php:
|
158 |
-
#: includes/aye-display-about.php:
|
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:
|
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:
|
167 |
msgid "EmbedPlus website"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: includes/aye-admin-config.php:
|
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:
|
175 |
msgid "This screen provides useful information about this plugin along with methods of support."
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: includes/aye-admin-config.php:
|
179 |
msgid "Welcome to Artiss YouTube Embed"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: includes/aye-admin-config.php:
|
183 |
msgid "Thank you for installing this plugin."
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/aye-admin-config.php:
|
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:
|
191 |
msgid "Even if you do nothing else, please visit the Profiles option to check your default video values."
|
192 |
msgstr ""
|
193 |
|
@@ -195,73 +198,73 @@ msgstr ""
|
|
195 |
msgid "This function does not support playlists"
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: includes/aye-display-about.php:
|
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:
|
204 |
msgid "Powered by YouTube"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: includes/aye-display-about.php:
|
208 |
msgid "Copyrights"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: includes/aye-display-about.php:
|
212 |
msgid "YouTube, and all associated logos, is the copyright of Google Inc."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: includes/aye-display-about.php:
|
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:
|
220 |
msgid "Acknowledgements"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: includes/aye-display-about.php:
|
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:
|
228 |
msgid "JavaScript has been compressed with <a href=\"http://javascriptcompressor.com/\">JavaScript Compressor</a>."
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: includes/aye-display-about.php:
|
232 |
msgid "YouTube icons are courtesy of <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:
|
236 |
msgid "Support Information"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: includes/aye-display-about.php:
|
240 |
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."
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: includes/aye-display-about.php:
|
244 |
msgid "Stay in Touch"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: includes/aye-display-about.php:
|
248 |
msgid "<a href=\"http://www.artiss.co.uk/wp-plugins\">See the full list</a> of Artiss plugins, including beta releases."
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: includes/aye-display-about.php:
|
252 |
msgid "<a href=\"http://www.twitter.com/artiss_tech\">Follow Artiss.co.uk</a> on Twitter."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: includes/aye-display-about.php:
|
256 |
msgid "<a href=\"http://www.artiss.co.uk/feed\">Subscribe</a> to the Artiss.co.uk news feed."
|
257 |
msgstr ""
|
258 |
|
259 |
#: includes/aye-function-calls.php:162
|
260 |
#: includes/aye-function-calls.php:223
|
261 |
#: includes/aye-generate-download-code.php:34
|
262 |
-
#: includes/aye-generate-embed-code.php:
|
263 |
#: includes/aye-generate-shorturl-code.php:34
|
264 |
-
#: includes/aye-generate-thumbnail-code.php:
|
265 |
#: includes/aye-generate-transcript-code.php:38
|
266 |
#, php-format
|
267 |
msgid "The YouTube ID of %s is invalid."
|
@@ -276,15 +279,15 @@ msgstr ""
|
|
276 |
msgid "No YouTube ID was found."
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: includes/aye-generate-embed-code.php:
|
280 |
msgid "No video/playlist ID has been supplied"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: includes/aye-generate-embed-code.php:
|
284 |
msgid "A video list cannot be viewed within this feed - please view the original content"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: includes/aye-generate-embed-code.php:
|
288 |
msgid "Click here to view the video on YouTube"
|
289 |
msgstr ""
|
290 |
|
@@ -292,7 +295,7 @@ msgstr ""
|
|
292 |
msgid "No video ID has been supplied"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: includes/aye-generate-thumbnail-code.php:
|
296 |
#, php-format
|
297 |
msgid "YouTube Video %s"
|
298 |
msgstr ""
|
@@ -301,299 +304,370 @@ msgstr ""
|
|
301 |
msgid "Embed YouTube Widget."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: includes/aye-options-general.php:
|
305 |
#: includes/aye-options-lists.php:26
|
306 |
msgid "Settings Saved."
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: includes/aye-options-general.php:
|
310 |
msgid "Cache cleared."
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: includes/aye-options-general.php:
|
314 |
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."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: includes/aye-options-general.php:
|
318 |
msgid "Remove Adverts"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: includes/aye-options-general.php:
|
322 |
-
msgid "If you've <a href=\"http://www.artiss.co.uk/donate\">donated</a>, tick here to remove the adverts
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: includes/aye-options-general.php:
|
326 |
msgid "Embedding"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: includes/aye-options-general.php:
|
330 |
msgid "Add Metadata"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: includes/aye-options-general.php:
|
334 |
-
msgid "Allow rich metadata to be added to code. <a href=\"http://www.artiss.co.uk/
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/aye-options-general.php:
|
338 |
msgid "Comment Embedding"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: includes/aye-options-general.php:
|
342 |
-
msgid "Allow YouTube URLs in comments - will display as embedded videos. <a href=\"http://www.artiss.co.uk/
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: includes/aye-options-general.php:
|
346 |
-
#: includes/aye-options-general.php:
|
347 |
-
#: includes/aye-options-general.php:
|
348 |
-
#: includes/aye-options-general.php:
|
349 |
msgid "Profile to use"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: includes/aye-options-general.php:
|
353 |
msgid "Feed"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: includes/aye-options-general.php:
|
357 |
msgid "Text link"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: includes/aye-options-general.php:
|
361 |
msgid "Thumbnail"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: includes/aye-options-general.php:
|
365 |
msgid "Thumbnail & Text Link"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: includes/aye-options-general.php:
|
369 |
msgid "Videos cannot be embedded in feeds. Select how you wish them to be shown instead"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: includes/aye-options-general.php:
|
373 |
msgid "Thumbnail to use"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: includes/aye-options-general.php:
|
377 |
-
#: includes/aye-shared-functions.php:
|
378 |
msgid "Default"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/aye-options-general.php:
|
382 |
msgid "Default (HQ)"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: includes/aye-options-general.php:
|
386 |
msgid "Start"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: includes/aye-options-general.php:
|
390 |
msgid "Middle"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/aye-options-general.php:
|
394 |
msgid "End"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/aye-options-general.php:
|
398 |
msgid "Which thumbnail to use"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
msgid "Alternative Shortcodes"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/aye-options-general.php:
|
406 |
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>"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/aye-options-general.php:
|
410 |
msgid "Alternative Shortcode 1"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/aye-options-general.php:
|
414 |
msgid "Alternative Shortcode 2"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: includes/aye-options-general.php:
|
418 |
msgid "Migration"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/aye-options-general.php:
|
422 |
-
msgid "Switch on compatibility with other embedding plugins. For more details on migrating from another plugin, please <a href=\"http://www.artiss.co.uk/
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/aye-options-general.php:
|
426 |
msgid "Bracket Embedding"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: includes/aye-options-general.php:
|
430 |
msgid "Allow embedding using URLs within brackets. Activating impacts performance"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: includes/aye-options-general.php:
|
434 |
msgid "Alternative Embedding"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: includes/aye-options-general.php:
|
438 |
msgid "Allow all other types of embedding. Activating impacts performance"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: includes/aye-options-general.php:
|
442 |
msgid "For above 2 options"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: includes/aye-options-general.php:
|
446 |
msgid "Admin Options"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: includes/aye-options-general.php:
|
450 |
-
msgid "Show
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: includes/aye-options-general.php:
|
454 |
msgid "Show the YouTube button on the post editor"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
msgid "Add to Admin Bar"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: includes/aye-options-general.php:
|
462 |
msgid "Add link to options screen to Admin Bar"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
msgid "Profile & List Sizes"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: includes/aye-options-general.php:
|
470 |
msgid "Number of Profiles"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: includes/aye-options-general.php:
|
474 |
msgid "Maximum number of profiles"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: includes/aye-options-general.php:
|
478 |
msgid "Number of Lists"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: includes/aye-options-general.php:
|
482 |
msgid "Maximum number of lists"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: includes/aye-options-general.php:
|
486 |
msgid "Performance"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: includes/aye-options-general.php:
|
490 |
msgid "Embed Cache"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: includes/aye-options-general.php:
|
494 |
msgid "How many hours to retain embed output. 0 to switch off"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: includes/aye-options-general.php:
|
498 |
msgid "Video Information Cache"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: includes/aye-options-general.php:
|
502 |
msgid "How many hours to retain video information, including it's validity. 0 to switch off"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: includes/aye-options-general.php:
|
506 |
msgid "Transcript Cache"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: includes/aye-options-general.php:
|
510 |
msgid "How many hours to store transcripts for in cache. 0 to switch off"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
msgid "Clear Cache"
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: includes/aye-options-general.php:
|
518 |
-
|
519 |
-
msgid "Select this option to remove all YouTube Embed cache. You currently have %d cached video(s)"
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: includes/aye-options-general.php:
|
523 |
msgid "YouTube API"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: includes/aye-options-general.php:
|
527 |
msgid "The YouTube API is used to validate video IDs and to determine if it is a video or playlist."
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: includes/aye-options-general.php:
|
531 |
msgid "API State"
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: includes/aye-options-general.php:
|
535 |
msgid "API should not be used"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/aye-options-general.php:
|
539 |
msgid "HTTP API used and errors are reported"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: includes/aye-options-general.php:
|
543 |
msgid "HTTPS API used and errors are reported"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: includes/aye-options-general.php:
|
547 |
msgid "HTTP API used and no errors are reported"
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: includes/aye-options-general.php:
|
551 |
msgid "HTTPS API used and no errors are reported"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: includes/aye-options-general.php:
|
555 |
msgid "Error Reporting"
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: includes/aye-options-general.php:
|
559 |
msgid "Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output."
|
560 |
msgstr ""
|
561 |
|
562 |
-
#: includes/aye-options-general.php:
|
563 |
msgid "Video Playback Error Message"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: includes/aye-options-general.php:
|
567 |
msgid "This is the message that will be shown on the post"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: includes/aye-options-general.php:
|
571 |
msgid "Security"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: includes/aye-options-general.php:
|
575 |
msgid "Privacy-Enhanced Mode"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: includes/aye-options-general.php:
|
579 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: includes/aye-options-general.php:
|
583 |
-
msgid "
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: includes/aye-options-general.php:
|
|
|
|
|
|
|
|
|
587 |
msgid "Allow Frame Border on IFRAME"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: includes/aye-options-general.php:
|
591 |
msgid "FRAMEBORDER is not HTML5 compliant"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: includes/aye-options-general.php:
|
595 |
-
#: includes/aye-options-lists.php:
|
596 |
-
#: includes/aye-options-profiles.php:
|
597 |
msgid "Save Settings"
|
598 |
msgstr ""
|
599 |
|
@@ -605,69 +679,68 @@ msgstr ""
|
|
605 |
msgid "Errors were found with your video list. See the list below for details."
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: includes/aye-options-lists.php:
|
609 |
msgid "List"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: includes/aye-options-lists.php:
|
613 |
msgid "Change list"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: includes/aye-options-lists.php:
|
617 |
msgid "These are the options for list "
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: includes/aye-options-lists.php:
|
621 |
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."
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: includes/aye-options-lists.php:
|
625 |
msgid "List name"
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: includes/aye-options-lists.php:
|
629 |
msgid "The name you wish to give this list"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: includes/aye-options-lists.php:
|
633 |
msgid "Video IDs (one per line)"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: includes/aye-options-lists.php:
|
637 |
-
#: includes/aye-options-widgets.php:
|
638 |
msgid "Video ID"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: includes/aye-options-lists.php:
|
642 |
-
#: includes/aye-options-widgets.php:19
|
643 |
msgid "Video Title"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: includes/aye-options-lists.php:
|
647 |
msgid "Status"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: includes/aye-options-lists.php:
|
651 |
msgid "This is a playlist"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: includes/aye-options-lists.php:
|
655 |
msgid "Invalid video ID"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: includes/aye-options-lists.php:
|
659 |
msgid "YouTube API error"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/aye-options-lists.php:
|
663 |
msgid "Valid video"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/aye-options-lists.php:
|
667 |
msgid "The video ID is valid"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/aye-options-lists.php:
|
671 |
msgid "The video ID is invalid"
|
672 |
msgstr ""
|
673 |
|
@@ -675,406 +748,414 @@ msgstr ""
|
|
675 |
msgid " Profile Saved."
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: includes/aye-options-profiles.php:
|
679 |
msgid "Change profile"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: includes/aye-options-profiles.php:
|
683 |
msgid "These are the options for the default profile."
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: includes/aye-options-profiles.php:
|
687 |
#, php-format
|
688 |
msgid "These are the options for profile %s."
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: includes/aye-options-profiles.php:
|
692 |
msgid "Use the drop-down on the right hand side to swap between profiles."
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: includes/aye-options-profiles.php:
|
696 |
msgid "Profile name"
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: includes/aye-options-profiles.php:
|
700 |
msgid "The name you wish to give this profile"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: includes/aye-options-profiles.php:
|
704 |
msgid "Video Embed Type"
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: includes/aye-options-profiles.php:
|
708 |
msgid "The type of player to use for videos."
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: includes/aye-options-profiles.php:
|
712 |
-
#: includes/aye-options-profiles.php:
|
713 |
-
#: includes/aye-options-profiles.php:
|
714 |
-
#: includes/aye-options-widgets.php:
|
715 |
msgid "IFRAME"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: includes/aye-options-profiles.php:
|
719 |
msgid "Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 player. This is the current YouTube default."
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: includes/aye-options-profiles.php:
|
723 |
-
#: includes/aye-options-profiles.php:
|
724 |
-
#: includes/aye-options-profiles.php:
|
725 |
-
#: includes/aye-options-widgets.php:
|
726 |
msgid "OBJECT"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/aye-options-profiles.php:
|
730 |
msgid "Use the AS3 Flash player."
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/aye-options-profiles.php:
|
734 |
-
#: includes/aye-options-widgets.php:
|
735 |
msgid "Chromeless"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/aye-options-profiles.php:
|
739 |
-
msgid "Use the <a href=\"http://www.artiss.co.uk/
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: includes/aye-options-profiles.php:
|
743 |
-
#: includes/aye-options-profiles.php:
|
744 |
-
#: includes/aye-options-widgets.php:
|
745 |
msgid "EmbedPlus"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: includes/aye-options-profiles.php:
|
749 |
-
msgid "Use <a href=\"http://www.artiss.co.uk/
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: includes/aye-options-profiles.php:
|
753 |
msgid "Playlist Embed Type"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: includes/aye-options-profiles.php:
|
757 |
msgid "The type of player to use when showing playlists."
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: includes/aye-options-profiles.php:
|
761 |
msgid "Options For All Player Types"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: includes/aye-options-profiles.php:
|
765 |
-
#: includes/aye-options-widgets.php:
|
766 |
msgid "Template"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: includes/aye-options-profiles.php:
|
770 |
msgid "Wrapper for video output. Must include <code>%video%</code> tag to show video position"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: includes/aye-options-profiles.php:
|
774 |
-
#: includes/aye-options-widgets.php:
|
775 |
msgid "Style"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/aye-options-profiles.php:
|
779 |
msgid "CSS elements to apply to video"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/aye-options-profiles.php:
|
783 |
msgid "Video size"
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: includes/aye-options-profiles.php:
|
787 |
msgid "The width x height of the video, in pixels"
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: includes/aye-options-profiles.php:
|
791 |
msgid "Default Sizes"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: includes/aye-options-profiles.php:
|
795 |
msgid "Use above sizes"
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: includes/aye-options-profiles.php:
|
799 |
msgid "Select one of these default sizes to override the above video sizes"
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: includes/aye-options-profiles.php:
|
803 |
-
#: includes/aye-options-widgets.php:
|
804 |
msgid "Dynamically Resize"
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: includes/aye-options-profiles.php:
|
808 |
msgid "Show full width and resize with the browser"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: includes/aye-options-profiles.php:
|
812 |
msgid "Set Maximum Size"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: includes/aye-options-profiles.php:
|
816 |
msgid "Use above width to define maximum size"
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: includes/aye-options-profiles.php:
|
820 |
msgid "Audio Only"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: includes/aye-options-profiles.php:
|
824 |
msgid "Only show the toolbar for audio only playback"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: includes/aye-options-profiles.php:
|
828 |
-
#: includes/aye-options-widgets.php:
|
829 |
msgid "Autoplay"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: includes/aye-options-profiles.php:
|
833 |
msgid "The video will start playing when the player loads"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: includes/aye-options-profiles.php:
|
837 |
msgid "Options Not Supported by EmbedPlus"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: includes/aye-options-profiles.php:
|
841 |
msgid "Auto hide"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: includes/aye-options-profiles.php:
|
845 |
msgid "Controls & progress bar remain visible"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: includes/aye-options-profiles.php:
|
849 |
msgid "Controls & progress bar fade out"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: includes/aye-options-profiles.php:
|
853 |
msgid "Progress bar fades"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: includes/aye-options-profiles.php:
|
857 |
msgid "Video controls will automatically hide after a video begins playing"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: includes/aye-options-profiles.php:
|
861 |
msgid "Controls"
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: includes/aye-options-profiles.php:
|
865 |
-
msgid "
|
|
|
|
|
|
|
|
|
866 |
msgstr ""
|
867 |
|
868 |
#: includes/aye-options-profiles.php:231
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
869 |
msgid "Use SSL? <a href=\"http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS\">Read more</a>"
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: includes/aye-options-profiles.php:
|
873 |
-
#: includes/aye-options-widgets.php:
|
874 |
msgid "Loop Video"
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: includes/aye-options-profiles.php:
|
878 |
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"
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: includes/aye-options-profiles.php:
|
882 |
msgid "Information"
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: includes/aye-options-profiles.php:
|
886 |
msgid "Display the video title and uploader before the video starts. If displaying a playlist this will show video thumbnails"
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: includes/aye-options-profiles.php:
|
890 |
msgid "Related Videos"
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: includes/aye-options-profiles.php:
|
894 |
msgid "Load related videos once playback starts. Also toggles the search option."
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: includes/aye-options-profiles.php:
|
898 |
msgid "Theme"
|
899 |
msgstr ""
|
900 |
|
901 |
-
#: includes/aye-options-profiles.php:
|
902 |
msgid "Dark"
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: includes/aye-options-profiles.php:
|
906 |
msgid "Light"
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: includes/aye-options-profiles.php:
|
910 |
msgid "Display player controls within a dark or light control bar"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/aye-options-profiles.php:
|
914 |
msgid "Progress Bar Colour"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: includes/aye-options-profiles.php:
|
918 |
msgid "Red"
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: includes/aye-options-profiles.php:
|
922 |
msgid "White (desaturated)"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: includes/aye-options-profiles.php:
|
926 |
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"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: includes/aye-options-profiles.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
930 |
msgid "Options for AS3 Player"
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: includes/aye-options-profiles.php:
|
934 |
msgid "The following options are not supported if using EmbedPlus or if the IFRAME player uses HTML5."
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: includes/aye-options-profiles.php:
|
938 |
msgid "Annotations"
|
939 |
msgstr ""
|
940 |
|
941 |
-
#: includes/aye-options-profiles.php:
|
942 |
msgid "Video annotations are shown by default"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: includes/aye-options-profiles.php:
|
946 |
msgid "Closed Captions"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: includes/aye-options-profiles.php:
|
950 |
msgid "Show closed captions (subtitles) by default, even if the user has turned captions off"
|
951 |
msgstr ""
|
952 |
|
953 |
-
#: includes/aye-options-profiles.php:
|
954 |
msgid "Disable Keyboard"
|
955 |
msgstr ""
|
956 |
|
957 |
-
#: includes/aye-options-profiles.php:
|
958 |
msgid "Disable the player keyboard controls"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: includes/aye-options-profiles.php:
|
962 |
msgid "Fullscreen"
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: includes/aye-options-profiles.php:
|
966 |
msgid "A button will allow the viewer to watch the video fullscreen"
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: includes/aye-options-profiles.php:
|
970 |
msgid "Link to YouTube"
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: includes/aye-options-profiles.php:
|
974 |
msgid "Video links back to YouTube when clicked"
|
975 |
msgstr ""
|
976 |
|
977 |
-
#: includes/aye-options-profiles.php:
|
978 |
-
msgid "Modest Branding"
|
979 |
-
msgstr ""
|
980 |
-
|
981 |
-
#: includes/aye-options-profiles.php:298
|
982 |
-
msgid "Reduce branding on video."
|
983 |
-
msgstr ""
|
984 |
-
|
985 |
-
#: includes/aye-options-profiles.php:303
|
986 |
msgid "Options Not Supported by HTML5 Player"
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: includes/aye-options-profiles.php:
|
990 |
msgid "Window Mode"
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: includes/aye-options-profiles.php:
|
994 |
msgid "Opaque"
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: includes/aye-options-profiles.php:
|
998 |
msgid "Transparent"
|
999 |
msgstr ""
|
1000 |
|
1001 |
-
#: includes/aye-options-profiles.php:
|
1002 |
msgid "Window"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
-
#: includes/aye-options-profiles.php:
|
1006 |
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>."
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: includes/aye-options-profiles.php:
|
1010 |
msgid "Options Only Supported By EmbedPlus"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: includes/aye-options-profiles.php:
|
1014 |
msgid "Learn more about EmbedPlus"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: includes/aye-options-profiles.php:
|
1018 |
msgid "Fallback Embed Type"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
-
#: includes/aye-options-profiles.php:
|
1022 |
msgid "The type of player to use if Flash is not available and EmbedPlus cannot be used."
|
1023 |
msgstr ""
|
1024 |
|
1025 |
-
#: includes/aye-options-profiles.php:
|
1026 |
msgid "Play HD"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: includes/aye-options-profiles.php:
|
1030 |
msgid "Play the video in HD if possible"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: includes/aye-options-profiles.php:
|
1034 |
msgid "Real-time Reactions"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: includes/aye-options-profiles.php:
|
1038 |
msgid "Show the Real-time Reactions button"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: includes/aye-options-profiles.php:
|
1042 |
msgid "Sweet Spots"
|
1043 |
msgstr ""
|
1044 |
|
1045 |
-
#: includes/aye-options-profiles.php:
|
1046 |
msgid "Find sweet spots for the next and previous buttons"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: includes/aye-options-profiles.php:
|
1050 |
-
msgid "Would you like the video below to be yours? <a href=\"http://www.artiss.co.uk/
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: includes/aye-options-profiles.php:
|
1054 |
msgid "YouTube Video Sample"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: includes/aye-options-profiles.php:
|
1058 |
-
msgid "
|
1059 |
-
msgstr ""
|
1060 |
-
|
1061 |
-
#: includes/aye-options-profiles.php:358
|
1062 |
-
msgid "Use the drop-down below to change which parameters the video uses - press the Change Video button to update it."
|
1063 |
msgstr ""
|
1064 |
|
1065 |
-
#: includes/aye-options-profiles.php:
|
1066 |
msgid "Standard"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: includes/aye-options-profiles.php:
|
1070 |
msgid "3D"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: includes/aye-options-profiles.php:
|
1074 |
msgid "Playlist"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
-
#: includes/aye-options-profiles.php:
|
1078 |
msgid "Change video"
|
1079 |
msgstr ""
|
1080 |
|
@@ -1082,88 +1163,88 @@ msgstr ""
|
|
1082 |
msgid "Widget Title"
|
1083 |
msgstr ""
|
1084 |
|
1085 |
-
#: includes/aye-options-widgets.php:
|
1086 |
msgid "ID Type"
|
1087 |
msgstr ""
|
1088 |
|
1089 |
-
#: includes/aye-options-widgets.php:
|
1090 |
msgid "Video or Playlist"
|
1091 |
msgstr ""
|
1092 |
|
1093 |
-
#: includes/aye-options-widgets.php:
|
1094 |
msgid "Search"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
-
#: includes/aye-options-widgets.php:
|
1098 |
msgid "User"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: includes/aye-options-widgets.php:
|
1102 |
-
#: includes/aye-shared-functions.php:
|
1103 |
msgid "Profile"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
-
#: includes/aye-options-widgets.php:
|
1107 |
msgid "Size"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
-
#: includes/aye-options-widgets.php:
|
1111 |
-
#: includes/aye-options-widgets.php:
|
1112 |
-
#: includes/aye-options-widgets.php:
|
1113 |
-
#: includes/aye-options-widgets.php:
|
1114 |
-
#: includes/aye-options-widgets.php:
|
1115 |
msgid "Profile default"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: includes/aye-options-widgets.php:
|
1119 |
-
#: includes/aye-options-widgets.php:
|
1120 |
-
#: includes/aye-options-widgets.php:
|
1121 |
msgid "No"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
-
#: includes/aye-options-widgets.php:
|
1125 |
-
#: includes/aye-options-widgets.php:
|
1126 |
-
#: includes/aye-options-widgets.php:
|
1127 |
msgid "Yes"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
-
#: includes/aye-options-widgets.php:
|
1131 |
msgid "Embed Type"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: includes/aye-options-widgets.php:
|
1135 |
msgid "Start (seconds)"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: includes/aye-options-widgets.php:
|
1139 |
msgid "Stop (seconds)"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: includes/aye-options-widgets.php:
|
1143 |
msgid "Non-EmbedPlus Options"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
-
#: includes/aye-options-widgets.php:
|
1147 |
msgid "List Playback"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: includes/aye-options-widgets.php:
|
1151 |
msgid "Play each video in order"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
-
#: includes/aye-options-widgets.php:
|
1155 |
msgid "Play videos randomly"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: includes/aye-options-widgets.php:
|
1159 |
msgid "Play one random video"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
-
#: includes/aye-set-defaults.php:
|
1163 |
msgid "The video cannot be shown at the moment. Please try again later."
|
1164 |
msgstr ""
|
1165 |
|
1166 |
-
#: includes/aye-shared-functions.php:
|
1167 |
#, php-format
|
1168 |
msgid "An error occurred accessing the YouTube API for video ID %s - %s"
|
1169 |
msgstr ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Artiss YouTube Embed\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-10-11 15:17-0000\n"
|
6 |
+
"PO-Revision-Date: 2012-10-11 15:18-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:65
|
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 |
|
52 |
msgstr ""
|
53 |
|
54 |
#: includes/aye-add-to-admin-bar.php:78
|
55 |
+
#: includes/aye-admin-config.php:119
|
56 |
msgid "Options"
|
57 |
msgstr ""
|
58 |
|
59 |
#: includes/aye-add-to-admin-bar.php:85
|
60 |
+
#: includes/aye-admin-config.php:129
|
61 |
msgid "Profiles"
|
62 |
msgstr ""
|
63 |
|
64 |
#: includes/aye-add-to-admin-bar.php:92
|
65 |
+
#: includes/aye-admin-config.php:139
|
66 |
msgid "Lists"
|
67 |
msgstr ""
|
68 |
|
69 |
#: includes/aye-add-to-admin-bar.php:99
|
|
|
70 |
msgid "README"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/aye-admin-config.php:38
|
74 |
msgid "Settings"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/aye-admin-config.php:63
|
78 |
msgid "Support"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/aye-admin-config.php:97
|
82 |
+
msgid "About Artiss YouTube Embeds"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: includes/aye-admin-config.php:97
|
86 |
msgid "YouTube"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/aye-admin-config.php:103
|
90 |
+
#: includes/aye-display-about.php:14
|
91 |
+
msgid "About Artiss YouTube Embed"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: includes/aye-admin-config.php:103
|
95 |
+
msgid "About"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: includes/aye-admin-config.php:112
|
99 |
+
#: includes/aye-display-instructions.php:14
|
100 |
+
msgid "Artiss YouTube Embed Instructions"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: includes/aye-admin-config.php:112
|
104 |
+
msgid "Instructions"
|
|
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: includes/aye-admin-config.php:119
|
108 |
+
msgid "Artiss YouTube Embed Options"
|
|
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: includes/aye-admin-config.php:129
|
112 |
+
msgid "Artiss YouTube Embed Profiles"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: includes/aye-admin-config.php:139
|
116 |
+
msgid "Artiss YouTube Embed Lists"
|
|
|
|
|
|
|
117 |
msgstr ""
|
118 |
|
119 |
#: includes/aye-admin-config.php:261
|
120 |
+
#: includes/aye-admin-config.php:303
|
121 |
+
#: includes/aye-admin-config.php:346
|
122 |
+
#: includes/aye-admin-config.php:388
|
123 |
+
msgid "Help"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: includes/aye-admin-config.php:276
|
127 |
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."
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: includes/aye-admin-config.php:277
|
131 |
+
#: includes/aye-admin-config.php:319
|
132 |
+
#: includes/aye-admin-config.php:362
|
133 |
msgid "Remember to click the Save Settings button at the bottom of the screen for new settings to take effect."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: includes/aye-admin-config.php:278
|
137 |
+
#: includes/aye-admin-config.php:320
|
138 |
+
#: includes/aye-admin-config.php:363
|
139 |
+
#: includes/aye-admin-config.php:404
|
140 |
msgid "For more information:"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: includes/aye-admin-config.php:279
|
144 |
+
#: includes/aye-admin-config.php:321
|
145 |
+
#: includes/aye-admin-config.php:364
|
146 |
+
#: includes/aye-admin-config.php:405
|
147 |
msgid "Artiss YouTube Embed Plugin Documentation"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/aye-admin-config.php:280
|
151 |
+
#: includes/aye-admin-config.php:322
|
152 |
+
#: includes/aye-admin-config.php:365
|
153 |
+
#: includes/aye-admin-config.php:406
|
154 |
msgid "YouTube Player Documentation"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/aye-admin-config.php:281
|
158 |
+
#: includes/aye-admin-config.php:324
|
159 |
+
#: includes/aye-admin-config.php:366
|
160 |
+
#: includes/aye-admin-config.php:407
|
161 |
+
#: includes/aye-display-about.php:50
|
162 |
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."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: includes/aye-admin-config.php:318
|
166 |
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."
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/aye-admin-config.php:323
|
170 |
msgid "EmbedPlus website"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: includes/aye-admin-config.php:361
|
174 |
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."
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: includes/aye-admin-config.php:403
|
178 |
msgid "This screen provides useful information about this plugin along with methods of support."
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: includes/aye-admin-config.php:465
|
182 |
msgid "Welcome to Artiss YouTube Embed"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: includes/aye-admin-config.php:466
|
186 |
msgid "Thank you for installing this plugin."
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: includes/aye-admin-config.php:467
|
190 |
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."
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: includes/aye-admin-config.php:468
|
194 |
msgid "Even if you do nothing else, please visit the Profiles option to check your default video values."
|
195 |
msgstr ""
|
196 |
|
198 |
msgid "This function does not support playlists"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: includes/aye-display-about.php:26
|
202 |
#, php-format
|
203 |
msgid "You are using Artiss YouTube Embed version %s. It was written by David Artiss."
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: includes/aye-display-about.php:28
|
207 |
msgid "Powered by YouTube"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: includes/aye-display-about.php:32
|
211 |
msgid "Copyrights"
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: includes/aye-display-about.php:34
|
215 |
msgid "YouTube, and all associated logos, is the copyright of Google Inc."
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: includes/aye-display-about.php:36
|
219 |
msgid "EmbedPlus is copyright. Read the <a href=\"http://embedplus.com/terms.aspx\" target=\"_blank\">Terms & Conditions of Use</a>."
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: includes/aye-display-about.php:38
|
223 |
msgid "Acknowledgements"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/aye-display-about.php:40
|
227 |
msgid "Images have been compressed with <a href=\"http://www.smushit.com/ysmush.it/\">Smush.it</a>."
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/aye-display-about.php:42
|
231 |
msgid "JavaScript has been compressed with <a href=\"http://javascriptcompressor.com/\">JavaScript Compressor</a>."
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: includes/aye-display-about.php:44
|
235 |
msgid "YouTube icons are courtesy of <a href=\"http://www.youtube.com/t/creators_downloads\">YouTube</a>. Other icons are by <a href=\"http://p.yusukekamiyamane.com/\">Yusuke Kamiyamane</a>."
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: includes/aye-display-about.php:46
|
239 |
msgid "Support Information"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: includes/aye-display-about.php:48
|
243 |
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."
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: includes/aye-display-about.php:52
|
247 |
msgid "Stay in Touch"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: includes/aye-display-about.php:54
|
251 |
msgid "<a href=\"http://www.artiss.co.uk/wp-plugins\">See the full list</a> of Artiss plugins, including beta releases."
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/aye-display-about.php:56
|
255 |
msgid "<a href=\"http://www.twitter.com/artiss_tech\">Follow Artiss.co.uk</a> on Twitter."
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/aye-display-about.php:58
|
259 |
msgid "<a href=\"http://www.artiss.co.uk/feed\">Subscribe</a> to the Artiss.co.uk news feed."
|
260 |
msgstr ""
|
261 |
|
262 |
#: includes/aye-function-calls.php:162
|
263 |
#: includes/aye-function-calls.php:223
|
264 |
#: includes/aye-generate-download-code.php:34
|
265 |
+
#: includes/aye-generate-embed-code.php:114
|
266 |
#: includes/aye-generate-shorturl-code.php:34
|
267 |
+
#: includes/aye-generate-thumbnail-code.php:39
|
268 |
#: includes/aye-generate-transcript-code.php:38
|
269 |
#, php-format
|
270 |
msgid "The YouTube ID of %s is invalid."
|
279 |
msgid "No YouTube ID was found."
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: includes/aye-generate-embed-code.php:64
|
283 |
msgid "No video/playlist ID has been supplied"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: includes/aye-generate-embed-code.php:181
|
287 |
msgid "A video list cannot be viewed within this feed - please view the original content"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: includes/aye-generate-embed-code.php:185
|
291 |
msgid "Click here to view the video on YouTube"
|
292 |
msgstr ""
|
293 |
|
295 |
msgid "No video ID has been supplied"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: includes/aye-generate-thumbnail-code.php:51
|
299 |
#, php-format
|
300 |
msgid "YouTube Video %s"
|
301 |
msgstr ""
|
304 |
msgid "Embed YouTube Widget."
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: includes/aye-options-general.php:62
|
308 |
#: includes/aye-options-lists.php:26
|
309 |
msgid "Settings Saved."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: includes/aye-options-general.php:86
|
313 |
msgid "Cache cleared."
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: includes/aye-options-general.php:106
|
317 |
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."
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: includes/aye-options-general.php:113
|
321 |
msgid "Remove Adverts"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: includes/aye-options-general.php:114
|
325 |
+
msgid "If you've <a href=\"http://www.artiss.co.uk/donate\">donated</a>, tick here to remove the adverts from these administration screens"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: includes/aye-options-general.php:119
|
329 |
msgid "Embedding"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: includes/aye-options-general.php:123
|
333 |
msgid "Add Metadata"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: includes/aye-options-general.php:124
|
337 |
+
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>"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: includes/aye-options-general.php:128
|
341 |
msgid "Comment Embedding"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/aye-options-general.php:129
|
345 |
+
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>"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: includes/aye-options-general.php:133
|
349 |
+
#: includes/aye-options-general.php:174
|
350 |
+
#: includes/aye-options-general.php:186
|
351 |
+
#: includes/aye-options-general.php:207
|
352 |
msgid "Profile to use"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: includes/aye-options-general.php:140
|
356 |
msgid "Feed"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: includes/aye-options-general.php:142
|
360 |
msgid "Text link"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: includes/aye-options-general.php:143
|
364 |
msgid "Thumbnail"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: includes/aye-options-general.php:144
|
368 |
msgid "Thumbnail & Text Link"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: includes/aye-options-general.php:145
|
372 |
msgid "Videos cannot be embedded in feeds. Select how you wish them to be shown instead"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: includes/aye-options-general.php:149
|
376 |
msgid "Thumbnail to use"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: includes/aye-options-general.php:151
|
380 |
+
#: includes/aye-shared-functions.php:481
|
381 |
msgid "Default"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/aye-options-general.php:152
|
385 |
msgid "Default (HQ)"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/aye-options-general.php:153
|
389 |
msgid "Start"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: includes/aye-options-general.php:154
|
393 |
msgid "Middle"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/aye-options-general.php:155
|
397 |
msgid "End"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/aye-options-general.php:156
|
401 |
msgid "Which thumbnail to use"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/aye-options-general.php:160
|
405 |
+
msgid "Allow shortcodes in widgets"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: includes/aye-options-general.php:161
|
409 |
+
msgid "Allow shortcodes to be used in widgets - this will apply to <strong>all</strong> widgets"
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: includes/aye-options-general.php:165
|
413 |
msgid "Alternative Shortcodes"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: includes/aye-options-general.php:165
|
417 |
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>"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: includes/aye-options-general.php:169
|
421 |
msgid "Alternative Shortcode 1"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: includes/aye-options-general.php:181
|
425 |
msgid "Alternative Shortcode 2"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: includes/aye-options-general.php:193
|
429 |
msgid "Migration"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: includes/aye-options-general.php:193
|
433 |
+
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>."
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: includes/aye-options-general.php:197
|
437 |
msgid "Bracket Embedding"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/aye-options-general.php:198
|
441 |
msgid "Allow embedding using URLs within brackets. Activating impacts performance"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: includes/aye-options-general.php:202
|
445 |
msgid "Alternative Embedding"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: includes/aye-options-general.php:203
|
449 |
msgid "Allow all other types of embedding. Activating impacts performance"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: includes/aye-options-general.php:210
|
453 |
msgid "For above 2 options"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: includes/aye-options-general.php:214
|
457 |
msgid "Admin Options"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: includes/aye-options-general.php:218
|
461 |
+
msgid "Show Editor Button"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: includes/aye-options-general.php:219
|
465 |
msgid "Show the YouTube button on the post editor"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: includes/aye-options-general.php:223
|
469 |
+
msgid "Editor Button Shortcode"
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#: includes/aye-options-general.php:224
|
473 |
+
msgid "Shortcode for editor button to use."
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: includes/aye-options-general.php:228
|
477 |
msgid "Add to Admin Bar"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: includes/aye-options-general.php:229
|
481 |
msgid "Add link to options screen to Admin Bar"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: includes/aye-options-general.php:233
|
485 |
+
msgid "Profiles Screen Access"
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: includes/aye-options-general.php:235
|
489 |
+
#: includes/aye-options-general.php:245
|
490 |
+
msgid "Administrator"
|
491 |
+
msgstr ""
|
492 |
+
|
493 |
+
#: includes/aye-options-general.php:236
|
494 |
+
#: includes/aye-options-general.php:246
|
495 |
+
msgid "Editor"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: includes/aye-options-general.php:237
|
499 |
+
#: includes/aye-options-general.php:247
|
500 |
+
msgid "Author"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: includes/aye-options-general.php:238
|
504 |
+
#: includes/aye-options-general.php:248
|
505 |
+
msgid "Contributor"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: includes/aye-options-general.php:239
|
509 |
+
msgid "Specify the user access required for the profiles screen"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: includes/aye-options-general.php:243
|
513 |
+
msgid "Lists Screen Access"
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: includes/aye-options-general.php:249
|
517 |
+
msgid "Specify the user access required for the lists screen"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: includes/aye-options-general.php:253
|
521 |
msgid "Profile & List Sizes"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: includes/aye-options-general.php:257
|
525 |
msgid "Number of Profiles"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/aye-options-general.php:258
|
529 |
msgid "Maximum number of profiles"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: includes/aye-options-general.php:262
|
533 |
msgid "Number of Lists"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: includes/aye-options-general.php:263
|
537 |
msgid "Maximum number of lists"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/aye-options-general.php:267
|
541 |
msgid "Performance"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: includes/aye-options-general.php:271
|
545 |
msgid "Embed Cache"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: includes/aye-options-general.php:272
|
549 |
msgid "How many hours to retain embed output. 0 to switch off"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: includes/aye-options-general.php:276
|
553 |
msgid "Video Information Cache"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: includes/aye-options-general.php:277
|
557 |
msgid "How many hours to retain video information, including it's validity. 0 to switch off"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: includes/aye-options-general.php:281
|
561 |
msgid "Transcript Cache"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: includes/aye-options-general.php:282
|
565 |
msgid "How many hours to store transcripts for in cache. 0 to switch off"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: includes/aye-options-general.php:291
|
569 |
+
msgid "You currently have cache for"
|
570 |
+
msgstr ""
|
571 |
+
|
572 |
+
#: includes/aye-options-general.php:291
|
573 |
+
msgid "and"
|
574 |
+
msgstr ""
|
575 |
+
|
576 |
+
#: includes/aye-options-general.php:295
|
577 |
msgid "Clear Cache"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: includes/aye-options-general.php:296
|
581 |
+
msgid "Select this option to remove all YouTube Embed cache."
|
|
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: includes/aye-options-general.php:299
|
585 |
msgid "YouTube API"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: includes/aye-options-general.php:301
|
589 |
msgid "The YouTube API is used to validate video IDs and to determine if it is a video or playlist."
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: includes/aye-options-general.php:305
|
593 |
msgid "API State"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: includes/aye-options-general.php:307
|
597 |
msgid "API should not be used"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: includes/aye-options-general.php:308
|
601 |
msgid "HTTP API used and errors are reported"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: includes/aye-options-general.php:309
|
605 |
msgid "HTTPS API used and errors are reported"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: includes/aye-options-general.php:310
|
609 |
msgid "HTTP API used and no errors are reported"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: includes/aye-options-general.php:311
|
613 |
msgid "HTTPS API used and no errors are reported"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: includes/aye-options-general.php:316
|
617 |
msgid "Error Reporting"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/aye-options-general.php:318
|
621 |
msgid "Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output."
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: includes/aye-options-general.php:321
|
625 |
msgid "Video Playback Error Message"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: includes/aye-options-general.php:322
|
629 |
msgid "This is the message that will be shown on the post"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: includes/aye-options-general.php:325
|
633 |
msgid "Security"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: includes/aye-options-general.php:330
|
637 |
msgid "Privacy-Enhanced Mode"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: includes/aye-options-general.php:332
|
641 |
+
msgid "Cookies should always be stored"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: includes/aye-options-general.php:333
|
645 |
+
msgid "Cookies should never be stored"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: includes/aye-options-general.php:334
|
649 |
+
msgid "Cookies should be stored based on user's Do Not Track setting"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: includes/aye-options-general.php:335
|
653 |
+
msgid "Read more about <a href=\"http://donottrack.us/\">Do Not Track</a>"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: includes/aye-options-general.php:338
|
657 |
+
msgid "Compatibility"
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: includes/aye-options-general.php:341
|
661 |
msgid "Allow Frame Border on IFRAME"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: includes/aye-options-general.php:342
|
665 |
msgid "FRAMEBORDER is not HTML5 compliant"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: includes/aye-options-general.php:347
|
669 |
+
#: includes/aye-options-lists.php:125
|
670 |
+
#: includes/aye-options-profiles.php:351
|
671 |
msgid "Save Settings"
|
672 |
msgstr ""
|
673 |
|
679 |
msgid "Errors were found with your video list. See the list below for details."
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: includes/aye-options-lists.php:94
|
683 |
msgid "List"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/aye-options-lists.php:104
|
687 |
msgid "Change list"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: includes/aye-options-lists.php:107
|
691 |
msgid "These are the options for list "
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: includes/aye-options-lists.php:107
|
695 |
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."
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: includes/aye-options-lists.php:112
|
699 |
msgid "List name"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: includes/aye-options-lists.php:114
|
703 |
msgid "The name you wish to give this list"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: includes/aye-options-lists.php:118
|
707 |
msgid "Video IDs (one per line)"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/aye-options-lists.php:136
|
711 |
+
#: includes/aye-options-widgets.php:19
|
712 |
msgid "Video ID"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: includes/aye-options-lists.php:136
|
|
|
716 |
msgid "Video Title"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: includes/aye-options-lists.php:136
|
720 |
msgid "Status"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/aye-options-lists.php:152
|
724 |
msgid "This is a playlist"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: includes/aye-options-lists.php:156
|
728 |
msgid "Invalid video ID"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: includes/aye-options-lists.php:160
|
732 |
msgid "YouTube API error"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: includes/aye-options-lists.php:163
|
736 |
msgid "Valid video"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: includes/aye-options-lists.php:181
|
740 |
msgid "The video ID is valid"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: includes/aye-options-lists.php:184
|
744 |
msgid "The video ID is invalid"
|
745 |
msgstr ""
|
746 |
|
748 |
msgid " Profile Saved."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/aye-options-profiles.php:117
|
752 |
msgid "Change profile"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/aye-options-profiles.php:122
|
756 |
msgid "These are the options for the default profile."
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: includes/aye-options-profiles.php:124
|
760 |
#, php-format
|
761 |
msgid "These are the options for profile %s."
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: includes/aye-options-profiles.php:126
|
765 |
msgid "Use the drop-down on the right hand side to swap between profiles."
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/aye-options-profiles.php:132
|
769 |
msgid "Profile name"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: includes/aye-options-profiles.php:134
|
773 |
msgid "The name you wish to give this profile"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/aye-options-profiles.php:138
|
777 |
msgid "Video Embed Type"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: includes/aye-options-profiles.php:139
|
781 |
msgid "The type of player to use for videos."
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: includes/aye-options-profiles.php:140
|
785 |
+
#: includes/aye-options-profiles.php:150
|
786 |
+
#: includes/aye-options-profiles.php:329
|
787 |
+
#: includes/aye-options-widgets.php:89
|
788 |
msgid "IFRAME"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: includes/aye-options-profiles.php:140
|
792 |
msgid "Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 player. This is the current YouTube default."
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: includes/aye-options-profiles.php:141
|
796 |
+
#: includes/aye-options-profiles.php:151
|
797 |
+
#: includes/aye-options-profiles.php:330
|
798 |
+
#: includes/aye-options-widgets.php:91
|
799 |
msgid "OBJECT"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: includes/aye-options-profiles.php:141
|
803 |
msgid "Use the AS3 Flash player."
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: includes/aye-options-profiles.php:142
|
807 |
+
#: includes/aye-options-widgets.php:93
|
808 |
msgid "Chromeless"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: includes/aye-options-profiles.php:142
|
812 |
+
msgid "Use the <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-chromeless\">Chromeless</a> version of the AS3 Flash Player."
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: includes/aye-options-profiles.php:143
|
816 |
+
#: includes/aye-options-profiles.php:366
|
817 |
+
#: includes/aye-options-widgets.php:95
|
818 |
msgid "EmbedPlus"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: includes/aye-options-profiles.php:143
|
822 |
+
msgid "Use <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus\">EmbedPlus</a>, if Flash is available."
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: includes/aye-options-profiles.php:148
|
826 |
msgid "Playlist Embed Type"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: includes/aye-options-profiles.php:149
|
830 |
msgid "The type of player to use when showing playlists."
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: includes/aye-options-profiles.php:156
|
834 |
msgid "Options For All Player Types"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: includes/aye-options-profiles.php:160
|
838 |
+
#: includes/aye-options-widgets.php:49
|
839 |
msgid "Template"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/aye-options-profiles.php:161
|
843 |
msgid "Wrapper for video output. Must include <code>%video%</code> tag to show video position"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/aye-options-profiles.php:165
|
847 |
+
#: includes/aye-options-widgets.php:55
|
848 |
msgid "Style"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: includes/aye-options-profiles.php:166
|
852 |
msgid "CSS elements to apply to video"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: includes/aye-options-profiles.php:172
|
856 |
msgid "Video size"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: includes/aye-options-profiles.php:173
|
860 |
msgid "The width x height of the video, in pixels"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/aye-options-profiles.php:177
|
864 |
msgid "Default Sizes"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: includes/aye-options-profiles.php:179
|
868 |
msgid "Use above sizes"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: includes/aye-options-profiles.php:185
|
872 |
msgid "Select one of these default sizes to override the above video sizes"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: includes/aye-options-profiles.php:189
|
876 |
+
#: includes/aye-options-widgets.php:73
|
877 |
msgid "Dynamically Resize"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: includes/aye-options-profiles.php:190
|
881 |
msgid "Show full width and resize with the browser"
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: includes/aye-options-profiles.php:194
|
885 |
msgid "Set Maximum Size"
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: includes/aye-options-profiles.php:195
|
889 |
msgid "Use above width to define maximum size"
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: includes/aye-options-profiles.php:202
|
893 |
msgid "Audio Only"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: includes/aye-options-profiles.php:203
|
897 |
msgid "Only show the toolbar for audio only playback"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/aye-options-profiles.php:207
|
901 |
+
#: includes/aye-options-widgets.php:101
|
902 |
msgid "Autoplay"
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: includes/aye-options-profiles.php:208
|
906 |
msgid "The video will start playing when the player loads"
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: includes/aye-options-profiles.php:213
|
910 |
msgid "Options Not Supported by EmbedPlus"
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: includes/aye-options-profiles.php:218
|
914 |
msgid "Auto hide"
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: includes/aye-options-profiles.php:220
|
918 |
msgid "Controls & progress bar remain visible"
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: includes/aye-options-profiles.php:221
|
922 |
msgid "Controls & progress bar fade out"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: includes/aye-options-profiles.php:222
|
926 |
msgid "Progress bar fades"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: includes/aye-options-profiles.php:223
|
930 |
msgid "Video controls will automatically hide after a video begins playing"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: includes/aye-options-profiles.php:227
|
934 |
msgid "Controls"
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: includes/aye-options-profiles.php:229
|
938 |
+
msgid "Controls do not display & Flash player loads immediately"
|
939 |
+
msgstr ""
|
940 |
+
|
941 |
+
#: includes/aye-options-profiles.php:230
|
942 |
+
msgid "Controls display & Flash player loads immediately"
|
943 |
msgstr ""
|
944 |
|
945 |
#: includes/aye-options-profiles.php:231
|
946 |
+
msgid "Controls display & Flash player loads once video starts"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: includes/aye-options-profiles.php:232
|
950 |
+
msgid "Whether the video player controls will display. For AS3 player it also defines when the Flash player will load"
|
951 |
+
msgstr ""
|
952 |
+
|
953 |
+
#: includes/aye-options-profiles.php:237
|
954 |
msgid "Use SSL? <a href=\"http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS\">Read more</a>"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: includes/aye-options-profiles.php:241
|
958 |
+
#: includes/aye-options-widgets.php:147
|
959 |
msgid "Loop Video"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: includes/aye-options-profiles.php:242
|
963 |
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"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: includes/aye-options-profiles.php:246
|
967 |
msgid "Information"
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: includes/aye-options-profiles.php:247
|
971 |
msgid "Display the video title and uploader before the video starts. If displaying a playlist this will show video thumbnails"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: includes/aye-options-profiles.php:251
|
975 |
msgid "Related Videos"
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/aye-options-profiles.php:252
|
979 |
msgid "Load related videos once playback starts. Also toggles the search option."
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: includes/aye-options-profiles.php:256
|
983 |
msgid "Theme"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: includes/aye-options-profiles.php:258
|
987 |
msgid "Dark"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: includes/aye-options-profiles.php:259
|
991 |
msgid "Light"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: includes/aye-options-profiles.php:260
|
995 |
msgid "Display player controls within a dark or light control bar"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: includes/aye-options-profiles.php:264
|
999 |
msgid "Progress Bar Colour"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
+
#: includes/aye-options-profiles.php:266
|
1003 |
msgid "Red"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
+
#: includes/aye-options-profiles.php:267
|
1007 |
msgid "White (desaturated)"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: includes/aye-options-profiles.php:268
|
1011 |
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"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: includes/aye-options-profiles.php:272
|
1015 |
+
msgid "Modest Branding"
|
1016 |
+
msgstr ""
|
1017 |
+
|
1018 |
+
#: includes/aye-options-profiles.php:273
|
1019 |
+
msgid "Reduce branding on video."
|
1020 |
+
msgstr ""
|
1021 |
+
|
1022 |
+
#: includes/aye-options-profiles.php:278
|
1023 |
msgid "Options for AS3 Player"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
+
#: includes/aye-options-profiles.php:279
|
1027 |
msgid "The following options are not supported if using EmbedPlus or if the IFRAME player uses HTML5."
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: includes/aye-options-profiles.php:283
|
1031 |
msgid "Annotations"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: includes/aye-options-profiles.php:284
|
1035 |
msgid "Video annotations are shown by default"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
+
#: includes/aye-options-profiles.php:288
|
1039 |
msgid "Closed Captions"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: includes/aye-options-profiles.php:289
|
1043 |
msgid "Show closed captions (subtitles) by default, even if the user has turned captions off"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: includes/aye-options-profiles.php:293
|
1047 |
msgid "Disable Keyboard"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: includes/aye-options-profiles.php:294
|
1051 |
msgid "Disable the player keyboard controls"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: includes/aye-options-profiles.php:298
|
1055 |
msgid "Fullscreen"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: includes/aye-options-profiles.php:299
|
1059 |
msgid "A button will allow the viewer to watch the video fullscreen"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: includes/aye-options-profiles.php:303
|
1063 |
msgid "Link to YouTube"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
+
#: includes/aye-options-profiles.php:304
|
1067 |
msgid "Video links back to YouTube when clicked"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
+
#: includes/aye-options-profiles.php:309
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1071 |
msgid "Options Not Supported by HTML5 Player"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
+
#: includes/aye-options-profiles.php:313
|
1075 |
msgid "Window Mode"
|
1076 |
msgstr ""
|
1077 |
|
1078 |
+
#: includes/aye-options-profiles.php:315
|
1079 |
msgid "Opaque"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
+
#: includes/aye-options-profiles.php:316
|
1083 |
msgid "Transparent"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
+
#: includes/aye-options-profiles.php:317
|
1087 |
msgid "Window"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
+
#: includes/aye-options-profiles.php:318
|
1091 |
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>."
|
1092 |
msgstr ""
|
1093 |
|
1094 |
+
#: includes/aye-options-profiles.php:323
|
1095 |
msgid "Options Only Supported By EmbedPlus"
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: includes/aye-options-profiles.php:323
|
1099 |
msgid "Learn more about EmbedPlus"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
+
#: includes/aye-options-profiles.php:327
|
1103 |
msgid "Fallback Embed Type"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: includes/aye-options-profiles.php:328
|
1107 |
msgid "The type of player to use if Flash is not available and EmbedPlus cannot be used."
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: includes/aye-options-profiles.php:334
|
1111 |
msgid "Play HD"
|
1112 |
msgstr ""
|
1113 |
|
1114 |
+
#: includes/aye-options-profiles.php:335
|
1115 |
msgid "Play the video in HD if possible"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: includes/aye-options-profiles.php:339
|
1119 |
msgid "Real-time Reactions"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: includes/aye-options-profiles.php:340
|
1123 |
msgid "Show the Real-time Reactions button"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: includes/aye-options-profiles.php:344
|
1127 |
msgid "Sweet Spots"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: includes/aye-options-profiles.php:345
|
1131 |
msgid "Find sweet spots for the next and previous buttons"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: includes/aye-options-profiles.php:355
|
1135 |
+
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."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: includes/aye-options-profiles.php:362
|
1139 |
msgid "YouTube Video Sample"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: includes/aye-options-profiles.php:363
|
1143 |
+
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."
|
|
|
|
|
|
|
|
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: includes/aye-options-profiles.php:365
|
1147 |
msgid "Standard"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: includes/aye-options-profiles.php:367
|
1151 |
msgid "3D"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: includes/aye-options-profiles.php:368
|
1155 |
msgid "Playlist"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: includes/aye-options-profiles.php:371
|
1159 |
msgid "Change video"
|
1160 |
msgstr ""
|
1161 |
|
1163 |
msgid "Widget Title"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: includes/aye-options-widgets.php:27
|
1167 |
msgid "ID Type"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: includes/aye-options-widgets.php:29
|
1171 |
msgid "Video or Playlist"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
+
#: includes/aye-options-widgets.php:31
|
1175 |
msgid "Search"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
+
#: includes/aye-options-widgets.php:33
|
1179 |
msgid "User"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
+
#: includes/aye-options-widgets.php:41
|
1183 |
+
#: includes/aye-shared-functions.php:488
|
1184 |
msgid "Profile"
|
1185 |
msgstr ""
|
1186 |
|
1187 |
+
#: includes/aye-options-widgets.php:61
|
1188 |
msgid "Size"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
+
#: includes/aye-options-widgets.php:75
|
1192 |
+
#: includes/aye-options-widgets.php:87
|
1193 |
+
#: includes/aye-options-widgets.php:103
|
1194 |
+
#: includes/aye-options-widgets.php:135
|
1195 |
+
#: includes/aye-options-widgets.php:149
|
1196 |
msgid "Profile default"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
+
#: includes/aye-options-widgets.php:77
|
1200 |
+
#: includes/aye-options-widgets.php:105
|
1201 |
+
#: includes/aye-options-widgets.php:151
|
1202 |
msgid "No"
|
1203 |
msgstr ""
|
1204 |
|
1205 |
+
#: includes/aye-options-widgets.php:79
|
1206 |
+
#: includes/aye-options-widgets.php:107
|
1207 |
+
#: includes/aye-options-widgets.php:153
|
1208 |
msgid "Yes"
|
1209 |
msgstr ""
|
1210 |
|
1211 |
+
#: includes/aye-options-widgets.php:85
|
1212 |
msgid "Embed Type"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
+
#: includes/aye-options-widgets.php:113
|
1216 |
msgid "Start (seconds)"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: includes/aye-options-widgets.php:119
|
1220 |
msgid "Stop (seconds)"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: includes/aye-options-widgets.php:124
|
1224 |
msgid "Non-EmbedPlus Options"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: includes/aye-options-widgets.php:133
|
1228 |
msgid "List Playback"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: includes/aye-options-widgets.php:137
|
1232 |
msgid "Play each video in order"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: includes/aye-options-widgets.php:139
|
1236 |
msgid "Play videos randomly"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: includes/aye-options-widgets.php:141
|
1240 |
msgid "Play one random video"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: includes/aye-set-defaults.php:110
|
1244 |
msgid "The video cannot be shown at the moment. Please try again later."
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: includes/aye-shared-functions.php:240
|
1248 |
#, php-format
|
1249 |
msgid "An error occurred accessing the YouTube API for video ID %s - %s"
|
1250 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dartiss
|
|
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.4.
|
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 |
|
@@ -25,6 +25,7 @@ Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet power
|
|
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 |
* And much, much more!
|
29 |
|
30 |
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!
|
@@ -62,7 +63,6 @@ The following parameters work with all embed types:
|
|
62 |
* **start** - a number of seconds from where to start the video playing
|
63 |
* **style** - apply CSS elements directly to the video output
|
64 |
* **template** - specify a template (see section on Templates for further details)
|
65 |
-
* **title** - the title of the video
|
66 |
* **type** - which embedding type to use, this can be `embedplus`, `iframe`, `object` or `chromeless`
|
67 |
* **width** - the video width, in pixels
|
68 |
|
@@ -70,7 +70,7 @@ The following parameters will not work with EmbedPlus:
|
|
70 |
|
71 |
* **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.
|
72 |
* **color** - white or red, the colour of the progress bar (see the FAQ about having a white progress bar with the light theme)
|
73 |
-
* **controls** -
|
74 |
* **https** - yes or no, whether to use HTTPS for the video
|
75 |
* **info** - yes or no, show video information. If displaying a playlist this will show video thumbnails
|
76 |
* **loop** - yes or no, whether to start the video again once it ends
|
@@ -202,7 +202,7 @@ The second option, `Alternative Embedding`, activates a short of other alternati
|
|
202 |
|
203 |
In both cases, activating these will impact performance so should only be used if absolutely necessary.
|
204 |
|
205 |
-
[Read more details](http://www.artiss.co.uk/
|
206 |
|
207 |
== Further options ==
|
208 |
|
@@ -210,9 +210,11 @@ In both cases, activating these will impact performance so should only be used i
|
|
210 |
|
211 |
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.
|
212 |
|
213 |
-
Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt' )` to add a thumbnail to any part of your theme.
|
214 |
|
215 |
-
Like the video embed equivalent, the
|
|
|
|
|
216 |
|
217 |
The parameters are as follows...
|
218 |
|
@@ -234,6 +236,8 @@ e.g. `[youtube_thumb target="_blank" alt="Demo video"]id[/youtube_thumb]`
|
|
234 |
|
235 |
This overrides the `TARGET` and `ALT` elements of the thumbnail.
|
236 |
|
|
|
|
|
237 |
**Video name**
|
238 |
|
239 |
You can retrieve the name of a video via 1 of 2 methods.
|
@@ -310,6 +314,8 @@ For problems, suggestions or enhancements for this plugin, there is [a dedicated
|
|
310 |
|
311 |
== Reviews & Mentions ==
|
312 |
|
|
|
|
|
313 |
[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.
|
314 |
|
315 |
[Andesch tips on WordPress plugins!](http://andershagstrom.se/andesch-tipsar-om-wordpress-plugins/ "Andesch tipsar om WordPress-plugins!") - Anders.
|
@@ -339,7 +345,7 @@ Artiss YouTube Embed is now using the latest version of the YouTube Player, name
|
|
339 |
|
340 |
Equally, some options are not supported depending on whether you use the IFRAME or OBJECT embedding method.
|
341 |
|
342 |
-
[Read more about which options are supported](http://www.artiss.co.uk/
|
343 |
|
344 |
= How do I add a border to the video =
|
345 |
|
@@ -379,7 +385,7 @@ If you don't include Metadata then it will also validate as HTML5 compliant.
|
|
379 |
|
380 |
The [W3C Markup Validation Service](http://validator.w3.org/ "W3C Markup Validation Service") was used to test the above.
|
381 |
|
382 |
-
You can [read more about this here](http://www.artiss.co.uk/
|
383 |
|
384 |
= Which browsers does the output work on? =
|
385 |
|
@@ -415,6 +421,12 @@ Next to the option it will display how many videos have cache in the database. I
|
|
415 |
|
416 |
Please note - clearing the cache will not just remove any redundant cache as there is no way to identify what is required and what is not. It will therefore remove all cache related to YouTube Embed, therefore having a temporary performance impact on your site as displayed videos are generated and cached again.
|
417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
= Which version of PHP does this plugin work with? =
|
419 |
|
420 |
It has been syntax checked as PHP 4. However, this does not guarantee PHP 4 compatibility and the minimum for WordPress is now PHP 5.2.4.
|
@@ -432,6 +444,31 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
432 |
|
433 |
== Changelog ==
|
434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
= 2.5.6 =
|
436 |
* Maintenance: Restricted access to Options and Profiles screen to administrators
|
437 |
* Bug: Fixed bug which caused errors to be generated on new installations of plugin
|
@@ -627,6 +664,9 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
627 |
|
628 |
== Upgrade Notice ==
|
629 |
|
|
|
|
|
|
|
630 |
= 2.5.6 =
|
631 |
* Upgrade to fix critical bug for new installations
|
632 |
|
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.4.2
|
7 |
+
Stable tag: 2.6
|
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 |
|
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 |
* And much, much more!
|
30 |
|
31 |
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!
|
63 |
* **start** - a number of seconds from where to start the video playing
|
64 |
* **style** - apply CSS elements directly to the video output
|
65 |
* **template** - specify a template (see section on Templates for further details)
|
|
|
66 |
* **type** - which embedding type to use, this can be `embedplus`, `iframe`, `object` or `chromeless`
|
67 |
* **width** - the video width, in pixels
|
68 |
|
70 |
|
71 |
* **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.
|
72 |
* **color** - white or red, the colour of the progress bar (see the FAQ about having a white progress bar with the light theme)
|
73 |
+
* **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.
|
74 |
* **https** - yes or no, whether to use HTTPS for the video
|
75 |
* **info** - yes or no, show video information. If displaying a playlist this will show video thumbnails
|
76 |
* **loop** - yes or no, whether to start the video again once it ends
|
202 |
|
203 |
In both cases, activating these will impact performance so should only be used if absolutely necessary.
|
204 |
|
205 |
+
[Read more details](http://www.artiss.co.uk/youtube-embed/compatibility "Artiss YouTube Embed Compatibility") on which options to select for which plugin.
|
206 |
|
207 |
== Further options ==
|
208 |
|
210 |
|
211 |
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.
|
212 |
|
213 |
+
Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt', 'nolink' )` to add a thumbnail to any part of your theme.
|
214 |
|
215 |
+
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 outout the thumbnail without a link to the YouTube video, allowing you to add your own.
|
216 |
+
|
217 |
+
The parameters are different, however, but, again, are separated by ampersand.
|
218 |
|
219 |
The parameters are as follows...
|
220 |
|
236 |
|
237 |
This overrides the `TARGET` and `ALT` elements of the thumbnail.
|
238 |
|
239 |
+
You can also use `nolink` as a parameter with the shortcode, which works in the same way as with the function call.
|
240 |
+
|
241 |
**Video name**
|
242 |
|
243 |
You can retrieve the name of a video via 1 of 2 methods.
|
314 |
|
315 |
== Reviews & Mentions ==
|
316 |
|
317 |
+
[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.
|
318 |
+
|
319 |
[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.
|
320 |
|
321 |
[Andesch tips on WordPress plugins!](http://andershagstrom.se/andesch-tipsar-om-wordpress-plugins/ "Andesch tipsar om WordPress-plugins!") - Anders.
|
345 |
|
346 |
Equally, some options are not supported depending on whether you use the IFRAME or OBJECT embedding method.
|
347 |
|
348 |
+
[Read more about which options are supported](http://www.artiss.co.uk/youtube-embed/further-help#ye-api "API Support").
|
349 |
|
350 |
= How do I add a border to the video =
|
351 |
|
385 |
|
386 |
The [W3C Markup Validation Service](http://validator.w3.org/ "W3C Markup Validation Service") was used to test the above.
|
387 |
|
388 |
+
You can [read more about this here](http://www.artiss.co.uk/youtube-embed/further-help#ye-standards "Standards Compliance").
|
389 |
|
390 |
= Which browsers does the output work on? =
|
391 |
|
421 |
|
422 |
Please note - clearing the cache will not just remove any redundant cache as there is no way to identify what is required and what is not. It will therefore remove all cache related to YouTube Embed, therefore having a temporary performance impact on your site as displayed videos are generated and cached again.
|
423 |
|
424 |
+
= Is this plugin compatible with Turn Off The Lights? =
|
425 |
+
|
426 |
+
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.
|
427 |
+
|
428 |
+
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.
|
429 |
+
|
430 |
= Which version of PHP does this plugin work with? =
|
431 |
|
432 |
It has been syntax checked as PHP 4. However, this does not guarantee PHP 4 compatibility and the minimum for WordPress is now PHP 5.2.4.
|
444 |
|
445 |
== Changelog ==
|
446 |
|
447 |
+
= 2.6 =
|
448 |
+
* 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)
|
449 |
+
* Bug: Corrected URLs pointing to help screens at artiss.co.uk
|
450 |
+
* Bug: Resolved issue where translated IDs were not corrected if included in a URL (thanks to kchayka for reporting that)
|
451 |
+
* Bug: Fixed problem where video ID is not found in full URL if not specified first (thanks to christopherw for reporting that)
|
452 |
+
* Bug: Modest branding profile switch wasn't doing anything - the option was hard-coded on. Now corrected
|
453 |
+
* Bug: User defined error message now decodes correctly (thanks to kchayka for reporting that)
|
454 |
+
* Bug: No longer caches the video output if a random playlist has been selected
|
455 |
+
* Maintenance: Updated advertisement engine code
|
456 |
+
* Maintenance: Renamed README menu to Instructions
|
457 |
+
* Maintenance: Assorted on-screen wording improvements
|
458 |
+
* Maintenance: Removed title option as it's un-supported
|
459 |
+
* Maintenance: Updated the uninstall routine
|
460 |
+
* Maintenance: Cleaned code and updated translation files
|
461 |
+
* Enhancement: Added Do Not Track compatibility. Once active, if user has Do Not Track in use then cookies will not be stored
|
462 |
+
* Enhancement: New option to specify the shortcode that the editor button uses. A cookie is used to store this
|
463 |
+
* Enhancement: New option to switch on shortcodes in widgets. This will allow all shortcodes in widgets, though, not just those for this plugin
|
464 |
+
* Enhancement: Reviewed and updated access right to admin screen. Added option to choose what level has access to profiles and/or lists screen
|
465 |
+
* 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
|
466 |
+
* Enhancement: Added option to modify access to Profile and Lists screen
|
467 |
+
* Enhancement: Improved the cache clearing option and statistics
|
468 |
+
* Enhancement: Reflected on profile screen that modest branding now works with HTML5 player
|
469 |
+
* Enhancement: Added option to thumbnail output to suppress the link, so that you can add your own
|
470 |
+
* Enhancement: Updated "Controls" option to support new third parameter and update definitions. Ensured backwards compatibility with old parameter options
|
471 |
+
|
472 |
= 2.5.6 =
|
473 |
* Maintenance: Restricted access to Options and Profiles screen to administrators
|
474 |
* Bug: Fixed bug which caused errors to be generated on new installations of plugin
|
664 |
|
665 |
== Upgrade Notice ==
|
666 |
|
667 |
+
= 2.6 =
|
668 |
+
* Updgrade to implement numerous bug fixes and enhancements
|
669 |
+
|
670 |
= 2.5.6 =
|
671 |
* Upgrade to fix critical bug for new installations
|
672 |
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
screenshot-6.png
CHANGED
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,16 @@ 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 |
+
setcookie ( 'aye_mce_shortcode', '', time() - 3600, aye_get_cookie_path() );
|
58 |
?>
|
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,15 +31,25 @@ 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 |
if ( is_admin() ) {
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
|
44 |
include_once( $functions_dir . 'aye-admin-config.php' ); // Administration configuration
|
45 |
|
@@ -49,20 +59,9 @@ if ( is_admin() ) {
|
|
49 |
|
50 |
include_once( $functions_dir . 'aye-update-post-content.php' ); // Process post content
|
51 |
|
52 |
-
include_once( $functions_dir . 'aye-function-calls.php' ); // Function calls
|
53 |
-
|
54 |
-
include_once( $functions_dir . 'aye-generate-download-code.php' ); // Generate download URLs
|
55 |
-
|
56 |
-
include_once( $functions_dir . 'aye-generate-shorturl-code.php' ); // Generate short URLs
|
57 |
-
|
58 |
-
include_once( $functions_dir . 'aye-generate-thumbnail-code.php' ); // Generate thumbnail code
|
59 |
-
|
60 |
-
include_once( $functions_dir . 'aye-generate-transcript-code.php' ); // Generate transcripts
|
61 |
-
|
62 |
include_once( $functions_dir . 'aye-shortcodes.php' ); // Shortcodes
|
63 |
|
64 |
include_once( $functions_dir . 'aye-deprecated.php' ); // Deprecated options
|
65 |
-
|
66 |
}
|
67 |
|
68 |
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.6
|
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.6' );
|
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 |
|
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
|