YouTube Embed - Version 3.0

Version Description

  • Maintenance: Changed name, updated adverts, removed donation and sponsorship requests
  • Maintenance: Renamed function to match new name and also removed prefix from files, which were not required
  • Maintenance: Checked and updated all help URLs
  • Maintenance: Removed about and instruction pages which were felt were no longer needed
  • Maintenance: Updated icons
  • Enhancement: Updated download links to use code from Vixy. This is now switched on by default
  • Enhancement: Added option to provide an affiliate ID for use with the download bar - blog owners can make 30% from sales generated
  • Enhancement: Simplified the menu access rules which has resulted in resolving a number of existing issues
  • Bug: Fixed PHP error when allowing shortcodes in widgets
Download this release

Release Info

Developer Applian
Plugin Icon 128x128 YouTube Embed
Version 3.0
Comparing to
See all releases

Code changes from version 2.7 to 3.0

Files changed (52) hide show
  1. css/{aye-admin-3.1.css → admin-3.1.css} +0 -0
  2. css/{aye-admin-3.1.min.css → admin-3.1.min.css} +0 -0
  3. css/{aye-admin.css → admin.css} +0 -0
  4. css/{aye-admin.min.css → admin.min.css} +0 -0
  5. css/{aye-main.css → main.css} +0 -0
  6. css/{aye-main.min.css → main.min.css} +0 -0
  7. images/!original.png +0 -0
  8. images/Thumbs.db +0 -0
  9. images/admin_menu_icon.png +0 -0
  10. images/admin_screen_icon.png +0 -0
  11. images/menu_icon.png +0 -0
  12. images/screen_icon.png +0 -0
  13. images/youtube_button_b&w.png +0 -0
  14. images/youtube_button_colour.png +0 -0
  15. includes/{aye-add-mce-button.php → add-mce-button.php} +5 -5
  16. includes/{aye-add-scripts.php → add-scripts.php} +11 -11
  17. includes/{aye-add-to-admin-bar.php → add-to-admin-bar.php} +14 -14
  18. includes/admin-config.php +398 -0
  19. includes/artiss-plugin-ads.php +0 -172
  20. includes/aye-admin-config.php +0 -487
  21. includes/aye-display-about.php +0 -63
  22. includes/aye-display-instructions.php +0 -31
  23. includes/aye-function-calls.php +0 -229
  24. includes/aye-generate-download-code.php +0 -44
  25. includes/{aye-deprecated.php → deprecated.php} +4 -4
  26. includes/function-calls.php +229 -0
  27. includes/generate-download-code.php +57 -0
  28. includes/{aye-generate-embed-code.php → generate-embed-code.php} +33 -33
  29. includes/{aye-generate-shorturl-code.php → generate-shorturl-code.php} +10 -10
  30. includes/{aye-generate-thumbnail-code.php → generate-thumbnail-code.php} +9 -9
  31. includes/{aye-generate-transcript-code.php → generate-transcript-code.php} +15 -15
  32. includes/{aye-generate-widgets.php → generate-widgets.php} +3 -3
  33. includes/{aye-options-general.php → options-general.php} +34 -52
  34. includes/{aye-options-lists.php → options-lists.php} +12 -16
  35. includes/{aye-options-profiles.php → options-profiles.php} +20 -32
  36. includes/{aye-options-widgets.php → options-widgets.php} +2 -2
  37. includes/{aye-set-defaults.php → set-defaults.php} +9 -20
  38. includes/{aye-shared-functions.php → shared-functions.php} +28 -28
  39. includes/{aye-shortcodes.php → shortcodes.php} +51 -58
  40. includes/{aye-update-post-content.php → update-post-content.php} +24 -24
  41. js/{aye-mce-button.min.php → mce-button.min.php} +1 -1
  42. js/{aye-mce-button.php → mce-button.php} +1 -1
  43. languages/youtube-embed.mo +0 -0
  44. languages/youtube-embed.po +425 -525
  45. readme.txt +87 -38
  46. screenshot-1.png +0 -0
  47. screenshot-2.png +0 -0
  48. screenshot-3.png +0 -0
  49. screenshot-4.png +0 -0
  50. screenshot-6.png +0 -0
  51. uninstall.php +2 -2
  52. youtube-embed.php +21 -27
css/{aye-admin-3.1.css → admin-3.1.css} RENAMED
File without changes
css/{aye-admin-3.1.min.css → admin-3.1.min.css} RENAMED
File without changes
css/{aye-admin.css → admin.css} RENAMED
File without changes
css/{aye-admin.min.css → admin.min.css} RENAMED
File without changes
css/{aye-main.css → main.css} RENAMED
File without changes
css/{aye-main.min.css → main.min.css} RENAMED
File without changes
images/!original.png ADDED
Binary file
images/Thumbs.db CHANGED
Binary file
images/admin_menu_icon.png ADDED
Binary file
images/admin_screen_icon.png ADDED
Binary file
images/menu_icon.png DELETED
Binary file
images/screen_icon.png DELETED
Binary file
images/youtube_button_b&w.png CHANGED
Binary file
images/youtube_button_colour.png CHANGED
Binary file
includes/{aye-add-mce-button.php → add-mce-button.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Add extra button(s) to TinyMCE interface
6
  *
7
- * @package Artiss-YouTube-Embed
8
  */
9
 
10
  /**
@@ -12,7 +12,7 @@
12
  *
13
  * Add filters (assuming user is editing) for TinyMCE
14
  *
15
- * @uses aye_set_general_defaults Set default options
16
  *
17
  * @since 2.0
18
  */
@@ -23,12 +23,12 @@ function youtube_embed_button() {
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
 
@@ -67,7 +67,7 @@ function register_youtube_embed_button( $buttons ) {
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
  ?>
4
  *
5
  * Add extra button(s) to TinyMCE interface
6
  *
7
+ * @package YouTube-Embed
8
  */
9
 
10
  /**
12
  *
13
  * Add filters (assuming user is editing) for TinyMCE
14
  *
15
+ * @uses vye_set_general_defaults Set default options
16
  *
17
  * @since 2.0
18
  */
23
 
24
  if ( get_user_option( 'rich_editing' ) == 'true' ) {
25
 
26
+ $options = vye_set_general_defaults();
27
  if ( $options[ 'editor_button' ] != '' ) {
28
 
29
  // Ensure shortcode cookie is set
30
 
31
+ $editor_sc = vye_set_editor_sc();
32
 
33
  // Add filters
34
 
67
  */
68
 
69
  function add_youtube_embed_mce_plugin( $plugin_array ) {
70
+ $plugin_array[ 'YouTube' ] = plugins_url() . '/youtube-embed/js/mce-button.min.php';
71
  return $plugin_array;
72
  }
73
  ?>
includes/{aye-add-scripts.php → add-scripts.php} RENAMED
@@ -4,14 +4,14 @@
4
  *
5
  * Add JS and CSS to the main theme and to admin
6
  *
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
  /**
@@ -22,7 +22,7 @@ if ( !is_admin() ) {
22
  * @since 2.5.5
23
  */
24
 
25
- function aye_plugin_init() {
26
 
27
  $language_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages/';
28
 
@@ -30,7 +30,7 @@ function aye_plugin_init() {
30
 
31
  }
32
 
33
- add_action( 'init', 'aye_plugin_init' );
34
 
35
  /**
36
  * Add scripts to theme
@@ -40,15 +40,15 @@ add_action( 'init', 'aye_plugin_init' );
40
  * @since 2.4
41
  */
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
 
51
- add_action( 'wp_enqueue_scripts', 'aye_main_scripts' );
52
 
53
  /**
54
  * Add CSS to admin
@@ -58,14 +58,14 @@ add_action( 'wp_enqueue_scripts', 'aye_main_scripts' );
58
  * @since 2.0
59
  */
60
 
61
- function aye_admin_css() {
62
 
63
  global $wp_version;
64
  if ( ( float ) $wp_version >= 3.2 ) { $version = ''; } else { $version = '-3.1'; }
65
 
66
- wp_enqueue_style( 'tinymce_button', plugins_url() . '/youtube-embed/css/aye-admin' . $version . '.min.css' );
67
 
68
  }
69
 
70
- add_action( 'admin_print_styles', 'aye_admin_css' );
71
  ?>
4
  *
5
  * Add JS and CSS to the main theme and to admin
6
  *
7
+ * @package 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' ); }
15
  }
16
 
17
  /**
22
  * @since 2.5.5
23
  */
24
 
25
+ function vye_plugin_init() {
26
 
27
  $language_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages/';
28
 
30
 
31
  }
32
 
33
+ add_action( 'init', 'vye_plugin_init' );
34
 
35
  /**
36
  * Add scripts to theme
40
  * @since 2.4
41
  */
42
 
43
+ function vye_main_scripts() {
44
 
45
+ wp_register_style( 'vye_dynamic', plugins_url( '/youtube-embed/css/main.min.css' ) );
46
 
47
+ wp_enqueue_style( 'vye_dynamic' );
48
 
49
  }
50
 
51
+ add_action( 'wp_enqueue_scripts', 'vye_main_scripts' );
52
 
53
  /**
54
  * Add CSS to admin
58
  * @since 2.0
59
  */
60
 
61
+ function vye_admin_css() {
62
 
63
  global $wp_version;
64
  if ( ( float ) $wp_version >= 3.2 ) { $version = ''; } else { $version = '-3.1'; }
65
 
66
+ wp_enqueue_style( 'tinymce_button', plugins_url() . '/youtube-embed/css/admin' . $version . '.min.css' );
67
 
68
  }
69
 
70
+ add_action( 'admin_print_styles', 'vye_admin_css' );
71
  ?>
includes/{aye-add-to-admin-bar.php → add-to-admin-bar.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Set up Admin Bar links
6
  *
7
- * @package Artiss-YouTube-Embed
8
  */
9
 
10
  /**
@@ -14,18 +14,18 @@
14
  * if the user can edit plugins
15
  * With help from http://technerdia.com/1140_wordpress-admin-bar.html
16
  *
17
- * @uses aye_set_general_default Set default options
18
  *
19
  * @since 2.0
20
  */
21
 
22
- function aye_admin_bar_render_3_1() {
23
 
24
  global $wp_version;
25
 
26
  if ( current_user_can( 'delete_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
27
 
28
- $options = aye_set_general_defaults();
29
 
30
  if ( $options[ 'admin_bar' ] != '' ) {
31
 
@@ -34,13 +34,13 @@ function aye_admin_bar_render_3_1() {
34
  'parent' => 'appearance',
35
  'id' => 'aye-options',
36
  'title' => __( 'YouTube Embed', 'youtube-embed' ),
37
- 'href' => admin_url( 'admin.php?page=aye-profile-options' ),
38
  'meta' => false ) );
39
  }
40
  }
41
  }
42
 
43
- add_action( 'wp_before_admin_bar_render', 'aye_admin_bar_render_3_1' );
44
 
45
  /**
46
  * Add option to Admin Bar (WP 3.3+)
@@ -48,18 +48,18 @@ add_action( 'wp_before_admin_bar_render', 'aye_admin_bar_render_3_1' );
48
  * Add link to YouTube Embed profile options to Admin Bar.
49
  * With help from http://technerdia.com/1140_wordpress-admin-bar.html
50
  *
51
- * @uses aye_set_general_default Set default options
52
  *
53
  * @since 2.5
54
  */
55
 
56
- function aye_admin_bar_render_3_3( $meta = TRUE ) {
57
 
58
  global $wp_version;
59
 
60
  if ( ( float ) $wp_version >= 3.3 ) {
61
 
62
- $options = aye_set_general_defaults();
63
 
64
  $profile_access = $options[ 'profile_access' ];
65
  $list_access = $options[ 'list_access' ];
@@ -80,7 +80,7 @@ function aye_admin_bar_render_3_3( $meta = TRUE ) {
80
  'parent' => 'aye-menu',
81
  'id' => 'aye-readme',
82
  'title' => __( 'Instructions', 'youtube-embed' ),
83
- 'href' => admin_url( 'admin.php?page=aye-support-instructions' ),
84
  'meta' => array( 'target' => '_blank' ) ) );
85
  }
86
 
@@ -89,7 +89,7 @@ function aye_admin_bar_render_3_3( $meta = TRUE ) {
89
  'parent' => 'aye-menu',
90
  'id' => 'aye-options',
91
  'title' => __( 'Options', 'youtube-embed' ),
92
- 'href' => admin_url( 'admin.php?page=aye-general-options' ),
93
  'meta' => array( 'target' => '_blank' ) ) );
94
  }
95
 
@@ -98,7 +98,7 @@ function aye_admin_bar_render_3_3( $meta = TRUE ) {
98
  'parent' => 'aye-menu',
99
  'id' => 'aye-profile',
100
  'title' => __( 'Profiles', 'youtube-embed' ),
101
- 'href' => admin_url( 'admin.php?page=aye-profile-options' ),
102
  'meta' => array( 'target' => '_blank' ) ) );
103
  }
104
 
@@ -107,12 +107,12 @@ function aye_admin_bar_render_3_3( $meta = TRUE ) {
107
  'parent' => 'aye-menu',
108
  'id' => 'aye-lists',
109
  'title' => __( 'Lists', 'youtube-embed' ),
110
- 'href' => admin_url( 'admin.php?page=aye-list-options' ),
111
  'meta' => array( 'target' => '_blank' ) ) );
112
  }
113
  }
114
  }
115
  }
116
 
117
- add_action( 'admin_bar_menu', 'aye_admin_bar_render_3_3', 40 );
118
  ?>
4
  *
5
  * Set up Admin Bar links
6
  *
7
+ * @package YouTube-Embed
8
  */
9
 
10
  /**
14
  * if the user can edit plugins
15
  * With help from http://technerdia.com/1140_wordpress-admin-bar.html
16
  *
17
+ * @uses vye_set_general_default Set default options
18
  *
19
  * @since 2.0
20
  */
21
 
22
+ function vye_admin_bar_render_3_1() {
23
 
24
  global $wp_version;
25
 
26
  if ( current_user_can( 'delete_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
27
 
28
+ $options = vye_set_general_defaults();
29
 
30
  if ( $options[ 'admin_bar' ] != '' ) {
31
 
34
  'parent' => 'appearance',
35
  'id' => 'aye-options',
36
  'title' => __( 'YouTube Embed', 'youtube-embed' ),
37
+ 'href' => admin_url( 'admin.php?page=profile-options' ),
38
  'meta' => false ) );
39
  }
40
  }
41
  }
42
 
43
+ add_action( 'wp_before_admin_bar_render', 'vye_admin_bar_render_3_1' );
44
 
45
  /**
46
  * Add option to Admin Bar (WP 3.3+)
48
  * Add link to YouTube Embed profile options to Admin Bar.
49
  * With help from http://technerdia.com/1140_wordpress-admin-bar.html
50
  *
51
+ * @uses vye_set_general_default Set default options
52
  *
53
  * @since 2.5
54
  */
55
 
56
+ function vye_admin_bar_render_3_3( $meta = TRUE ) {
57
 
58
  global $wp_version;
59
 
60
  if ( ( float ) $wp_version >= 3.3 ) {
61
 
62
+ $options = vye_set_general_defaults();
63
 
64
  $profile_access = $options[ 'profile_access' ];
65
  $list_access = $options[ 'list_access' ];
80
  'parent' => 'aye-menu',
81
  'id' => 'aye-readme',
82
  'title' => __( 'Instructions', 'youtube-embed' ),
83
+ 'href' => admin_url( 'admin.php?page=support-instructions' ),
84
  'meta' => array( 'target' => '_blank' ) ) );
85
  }
86
 
89
  'parent' => 'aye-menu',
90
  'id' => 'aye-options',
91
  'title' => __( 'Options', 'youtube-embed' ),
92
+ 'href' => admin_url( 'admin.php?page=general-options' ),
93
  'meta' => array( 'target' => '_blank' ) ) );
94
  }
95
 
98
  'parent' => 'aye-menu',
99
  'id' => 'aye-profile',
100
  'title' => __( 'Profiles', 'youtube-embed' ),
101
+ 'href' => admin_url( 'admin.php?page=profile-options' ),
102
  'meta' => array( 'target' => '_blank' ) ) );
103
  }
104
 
107
  'parent' => 'aye-menu',
108
  'id' => 'aye-lists',
109
  'title' => __( 'Lists', 'youtube-embed' ),
110
+ 'href' => admin_url( 'admin.php?page=list-options' ),
111
  'meta' => array( 'target' => '_blank' ) ) );
112
  }
113
  }
114
  }
115
  }
116
 
117
+ add_action( 'admin_bar_menu', 'vye_admin_bar_render_3_3', 40 );
118
  ?>
includes/admin-config.php ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin Config Functions
4
+ *
5
+ * Various functions relating to the various administration screens
6
+ *
7
+ * @package YouTube-Embed
8
+ */
9
+
10
+ /**
11
+ * Add Settings link to plugin list
12
+ *
13
+ * Add a Settings link to the options listed against this plugin
14
+ *
15
+ * @since 2.0
16
+ *
17
+ * @param string $links Current links
18
+ * @param string $file File in use
19
+ * @return string Links, now with settings added
20
+ */
21
+
22
+ function vye_add_settings_link( $links, $file ) {
23
+
24
+ static $this_plugin;
25
+
26
+ if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); }
27
+
28
+ if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
29
+ $settings_link = '<a href="admin.php?page=general-options">' . __( 'Settings', 'youtube-embed' ) . '</a>';
30
+ array_unshift( $links, $settings_link );
31
+ }
32
+
33
+ return $links;
34
+ }
35
+
36
+ add_filter( 'plugin_action_links', 'vye_add_settings_link', 10, 2 );
37
+
38
+ /**
39
+ * Add meta to plugin details
40
+ *
41
+ * Add options to plugin meta line
42
+ *
43
+ * @since 2.0
44
+ *
45
+ * @param string $links Current links
46
+ * @param string $file File in use
47
+ * @return string Links, now with settings added
48
+ */
49
+
50
+ function vye_set_plugin_meta( $links, $file ) {
51
+
52
+ if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
53
+
54
+ $links = array_merge( $links, array( '<a href="http://wordpress.org/support/plugin/youtube-embed">' . __( 'Support', 'youtube-embed' ) . '</a>' ) );
55
+
56
+ }
57
+
58
+ return $links;
59
+ }
60
+
61
+ add_filter( 'plugin_row_meta', 'vye_set_plugin_meta', 10, 2 );
62
+
63
+ /**
64
+ * Admin Screen Initialisation
65
+ *
66
+ * Set up admin menu and submenu options
67
+ *
68
+ * @since 2.0
69
+ *
70
+ * @uses vye_contextual_help_type Work out help type
71
+ */
72
+
73
+ function vye_menu_initialise() {
74
+
75
+ // Get level access for menus
76
+
77
+ $options = vye_set_general_defaults();
78
+
79
+ $menu_access = $options[ 'menu_access' ];
80
+
81
+ // Depending on WordPress version and available functions decide which (if any) contextual help system to use
82
+
83
+ $contextual_help = vye_contextual_help_type();
84
+
85
+ // Add main admin option
86
+
87
+ add_menu_page( __( 'About Vixy YouTube Embed', 'youtube-embed' ), __( 'YouTube', 'youtube-embed' ), $menu_access, 'general-options', 'vye_general_options', plugins_url() . '/youtube-embed/images/admin_menu_icon.png' );
88
+
89
+ // Add options sub-menu
90
+
91
+ if ( $contextual_help == 'new' ) { global $vye_options_hook; }
92
+
93
+ $vye_options_hook = add_submenu_page( 'general-options', __( 'Vixy YouTube Embed Options', 'youtube-embed' ), __( 'Options', 'youtube-embed' ), $menu_access, 'general-options', 'vye_general_options' );
94
+
95
+ if ( $contextual_help == 'new' ) { add_action( 'load-' . $vye_options_hook, 'vye_add_options_help' ); }
96
+
97
+ if ( $contextual_help == 'old' ) { add_contextual_help( $vye_options_hook, vye_options_help() ); }
98
+
99
+ // Add profiles sub-menu
100
+
101
+ if ( $contextual_help == 'new' ) { global $vye_profiles_hook; }
102
+
103
+ $vye_profiles_hook = add_submenu_page( 'general-options', __( 'Vixy YouTube Embed Profiles', 'youtube-embed' ), __( 'Profiles', 'youtube-embed' ), $menu_access, 'profile-options', 'vye_profile_options' );
104
+
105
+ if ( $contextual_help == 'new' ) { add_action( 'load-' . $vye_profiles_hook, 'vye_add_profiles_help' ); }
106
+
107
+ if ( $contextual_help == 'old' ) { add_contextual_help( $vye_profiles_hook, vye_profiles_help() ); }
108
+
109
+ // Add lists sub-menu
110
+
111
+ if ( $contextual_help == 'new' ) { global $vye_lists_hook; }
112
+
113
+ $vye_lists_hook = add_submenu_page( 'general-options', __( 'Vixy YouTube Embed Lists', 'youtube-embed' ), __( 'Lists', 'youtube-embed' ), $menu_access, 'list-options', 'vye_list_options' );
114
+
115
+ if ( $contextual_help == 'new' ) { add_action( 'load-' . $vye_lists_hook, 'vye_add_lists_help' ); }
116
+
117
+ if ( $contextual_help == 'old' ) { add_contextual_help( $vye_lists_hook, vye_lists_help() ); }
118
+
119
+ }
120
+
121
+ add_action( 'admin_menu', 'vye_menu_initialise' );
122
+
123
+ /**
124
+ * Get contextual help type
125
+ *
126
+ * Return whether this WP installation requires the new or old contextual help type, or none at all
127
+ *
128
+ * @since 2.5
129
+ *
130
+ * @return string Contextual help type - 'new', 'old' or false
131
+ */
132
+
133
+ function vye_contextual_help_type() {
134
+
135
+ global $wp_version;
136
+
137
+ $type = false;
138
+
139
+ if ( ( float ) $wp_version >= 3.3 ) {
140
+ $type = 'new';
141
+ } else {
142
+ if ( function_exists( 'add_contextual_help' ) ) {
143
+ $type = 'old';
144
+ }
145
+ }
146
+
147
+ return $type;
148
+ }
149
+
150
+ /**
151
+ * Include general options screen
152
+ *
153
+ * XHTML options screen to prompt and update some general plugin options
154
+ *
155
+ * @since 2.0
156
+ */
157
+
158
+ function vye_general_options() {
159
+
160
+ include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/options-general.php' );
161
+
162
+ }
163
+
164
+ /**
165
+ * Include profile options screen
166
+ *
167
+ * XHTML options screen to prompt and update profile options
168
+ *
169
+ * @since 2.0
170
+ */
171
+
172
+ function vye_profile_options() {
173
+
174
+ include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/options-profiles.php' );
175
+
176
+ }
177
+
178
+ /**
179
+ * Include list options screen
180
+ *
181
+ * XHTML options screen to prompt and update list options
182
+ *
183
+ * @since 2.0
184
+ */
185
+
186
+ function vye_list_options() {
187
+
188
+ include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/options-lists.php' );
189
+
190
+ }
191
+
192
+ /**
193
+ * Add Options Help
194
+ *
195
+ * Add help tab to options screen
196
+ *
197
+ * @since 2.5
198
+ *
199
+ * @uses vye_options_help Return help text
200
+ */
201
+
202
+ function vye_add_options_help() {
203
+
204
+ global $vye_options_hook;
205
+ $screen = get_current_screen();
206
+
207
+ if ( $screen->id != $vye_options_hook ) { return; }
208
+
209
+ $screen -> add_help_tab( array( 'id' => 'options-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => vye_options_help() ) );
210
+ }
211
+
212
+ /**
213
+ * Options Help
214
+ *
215
+ * Return help text for options screen
216
+ *
217
+ * @since 2.5
218
+ *
219
+ * @return string Help Text
220
+ */
221
+
222
+ function vye_options_help() {
223
+
224
+ $help_text = '<p>' . __( 'This screen allows you to select non-specific options for the Vixy YouTube Embed plugin. For the default embedding settings, please select the <a href="admin.php?page=profile-options">Profiles</a> administration option.', 'youtube-embed' ) . '</p>';
225
+ $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>';
226
+ $help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
227
+ $help_text .= '<p><a href="http://wordpress.org/extend/plugins/youtube-embed/">' . __( 'Vixy YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
228
+ $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
229
+
230
+ return $help_text;
231
+ }
232
+
233
+ /**
234
+ * Add Profiles Help
235
+ *
236
+ * Add help tab to profiles screen
237
+ *
238
+ * @since 2.5
239
+ *
240
+ * @uses vye_profiles_help Return help text
241
+ */
242
+
243
+ function vye_add_profiles_help() {
244
+
245
+ global $vye_profiles_hook;
246
+ $screen = get_current_screen();
247
+
248
+ if ( $screen->id != $vye_profiles_hook ) { return; }
249
+
250
+ $screen -> add_help_tab( array( 'id' => 'profiles-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => vye_profiles_help() ) );
251
+ }
252
+
253
+ /**
254
+ * Profiles Help
255
+ *
256
+ * Return help text for profiles screen
257
+ *
258
+ * @since 2.5
259
+ *
260
+ * @return string Help Text
261
+ */
262
+
263
+ function vye_profiles_help() {
264
+
265
+ $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>';
266
+ $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>';
267
+ $help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
268
+ $help_text .= '<p><a href="http://wordpress.org/extend/plugins/youtube-embed/">' . __( 'Vixy YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
269
+ $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
270
+ $help_text .= '<p><a href="http://embedplus.com/">' . __( 'EmbedPlus website', 'youtube-embed' ) . '</a></p>';
271
+
272
+ return $help_text;
273
+ }
274
+
275
+ /**
276
+ * Add Lists Help
277
+ *
278
+ * Add help tab to lists screen
279
+ *
280
+ * @since 2.5
281
+ *
282
+ * @uses vye_lists_help Return help text
283
+ */
284
+
285
+ function vye_add_lists_help() {
286
+
287
+ global $vye_lists_hook;
288
+ $screen = get_current_screen();
289
+
290
+ if ( $screen->id != $vye_lists_hook ) { return; }
291
+
292
+ $screen -> add_help_tab( array( 'id' => 'lists-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => vye_lists_help() ) );
293
+ }
294
+
295
+ /**
296
+ * List Help
297
+ *
298
+ * Return help text for lists screen
299
+ *
300
+ * @since 2.5
301
+ *
302
+ * @return string Help Text
303
+ */
304
+
305
+ function vye_lists_help() {
306
+
307
+ $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>';
308
+ $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>';
309
+ $help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
310
+ $help_text .= '<p><a href="http://wordpress.org/extend/plugins/youtube-embed/">' . __( 'Vixy YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
311
+ $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
312
+
313
+ return $help_text;
314
+ }
315
+
316
+ /**
317
+ * Detect plugin activation
318
+ *
319
+ * Upon detection of activation set an option
320
+ *
321
+ * @since 2.4
322
+ */
323
+
324
+ function vye_plugin_activate() {
325
+
326
+ update_option( 'youtube_embed_activated', true );
327
+
328
+ }
329
+
330
+ register_activation_hook( WP_PLUGIN_DIR . "/youtube-embed/youtube-embed.php", 'vye_plugin_activate' );
331
+
332
+ // If plugin activated, run activation commands and delete option
333
+
334
+ global $wp_version;
335
+
336
+ if ( get_option( 'youtube_embed_activated' ) && ( ( float ) $wp_version >= 3.3 ) ) {
337
+
338
+ add_action( 'admin_enqueue_scripts', 'vye_admin_enqueue_scripts' );
339
+
340
+ delete_option( 'youtube_embed_activated' );
341
+ }
342
+
343
+ /**
344
+ * Enqueue Feature Pointer files
345
+ *
346
+ * Add the required feature pointer files
347
+ *
348
+ * @since 2.4
349
+ */
350
+
351
+ function vye_admin_enqueue_scripts() {
352
+
353
+ wp_enqueue_style( 'wp-pointer' );
354
+ wp_enqueue_script( 'wp-pointer' );
355
+
356
+ add_action( 'admin_print_footer_scripts', 'vye_admin_print_footer_scripts' );
357
+ }
358
+
359
+ /**
360
+ * Show Feature Pointer
361
+ *
362
+ * Display feature pointer
363
+ *
364
+ * @since 2.4
365
+ */
366
+
367
+ function vye_admin_print_footer_scripts() {
368
+
369
+ $pointer_content = '<h3>' . __( 'Welcome to Vixy YouTube Embed', 'youtube-embed' ) . '</h3>';
370
+ $pointer_content .= '<p style="font-style:italic;">' . __( 'Thank you for installing this plugin.', 'youtube-embed' ) . '</p>';
371
+ $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>';
372
+ $pointer_content .= '<p>' . __( 'Even if you do nothing else, please visit the Profiles option to check your default video values.', 'youtube-embed' ) . '</p>';
373
+ ?>
374
+ <script>
375
+ jQuery(function () {
376
+ var body = jQuery(document.body),
377
+ menu = jQuery('#toplevel_page_support-about'),
378
+ collapse = jQuery('#collapse-menu'),
379
+ yembed = menu.find("a[href='admin.php?page=profile-options']"),
380
+ options = {
381
+ content: '<?php echo $pointer_content; ?>',
382
+ position: {
383
+ edge: 'left',
384
+ align: 'center',
385
+ of: menu.is('.wp-menu-open') && !menu.is('.folded *') ? yembed : menu
386
+ },
387
+ close: function() {
388
+ }};
389
+
390
+ if ( !yembed.length )
391
+ return;
392
+
393
+ body.pointer(options).pointer('open');
394
+ });
395
+ </script>
396
+ <?php
397
+ }
398
+ ?>
includes/artiss-plugin-ads.php DELETED
@@ -1,172 +0,0 @@
1
- <?php
2
- /**
3
- * Artiss Plugin Ads (1.3)
4
- *
5
- * Generate an advert - intended for use within Artiss plugin administration screens/
6
- * All output is responsive and is image based.
7
- * No data is sent back to an external website (unless links are clicked on).
8
- *
9
- */
10
-
11
- /**
12
- * Generate Ad Code
13
- *
14
- * Combine 2 ads and add additional information
15
- *
16
- * @param string trans Translation name
17
- * @param string width Width of output
18
- * @uses artiss_fetch_ad_code Get a random advert
19
- */
20
-
21
- function artiss_plugin_ads( $trans, $width = 750 ) {
22
-
23
- $advertisers = 5;
24
-
25
- // Get first advert
26
-
27
- $ad_array = artiss_fetch_ad_code( rand( 1, $advertisers ) );
28
- $code1 = $ad_array[ 'code' ];
29
-
30
- // Now choose another advertiser
31
-
32
- $next_ad = $ad_array[ 'ad' ] + 1;
33
- if ( $next_ad > $advertisers ) { $next_ad = 1; }
34
-
35
- // Get a second advert
36
-
37
- $ad_array = artiss_fetch_ad_code( $next_ad );
38
- $code2 = $ad_array[ 'code' ];
39
-
40
- // Generate the advert code
41
-
42
- $newline = "\n";
43
-
44
- $code = '<p><div style="width: ' . $width . 'px; height: 125px; border: 1px solid #ddd; padding: 10px;">' . $newline;
45
- $code .= $code1 . $newline . $code2 . $newline;
46
- $code .= '<span style="font-weight: bold">' . __( 'Donate', $trans ) . '</span>' . $newline;
47
- $code .= '<br/>' . __( 'If you like this plugin and appreciate the effort being put into it, <a href="http://www.artiss.co.uk/donate">please consider donating</a>.', $trans ) . '<br/>' . $newline;
48
- $code .= '<br/><span style="font-weight: bold">' . __( 'Follow Me', $trans ) . '</span>' . $newline;
49
- $code .= '<br/>' . __( 'Please stay in touch with the latest news via one of the following social streams...', $trans ) . '<br/>' . $newline;
50
- $code .= '<div align="center" style="padding-top: 10px;">' . $newline;
51
- $code .= '<a href="http://www.twitter.com/artiss_tech"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/Twitter.png" alt="' . __( 'Follow Artiss.co.uk on Twitter', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on Twitter', $trans ) . '" style="margin-right: 20px;"></a>' . $newline;
52
- $code .= '<a href="http://www.facebook.com/artiss.co.uk"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/Facebook.png" alt="' . __( 'Follow Artiss.co.uk on Facebook', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on Facebook', $trans ) . '" style="margin-right: 20px;"></a>' . $newline;
53
- $code .= '<a href="https://plus.google.com/108446415028687420620?rel=author"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/Google%2B.png" alt="' . __( 'Follow Artiss.co.uk on Google+', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on Google+', $trans ) . '" style="margin-right: 20px;"></a>' . $newline;
54
- $code .= '<a href="http://www.artiss.co.uk/feed"><img src="https://dl.dropbox.com/u/61522/Artiss.co.uk/Plugins/ads/RSS.png" alt="' . __( 'Follow Artiss.co.uk on RSS feed', $trans ) . '" title="' . __( 'Follow Artiss.co.uk on RSS feed', $trans ) . '"></a>' . $newline;
55
- $code .= '</div></div></p>' . $newline;
56
-
57
- echo $code;
58
- return;
59
- }
60
-
61
- /**
62
- * Get a random advert
63
- *
64
- * Picks a random advert and generated the code for it
65
- *
66
- * @return array Code and advert numbers
67
- */
68
-
69
- function artiss_fetch_ad_code( $ad_number ) {
70
-
71
- $sub_ad = '';
72
-
73
- // iThemes
74
-
75
- if ( $ad_number == 1 ) {
76
-
77
- $sub_ad = rand( 1, 9 );
78
-
79
- if ( $sub_ad == 1 ) { $ad_code = '<a rel="nofollow" href="http://ithemes.com/member/go.php?r=32106&i=b0"><img src="http://ithemes.com/wp-content/uploads/2008/02/ithemes125ad.gif" border=0 alt="WordPress Themes" width=125 height=125></a>'; }
80
-
81
- if ( $sub_ad == 2 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b1"><img src="http://ithemes.com/wp-content/uploads/2008/11/ithemes-ad1.jpg" border=0 alt="WordPress Themes" width=125 height=125></a>'; }
82
-
83
- if ( $sub_ad == 3 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b2"><img src="http://ithemes.com/wp-content/uploads/2009/02/flexx125x125.jpg" border=0 alt="Flexx WP Blog Theme" width=125 height=125></a>'; }
84
-
85
- if ( $sub_ad == 4 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b5"><img src="http://ithemes.com/graphics/allaccessad1.jpg" border=0 alt="All Access Pass - 30+ WP Themes" width=125 height=125></a>'; }
86
-
87
- if ( $sub_ad == 5 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b15"><img src="http://ithemes.com/graphics/backupbuddy-125.gif" border=0 alt="Backup WordPress Easily" width=125 height=125></a>'; }
88
-
89
- if ( $sub_ad == 6 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b17"><img src="http://ithemes.com/graphics/pluginbuddy_ads/pb-mobile-static.png" border=0 alt="PluginBuddy Mobile" width=125 height=125></a>'; }
90
-
91
- if ( $sub_ad == 7 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b23"><img src="http://ithemes.com/graphics/builder-ads/builderforum125.png" border=0 alt="iThemes Builder" width=125 height=125></a>'; }
92
-
93
- if ( $sub_ad == 8 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b25"><img src="http://ithemes.com/graphics/pluginbuddy_ads/ebuddy-125.png" border=0 alt="EmailBuddy" width=125 height=125></a>'; }
94
-
95
- if ( $sub_ad == 9 ) { $ad_code = '<a href="http://ithemes.com/member/go.php?r=32106&i=b27"><img src="http://affiliates.ithemes.com/files/2010/11/fxEa.loopbuddy125.png" border=0 alt="LoopBuddy from PluginBuddy.com" width=125 height=125></a>'; }
96
-
97
- }
98
-
99
- // Tribulant
100
-
101
- if ( $ad_number == 2 ) {
102
-
103
- $sub_ad = rand( 1, 7 );
104
-
105
- if ( $sub_ad == 1 ) { $ad_code = '<a href="http://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin?a_aid=artisscouk&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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-admin-config.php DELETED
@@ -1,487 +0,0 @@
1
- <?php
2
- /**
3
- * Admin Config Functions
4
- *
5
- * Various functions relating to the various administration screens
6
- *
7
- * @package Artiss-YouTube-Embed
8
- */
9
-
10
- /**
11
- * Add Settings link to plugin list
12
- *
13
- * Add a Settings link to the options listed against this plugin
14
- *
15
- * @since 2.0
16
- *
17
- * @param string $links Current links
18
- * @param string $file File in use
19
- * @return string Links, now with settings added
20
- */
21
-
22
- function aye_add_settings_link( $links, $file ) {
23
-
24
- static $this_plugin;
25
-
26
- if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); }
27
-
28
- if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
29
- $settings_link = '<a href="admin.php?page=aye-general-options">' . __( 'Settings', 'youtube-embed' ) . '</a>';
30
- array_unshift( $links, $settings_link );
31
- }
32
-
33
- return $links;
34
- }
35
-
36
- add_filter( 'plugin_action_links', 'aye_add_settings_link', 10, 2 );
37
-
38
- /**
39
- * Add meta to plugin details
40
- *
41
- * Add options to plugin meta line
42
- *
43
- * @since 2.0
44
- *
45
- * @param string $links Current links
46
- * @param string $file File in use
47
- * @return string Links, now with settings added
48
- */
49
-
50
- function aye_set_plugin_meta( $links, $file ) {
51
-
52
- if ( strpos( $file, 'youtube-embed.php' ) !== false ) {
53
-
54
- $links = array_merge( $links, array( '<a href="admin.php?page=aye-display-about">' . __( 'Support', 'youtube-embed' ) . '</a>' ) );
55
-
56
- $links = array_merge( $links, array( '<a href="http://www.artiss.co.uk/donate">' . __( 'Donate', 'youtube-embed' ) . '</a>' ) );
57
- }
58
-
59
- return $links;
60
- }
61
-
62
- add_filter( 'plugin_row_meta', 'aye_set_plugin_meta', 10, 2 );
63
-
64
- /**
65
- * Admin Screen Initialisation
66
- *
67
- * Set up admin menu and submenu options
68
- *
69
- * @since 2.0
70
- *
71
- * @uses aye_contextual_help_type Work out help type
72
- */
73
-
74
- function aye_menu_initialise() {
75
-
76
- // Get level access for profile and list screens.
77
-
78
- $options = aye_set_general_defaults();
79
- $profile_access = $options[ 'profile_access' ];
80
- $list_access = $options[ 'list_access' ];
81
-
82
- // Depending on WordPress version and available functions decide which (if any) contextual help system to use
83
-
84
- $contextual_help = aye_contextual_help_type();
85
-
86
- // Add main admin option
87
-
88
- add_menu_page( __( 'About Artiss YouTube Embeds', 'youtube-embed' ), __( 'YouTube', 'youtube-embed' ), 'edit_posts', 'aye-support-about', 'aye_support_about', plugins_url() . '/youtube-embed/images/menu_icon.png' );
89
-
90
- // Add about sub-menu
91
-
92
- if ( $contextual_help == 'new' ) { global $aye_about_hook; }
93
-
94
- $aye_about_hook = add_submenu_page( 'aye-support-about', __( 'About Artiss YouTube Embed', 'youtube-embed' ), __( 'About', 'youtube-embed' ), 'edit_posts', 'aye-support-about', 'aye_support_about' );
95
-
96
- if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_about_hook, 'aye_add_about_help' ); }
97
-
98
- if ( $contextual_help == 'old' ) { add_contextual_help( $aye_about_hook, aye_about_help() ); }
99
-
100
- // Add instructions sub-menu
101
-
102
- if ( function_exists( 'wp_readme_parser' ) ) {
103
- add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Instructions', 'youtube-embed' ), __( 'Instructions', 'youtube-embed' ), 'edit_posts', 'aye-support-instructions', 'aye_support_instructions' );
104
- }
105
-
106
- // Add options sub-menu
107
-
108
- if ( $contextual_help == 'new' ) { global $aye_options_hook; }
109
-
110
- $aye_options_hook = add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Options', 'youtube-embed' ), __( 'Options', 'youtube-embed' ), 'delete_plugins', 'aye-general-options', 'aye_general_options' );
111
-
112
- if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_options_hook, 'aye_add_options_help' ); }
113
-
114
- if ( $contextual_help == 'old' ) { add_contextual_help( $aye_options_hook, aye_options_help() ); }
115
-
116
- // Add profiles sub-menu
117
-
118
- if ( $contextual_help == 'new' ) { global $aye_profiles_hook; }
119
-
120
- $aye_profiles_hook = add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Profiles', 'youtube-embed' ), __( 'Profiles', 'youtube-embed' ), $profile_access, 'aye-profile-options', 'aye_profile_options' );
121
-
122
- if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_profiles_hook, 'aye_add_profiles_help' ); }
123
-
124
- if ( $contextual_help == 'old' ) { add_contextual_help( $aye_profiles_hook, aye_profiles_help() ); }
125
-
126
- // Add lists sub-menu
127
-
128
- if ( $contextual_help == 'new' ) { global $aye_lists_hook; }
129
-
130
- $aye_lists_hook = add_submenu_page( 'aye-support-about', __( 'Artiss YouTube Embed Lists', 'youtube-embed' ), __( 'Lists', 'youtube-embed' ), $list_access, 'aye-list-options', 'aye_list_options' );
131
-
132
- if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_lists_hook, 'aye_add_lists_help' ); }
133
-
134
- if ( $contextual_help == 'old' ) { add_contextual_help( $aye_lists_hook, aye_lists_help() ); }
135
-
136
- }
137
-
138
- add_action( 'admin_menu', 'aye_menu_initialise' );
139
-
140
- /**
141
- * Get contextual help type
142
- *
143
- * Return whether this WP installation requires the new or old contextual help type, or none at all
144
- *
145
- * @since 2.5
146
- *
147
- * @return string Contextual help type - 'new', 'old' or false
148
- */
149
-
150
- function aye_contextual_help_type() {
151
-
152
- global $wp_version;
153
-
154
- $type = false;
155
-
156
- if ( ( float ) $wp_version >= 3.3 ) {
157
- $type = 'new';
158
- } else {
159
- if ( function_exists( 'add_contextual_help' ) ) {
160
- $type = 'old';
161
- }
162
- }
163
-
164
- return $type;
165
- }
166
-
167
- /**
168
- * Include general options screen
169
- *
170
- * XHTML options screen to prompt and update some general plugin options
171
- *
172
- * @since 2.0
173
- */
174
-
175
- function aye_general_options() {
176
-
177
- include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-options-general.php' );
178
-
179
- }
180
-
181
- /**
182
- * Include profile options screen
183
- *
184
- * XHTML options screen to prompt and update profile options
185
- *
186
- * @since 2.0
187
- */
188
-
189
- function aye_profile_options() {
190
-
191
- include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-options-profiles.php' );
192
-
193
- }
194
-
195
- /**
196
- * Include list options screen
197
- *
198
- * XHTML options screen to prompt and update list options
199
- *
200
- * @since 2.0
201
- */
202
-
203
- function aye_list_options() {
204
-
205
- include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-options-lists.php' );
206
-
207
- }
208
-
209
- /**
210
- * Include instructions screen
211
- *
212
- * Display the instructions
213
- *
214
- * @since 2.4
215
- */
216
-
217
- function aye_support_instructions() {
218
-
219
- include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-display-instructions.php' );
220
-
221
- }
222
-
223
- /**
224
- * Include about and support screen
225
- *
226
- * XHTML about screen which will, optionally, display help details as well
227
- *
228
- * @since 2.0
229
- */
230
-
231
- function aye_support_about() {
232
-
233
- include_once( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-display-about.php' );
234
-
235
- }
236
-
237
- /**
238
- * Add Options Help
239
- *
240
- * Add help tab to options screen
241
- *
242
- * @since 2.5
243
- *
244
- * @uses aye_options_help Return help text
245
- */
246
-
247
- function aye_add_options_help() {
248
-
249
- global $aye_options_hook;
250
- $screen = get_current_screen();
251
-
252
- if ( $screen->id != $aye_options_hook ) { return; }
253
-
254
- $screen -> add_help_tab( array( 'id' => 'aye-options-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_options_help() ) );
255
- }
256
-
257
- /**
258
- * Options Help
259
- *
260
- * Return help text for options screen
261
- *
262
- * @since 2.5
263
- *
264
- * @return string Help Text
265
- */
266
-
267
- function aye_options_help() {
268
-
269
- $help_text = '<p>' . __( 'This screen allows you to select non-specific options for the Artiss YouTube Embed plugin. For the default embedding settings, please select the <a href="admin.php?page=aye-profile-options">Profiles</a> administration option.', 'youtube-embed' ) . '</p>';
270
- $help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.', 'youtube-embed' ) . '</p>';
271
- $help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
272
- $help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
273
- $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
274
- $help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
275
-
276
- return $help_text;
277
- }
278
-
279
- /**
280
- * Add Profiles Help
281
- *
282
- * Add help tab to profiles screen
283
- *
284
- * @since 2.5
285
- *
286
- * @uses aye_profiles_help Return help text
287
- */
288
-
289
- function aye_add_profiles_help() {
290
-
291
- global $aye_profiles_hook;
292
- $screen = get_current_screen();
293
-
294
- if ( $screen->id != $aye_profiles_hook ) { return; }
295
-
296
- $screen -> add_help_tab( array( 'id' => 'aye-profiles-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_profiles_help() ) );
297
- }
298
-
299
- /**
300
- * Profiles Help
301
- *
302
- * Return help text for profiles screen
303
- *
304
- * @since 2.5
305
- *
306
- * @return string Help Text
307
- */
308
-
309
- function aye_profiles_help() {
310
-
311
- $help_text = '<p>' . __( 'This screen allows you to set the options for the default and additional profiles. If you don\'t specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required.', 'youtube-embed' ) . '</p>';
312
- $help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.', 'youtube-embed' ) . '</p>';
313
- $help_text .= '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
314
- $help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
315
- $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
316
- $help_text .= '<p><a href="http://embedplus.com/">' . __( 'EmbedPlus website', 'youtube-embed' ) . '</a></p>';
317
- $help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
318
-
319
- return $help_text;
320
- }
321
-
322
- /**
323
- * Add Lists Help
324
- *
325
- * Add help tab to lists screen
326
- *
327
- * @since 2.5
328
- *
329
- * @uses aye_lists_help Return help text
330
- */
331
-
332
- function aye_add_lists_help() {
333
-
334
- global $aye_lists_hook;
335
- $screen = get_current_screen();
336
-
337
- if ( $screen->id != $aye_lists_hook ) { return; }
338
-
339
- $screen -> add_help_tab( array( 'id' => 'aye-lists-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_lists_help() ) );
340
- }
341
-
342
- /**
343
- * List Help
344
- *
345
- * Return help text for lists screen
346
- *
347
- * @since 2.5
348
- *
349
- * @return string Help Text
350
- */
351
-
352
- function aye_lists_help() {
353
-
354
- $help_text = '<p>' . __( 'This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID.', 'youtube-embed' ) . '</p>';
355
- $help_text .= '<p>' . __( 'Remember to click the Save Settings button at the bottom of the screen for new settings to take effect.', 'youtube-embed' ) . '</p>';
356
- $help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
357
- $help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
358
- $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
359
- $help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
360
-
361
- return $help_text;
362
- }
363
-
364
- /**
365
- * Add About Help
366
- *
367
- * Add help tab to about screen
368
- *
369
- * @since 2.5
370
- *
371
- * @uses aye_about_help Return help text
372
- */
373
-
374
- function aye_add_about_help() {
375
-
376
- global $aye_about_hook;
377
- $screen = get_current_screen();
378
-
379
- if ( $screen->id != $aye_about_hook ) { return; }
380
-
381
- $screen -> add_help_tab( array( 'id' => 'aye-about-help-tab', 'title' => __( 'Help', 'youtube-embed' ), 'content' => aye_about_help() ) );
382
- }
383
-
384
- /**
385
- * About Help
386
- *
387
- * Return help text for about screen
388
- *
389
- * @since 2.5
390
- *
391
- * @return string Help Text
392
- */
393
-
394
- function aye_about_help() {
395
-
396
- $help_text = '<p>' . __( 'This screen provides useful information about this plugin along with methods of support.', 'youtube-embed' ) . '</p>';
397
- $help_text .= '<p><strong>' . __( 'For more information:', 'youtube-embed' ) . '</strong></p>';
398
- $help_text .= '<p><a href="http://www.artiss.co.uk/youtube-embed">' . __( 'Artiss YouTube Embed Plugin Documentation', 'youtube-embed' ) . '</a></p>';
399
- $help_text .= '<p><a href="http://code.google.com/apis/youtube/player_parameters.html">' . __( 'YouTube Player Documentation', 'youtube-embed' ) . '</a></p>';
400
- $help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
401
-
402
- return $help_text;
403
- }
404
-
405
- /**
406
- * Detect plugin activation
407
- *
408
- * Upon detection of activation set an option
409
- *
410
- * @since 2.4
411
- */
412
-
413
- function aye_plugin_activate() {
414
-
415
- update_option( 'youtube_embed_activated', true );
416
-
417
- }
418
-
419
- register_activation_hook( WP_PLUGIN_DIR . "/youtube-embed/youtube-embed.php", 'aye_plugin_activate' );
420
-
421
- // If plugin activated, run activation commands and delete option
422
-
423
- global $wp_version;
424
-
425
- if ( get_option( 'youtube_embed_activated' ) && ( ( float ) $wp_version >= 3.3 ) ) {
426
-
427
- add_action( 'admin_enqueue_scripts', 'aye_admin_enqueue_scripts' );
428
-
429
- delete_option( 'youtube_embed_activated' );
430
- }
431
-
432
- /**
433
- * Enqueue Feature Pointer files
434
- *
435
- * Add the required feature pointer files
436
- *
437
- * @since 2.4
438
- */
439
-
440
- function aye_admin_enqueue_scripts() {
441
-
442
- wp_enqueue_style( 'wp-pointer' );
443
- wp_enqueue_script( 'wp-pointer' );
444
-
445
- add_action( 'admin_print_footer_scripts', 'aye_admin_print_footer_scripts' );
446
- }
447
-
448
- /**
449
- * Show Feature Pointer
450
- *
451
- * Display feature pointer
452
- *
453
- * @since 2.4
454
- */
455
-
456
- function aye_admin_print_footer_scripts() {
457
-
458
- $pointer_content = '<h3>' . __( 'Welcome to Artiss YouTube Embed', 'youtube-embed' ) . '</h3>';
459
- $pointer_content .= '<p style="font-style:italic;">' . __( 'Thank you for installing this plugin.', 'youtube-embed' ) . '</p>';
460
- $pointer_content .= '<p>' . __( 'These new menu options will allow you to configure your videos to just how you want them and provide links for help and support.', 'youtube-embed' ) . '</p>';
461
- $pointer_content .= '<p>' . __( 'Even if you do nothing else, please visit the Profiles option to check your default video values.', 'youtube-embed' ) . '</p>';
462
- ?>
463
- <script>
464
- jQuery(function () {
465
- var body = jQuery(document.body),
466
- menu = jQuery('#toplevel_page_aye-support-about'),
467
- collapse = jQuery('#collapse-menu'),
468
- yembed = menu.find("a[href='admin.php?page=aye-profile-options']"),
469
- options = {
470
- content: '<?php echo $pointer_content; ?>',
471
- position: {
472
- edge: 'left',
473
- align: 'center',
474
- of: menu.is('.wp-menu-open') && !menu.is('.folded *') ? yembed : menu
475
- },
476
- close: function() {
477
- }};
478
-
479
- if ( !yembed.length )
480
- return;
481
-
482
- body.pointer(options).pointer('open');
483
- });
484
- </script>
485
- <?php
486
- }
487
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aye-display-about.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
- /**
3
- * About Page
4
- *
5
- * About the plugin
6
- *
7
- * @package Artiss-YouTube-Embed
8
- * @since 2.0
9
- */
10
- ?>
11
- <div class="wrap" style="width: 1010px;">
12
- <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
13
-
14
- <h2><?php _e( 'About Artiss YouTube Embed', 'youtube-embed' ); ?></h2>
15
-
16
- <?php
17
-
18
- // Display ads
19
-
20
- $options = aye_set_general_defaults();
21
- if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
22
- ?>
23
-
24
- <div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
25
-
26
- <p><?php echo sprintf( __( 'You are using Artiss YouTube Embed version %s. It was written by David Artiss.', 'youtube-embed' ), youtube_embed_version ); ?></p>
27
-
28
- <a href="http://www.youtube.com/"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/poweredby.png" alt="<?php _e( 'Powered by YouTube', 'youtube-embed' ); ?>" title="<?php _e( 'Powered by YouTube', 'youtube-embed' ); ?>" align="right" /></a>
29
-
30
- <?php
31
-
32
- echo '<h3>' . __( 'Copyrights', 'youtube-embed' ) . '</h3>';
33
-
34
- echo '<p>' . __( 'YouTube, and all associated logos, is the copyright of Google Inc.', 'youtube-embed' ) . '</p>';
35
-
36
- echo '<p>' . __( 'EmbedPlus is copyright. Read the <a href="http://embedplus.com/terms.aspx" target="_blank">Terms &amp; Conditions of Use</a>.', 'youtube-embed' ) . '</p>';
37
-
38
- echo '<h3>' . __( 'Acknowledgements', 'youtube-embed' ) . '</h3>';
39
-
40
- echo '<p>' . __( 'Images have been compressed with <a href="http://www.smushit.com/ysmush.it/">Smush.it</a>.', 'youtube-embed' ) . '</p>';
41
-
42
- echo '<p>' . __( 'JavaScript has been compressed with <a href="http://javascriptcompressor.com/">JavaScript Compressor</a>.', 'youtube-embed' ) . '</p>';
43
-
44
- echo '<p>' . __( 'YouTube icons are from <a href="http://www.youtube.com/t/creators_downloads">YouTube</a>. Other icons are by <a href="http://p.yusukekamiyamane.com/">Yusuke Kamiyamane</a>.', 'youtube-embed' ) . '</p>';
45
-
46
- echo '<p>' . __( 'Video downloads are courtesy of <a href="http://www.videodownloadx.com/">Videodownloadx</a>.', 'youtube-embed' ) . '</p>';
47
-
48
- echo '<h3>' . __( 'Support Information', 'youtube-embed' ) . '</h3>';
49
-
50
- echo '<p>' . __( 'Useful support information and links can be found by clicking on the Help tab at the top of each of the Artiss YouTube Embed administration screens.', 'youtube-embed' ) . '</p>';
51
-
52
- echo '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.', 'youtube-embed' ) . '</h4>';
53
-
54
- echo '<h3>' . __( 'Stay in Touch', 'youtube-embed' ) . '</h3>';
55
-
56
- echo '<p>' . __( '<a href="http://www.artiss.co.uk/wp-plugins">See the full list</a> of Artiss plugins, including beta releases.', 'youtube-embed' ) . '</p>';
57
-
58
- echo '<p>' . __( '<a href="http://www.twitter.com/artiss_tech">Follow Artiss.co.uk</a> on Twitter.', 'youtube-embed' ) . '</p>';
59
-
60
- echo '<p>' . __( '<a href="http://www.artiss.co.uk/feed">Subscribe</a> to the Artiss.co.uk news feed.', 'youtube-embed' ) . '</p>';
61
-
62
- ?>
63
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aye-display-instructions.php DELETED
@@ -1,31 +0,0 @@
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-function-calls.php DELETED
@@ -1,229 +0,0 @@
1
- <?php
2
- /**
3
- * Function Calls
4
- *
5
- * Various function calls that the user may call directly
6
- *
7
- * @package Artiss-YouTube-Embed
8
- */
9
-
10
- /**
11
- * Embed a YouTube video
12
- *
13
- * Write out XHTML to embed a YouTube video
14
- *
15
- * @since 2.0
16
- *
17
- * @uses aye_get_parameters Extract parameters from input
18
- * @uses aye_get_embed_type Work out the correct embed type to use
19
- * @uses aye_set_autohide Set correct autohide parameter
20
- * @uses aye_generate_youtube_code Generate the YouTube code
21
- *
22
- * @param string $content YouTube video ID
23
- * @param string $paras List of parameters
24
- * @param string $style Optional CSS
25
- */
26
-
27
- function youtube_video_embed( $content, $paras = '', $style = '' ) {
28
- $width = aye_get_parameters( $paras, 'width' );
29
- $height = aye_get_parameters( $paras, 'height' );
30
- $fullscreen = aye_get_parameters( $paras, 'fullscreen' );
31
- $related = aye_get_parameters( $paras, 'related' );
32
- $autoplay = aye_get_parameters( $paras, 'autoplay' );
33
- $loop = aye_get_parameters( $paras, 'loop' );
34
- $start = aye_get_parameters( $paras, 'start' );
35
- $info = aye_get_parameters( $paras, 'info' );
36
- $annotation = aye_get_parameters( $paras, 'annotation' );
37
- $cc = aye_get_parameters( $paras, 'cc' );
38
- $link = aye_get_parameters( $paras, 'link' );
39
- $react = aye_get_parameters( $paras, 'react' );
40
- $stop = aye_get_parameters( $paras, 'stop' );
41
- $sweetspot = aye_get_parameters( $paras, 'sweetspot' );
42
- $embedplus = aye_get_parameters( $paras, 'embedplus' );
43
- $disablekb = aye_get_parameters( $paras, 'disablekb' );
44
- $ratio = aye_get_parameters( $paras, 'ratio' );
45
- $autohide = aye_get_parameters( $paras, 'autohide' );
46
- $controls = aye_get_parameters( $paras, 'controls' );
47
- $type = aye_get_parameters( $paras, 'type' );
48
- $profile = aye_get_parameters( $paras, 'profile' );
49
- $list = aye_get_parameters( $paras, 'list' );
50
- $audio = aye_get_parameters( $paras, 'audio' );
51
- $template = aye_get_parameters( $paras, 'template' );
52
- $hd = aye_get_parameters( $paras, 'hd' );
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' );
59
-
60
- // Get Embed type
61
- $type = aye_get_embed_type( $type, $embedplus );
62
-
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
-
70
- /**
71
- * Display a video thumbnail
72
- *
73
- * Display a thumbnail of a video
74
- *
75
- * @since 2.0
76
- *
77
- * @uses aye_get_parameters Extract parameters from a string
78
- * @uses aye_generate_thumbnail_code Get the thumbnail code
79
- *
80
- * @param string $content YouTube video ID
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' );
91
- $target = aye_get_parameters( $paras, 'target' );
92
- $width = aye_get_parameters( $paras, 'width' );
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
- }
100
-
101
- /**
102
- * Return video short URL
103
- *
104
- * Return a short URL for the YouTube video
105
- *
106
- * @since 2.0
107
- *
108
- * @uses aye_generate_shorturl_code Display an error
109
- *
110
- * @param string $id YouTube video ID
111
- * @return string Download URL
112
- */
113
-
114
- function youtube_short_url( $id ) {
115
- return aye_generate_shorturl_code( $id );
116
- }
117
-
118
- /**
119
- * Get video download URL
120
- *
121
- * Return a URL for the video so that it can be downloaded
122
- *
123
- * @since 2.0
124
- *
125
- * @uses aye_generate_download_code Get the download URL
126
- *
127
- * @param string $id YouTube video ID
128
- * @return string Download URL
129
- */
130
-
131
- function get_video_download( $id ) {
132
- return aye_generate_download_code( $id );
133
- }
134
-
135
- /**
136
- * Get XML transcript
137
- *
138
- * Return XML formatted YouTube transcript
139
- *
140
- * @since 2.0
141
- *
142
- * @uses aye_error Output an error
143
- * @uses aye_extract_id Extract a video ID
144
- * @uses aye_get_file Get a file
145
- * @uses aye_validate_id Check the video ID is valid
146
- *
147
- * @param string $id YouTube video ID
148
- * @return string Transcript file in XML format
149
- */
150
-
151
- function get_youtube_transcript_xml ( $id ) {
152
-
153
- // Extract the ID if a full URL has been specified
154
- $id = aye_extract_id( $id );
155
-
156
- // Check what type of video it is and whether it's valid
157
- $embed_type = aye_validate_id( $id );
158
- if ( $embed_type != 'v' ) {
159
- if ( strlen( $embed_type ) > 1 ) {
160
- echo aye_error( $embed_type );
161
- } else {
162
- echo aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
163
- }
164
- return;
165
- }
166
-
167
- // Get transcript file
168
- $filename = 'http://video.google.com/timedtext?lang=en&v=' . $id;
169
- $xml = aye_get_file( $filename );
170
-
171
- // Check success and return appropriate output
172
- if ( $xml[ 'rc' ] > 0 ) {
173
- echo aye_error( sprintf( __( 'Could not fetch the transcript file %s.', 'youtube-embed' ), $id ) );
174
- return;
175
- } else {
176
- return $xml;
177
- }
178
- }
179
-
180
- /**
181
- * Get transcript
182
- *
183
- * Return XHTML formatted YouTube transcript
184
- *
185
- * @since 2.0
186
- *
187
- * @uses aye_generate_generatE_transcript Generate the transcript output
188
- *
189
- * @param string $id YouTube video ID
190
- * @return string Transcript file in XHTML format
191
- */
192
-
193
- function get_youtube_transcript( $id ) {
194
- return aye_generate_transcript( $id );
195
- }
196
-
197
- /**
198
- * Get Video Name
199
- *
200
- * Function to return the name of a YouTube video
201
- *
202
- * @since 2.0
203
- *
204
- * @uses aye_extract_id Extract the video ID
205
- * @uses aye_validate_id Get the name and video type
206
- * @uses aye_error Return an error
207
- *
208
- * @param string $id Video ID
209
- * @return string Video name
210
- */
211
-
212
- function get_youtube_name( $id ) {
213
-
214
- // Extract the ID if a full URL has been specified
215
- $id = aye_extract_id( $id );
216
-
217
- // Check what type of video it is and whether it's valid
218
- $return = aye_validate_id( $id, true );
219
- $embed_type = $return[ 'type' ];
220
- if ( strlen( $embed_type ) > 1 ) {
221
- echo aye_error( $embed_type );
222
- } else {
223
- echo aye_error( sprintf( __ ( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
224
- }
225
-
226
- // Return the video title
227
- return $return['title'];
228
- }
229
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/aye-generate-download-code.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
- /**
3
- * Generate Download Code
4
- *
5
- * Create code to allow a YouTube video to be downloaded
6
- *
7
- * @package Artiss-YouTube-Embed
8
- * @since 2.0
9
- *
10
- * @uses aye_extract_id Extract an ID from a string
11
- * @uses aye_validate_id Confirm the type of video
12
- * @uses aye_error Display an error
13
- *
14
- * @param string $id YouTube video ID
15
- * @param string $target Link target
16
- * @param string $nofollow Use rel="nofollow" ?
17
- * @param string $text Text to add link to
18
- * @return string URL
19
- */
20
-
21
- function aye_generate_download_code( $id ) {
22
-
23
- if ( $id == '' ) { return aye_error( __ ( 'No YouTube ID was found.', 'youtube-embed' ) ); }
24
-
25
- // Extract the ID if a full URL has been specified
26
-
27
- $id = aye_extract_id( $id );
28
-
29
- // Check what type of video it is and whether it's valid
30
-
31
- $embed_type = aye_validate_id( $id );
32
- if ( $embed_type != 'v' ) {
33
- if ( strlen( $embed_type ) > 1 ) {
34
- return aye_error( $embed_type );
35
- } else {
36
- return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
37
- }
38
- }
39
-
40
- // Create the link
41
-
42
- return 'http://www.videodownloadx.com/?video=' . $id;
43
- }
44
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/{aye-deprecated.php → deprecated.php} RENAMED
@@ -4,18 +4,18 @@
4
  *
5
  * Various pieces of code, now deprecated, but kept here for backwards compatibility
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
 
11
  // Shortcode for showing playlists - can now use the standard video shortcode
12
  // In fact, this shortcode now simply directs to the video shortcode
13
- add_shortcode( 'youtube_playlist', 'aye_video_shortcode' );
14
 
15
  // Shortcode for downloading playlist - in fact, this never worked as option doesn't
16
  // allow playlists. None-the-less, now diverts to standard download shortcode
17
  // and will display an appropriate error
18
- add_shortcode( 'download_playlist', 'aye_video_download' );
19
 
20
  /**
21
  * Embed a playlist
@@ -52,7 +52,7 @@ function youtube_playlist_embed( $content, $paras, $style = '' ) {
52
  */
53
 
54
  function get_playlist_download( $id = '' ) {
55
- echo aye_error( __( 'This function does not support playlists', 'youtube-embed' ) );
56
  return;
57
  }
58
  ?>
4
  *
5
  * Various pieces of code, now deprecated, but kept here for backwards compatibility
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
 
11
  // Shortcode for showing playlists - can now use the standard video shortcode
12
  // In fact, this shortcode now simply directs to the video shortcode
13
+ add_shortcode( 'youtube_playlist', 'vye_video_shortcode' );
14
 
15
  // Shortcode for downloading playlist - in fact, this never worked as option doesn't
16
  // allow playlists. None-the-less, now diverts to standard download shortcode
17
  // and will display an appropriate error
18
+ add_shortcode( 'download_playlist', 'vye_video_download' );
19
 
20
  /**
21
  * Embed a playlist
52
  */
53
 
54
  function get_playlist_download( $id = '' ) {
55
+ echo vye_error( __( 'This function does not support playlists', 'youtube-embed' ) );
56
  return;
57
  }
58
  ?>
includes/function-calls.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Function Calls
4
+ *
5
+ * Various function calls that the user may call directly
6
+ *
7
+ * @package YouTube-Embed
8
+ */
9
+
10
+ /**
11
+ * Embed a YouTube video
12
+ *
13
+ * Write out XHTML to embed a YouTube video
14
+ *
15
+ * @since 2.0
16
+ *
17
+ * @uses vye_get_parameters Extract parameters from input
18
+ * @uses vye_get_embed_type Work out the correct embed type to use
19
+ * @uses vye_set_autohide Set correct autohide parameter
20
+ * @uses vye_generate_youtube_code Generate the YouTube code
21
+ *
22
+ * @param string $content YouTube video ID
23
+ * @param string $paras List of parameters
24
+ * @param string $style Optional CSS
25
+ */
26
+
27
+ function youtube_video_embed( $content, $paras = '', $style = '' ) {
28
+ $width = vye_get_parameters( $paras, 'width' );
29
+ $height = vye_get_parameters( $paras, 'height' );
30
+ $fullscreen = vye_get_parameters( $paras, 'fullscreen' );
31
+ $related = vye_get_parameters( $paras, 'related' );
32
+ $autoplay = vye_get_parameters( $paras, 'autoplay' );
33
+ $loop = vye_get_parameters( $paras, 'loop' );
34
+ $start = vye_get_parameters( $paras, 'start' );
35
+ $info = vye_get_parameters( $paras, 'info' );
36
+ $annotation = vye_get_parameters( $paras, 'annotation' );
37
+ $cc = vye_get_parameters( $paras, 'cc' );
38
+ $link = vye_get_parameters( $paras, 'link' );
39
+ $react = vye_get_parameters( $paras, 'react' );
40
+ $stop = vye_get_parameters( $paras, 'stop' );
41
+ $sweetspot = vye_get_parameters( $paras, 'sweetspot' );
42
+ $embedplus = vye_get_parameters( $paras, 'embedplus' );
43
+ $disablekb = vye_get_parameters( $paras, 'disablekb' );
44
+ $ratio = vye_get_parameters( $paras, 'ratio' );
45
+ $autohide = vye_get_parameters( $paras, 'autohide' );
46
+ $controls = vye_get_parameters( $paras, 'controls' );
47
+ $type = vye_get_parameters( $paras, 'type' );
48
+ $profile = vye_get_parameters( $paras, 'profile' );
49
+ $list = vye_get_parameters( $paras, 'list' );
50
+ $audio = vye_get_parameters( $paras, 'audio' );
51
+ $template = vye_get_parameters( $paras, 'template' );
52
+ $hd = vye_get_parameters( $paras, 'hd' );
53
+ $color = vye_get_parameters( $paras, 'color' );
54
+ $theme = vye_get_parameters( $paras, 'theme' );
55
+ $https = vye_get_parameters( $paras, 'ssl' );
56
+ $dynamic = vye_get_parameters( $paras, 'dynamic' );
57
+ $search = vye_get_parameters( $paras, 'search' );
58
+ $user = vye_get_parameters( $paras, 'user' );
59
+
60
+ // Get Embed type
61
+ $type = vye_get_embed_type( $type, $embedplus );
62
+
63
+ // Set up Autohide parameter
64
+ $autohide = vye_set_autohide( $autohide );
65
+
66
+ echo vye_generate_youtube_code( $content, $type, $width, $height, vye_convert( $fullscreen ), vye_convert( $related ), vye_convert( $autoplay ), vye_convert( $loop ), $start, vye_convert( $info ), vye_convert_3( $annotation ), vye_convert( $cc ), $style, vye_convert( $link ), vye_convert( $react ), $stop, vye_convert( $sweetspot ), vye_convert( $disablekb ), $ratio, $autohide, $controls, $profile, $list, vye_convert( $audio ), $template, vye_convert( $hd ), $color, $theme, vye_convert( $https ), vye_convert( $dynamic ), vye_convert( $search ), vye_convert( $user ) );
67
+ return;
68
+ }
69
+
70
+ /**
71
+ * Display a video thumbnail
72
+ *
73
+ * Display a thumbnail of a video
74
+ *
75
+ * @since 2.0
76
+ *
77
+ * @uses vye_get_parameters Extract parameters from a string
78
+ * @uses vye_generate_thumbnail_code Get the thumbnail code
79
+ *
80
+ * @param string $content YouTube video ID
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 = vye_get_parameters( $paras, 'class' );
90
+ $rel = vye_get_parameters( $paras, 'rel' );
91
+ $target = vye_get_parameters( $paras, 'target' );
92
+ $width = vye_get_parameters( $paras, 'width' );
93
+ $height = vye_get_parameters( $paras, 'height' );
94
+ $version = vye_get_parameters( $paras, 'version' );
95
+
96
+ echo vye_generate_thumbnail_code( $content, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink );
97
+
98
+ return;
99
+ }
100
+
101
+ /**
102
+ * Return video short URL
103
+ *
104
+ * Return a short URL for the YouTube video
105
+ *
106
+ * @since 2.0
107
+ *
108
+ * @uses vye_generate_shorturl_code Display an error
109
+ *
110
+ * @param string $id YouTube video ID
111
+ * @return string Download URL
112
+ */
113
+
114
+ function youtube_short_url( $id ) {
115
+ return vye_generate_shorturl_code( $id );
116
+ }
117
+
118
+ /**
119
+ * Get video download URL
120
+ *
121
+ * Return a URL for the video so that it can be downloaded
122
+ *
123
+ * @since 2.0
124
+ *
125
+ * @uses vye_generate_download_code Get the download URL
126
+ *
127
+ * @param string $id YouTube video ID
128
+ * @return string Download URL
129
+ */
130
+
131
+ function get_video_download( $id ) {
132
+ return vye_generate_download_code( $id );
133
+ }
134
+
135
+ /**
136
+ * Get XML transcript
137
+ *
138
+ * Return XML formatted YouTube transcript
139
+ *
140
+ * @since 2.0
141
+ *
142
+ * @uses vye_error Output an error
143
+ * @uses vye_extract_id Extract a video ID
144
+ * @uses vye_get_file Get a file
145
+ * @uses vye_validate_id Check the video ID is valid
146
+ *
147
+ * @param string $id YouTube video ID
148
+ * @return string Transcript file in XML format
149
+ */
150
+
151
+ function get_youtube_transcript_xml ( $id ) {
152
+
153
+ // Extract the ID if a full URL has been specified
154
+ $id = vye_extract_id( $id );
155
+
156
+ // Check what type of video it is and whether it's valid
157
+ $embed_type = vye_validate_id( $id );
158
+ if ( $embed_type != 'v' ) {
159
+ if ( strlen( $embed_type ) > 1 ) {
160
+ echo vye_error( $embed_type );
161
+ } else {
162
+ echo vye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
163
+ }
164
+ return;
165
+ }
166
+
167
+ // Get transcript file
168
+ $filename = 'http://video.google.com/timedtext?lang=en&v=' . $id;
169
+ $xml = vye_get_file( $filename );
170
+
171
+ // Check success and return appropriate output
172
+ if ( $xml[ 'rc' ] > 0 ) {
173
+ echo vye_error( sprintf( __( 'Could not fetch the transcript file %s.', 'youtube-embed' ), $id ) );
174
+ return;
175
+ } else {
176
+ return $xml;
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Get transcript
182
+ *
183
+ * Return XHTML formatted YouTube transcript
184
+ *
185
+ * @since 2.0
186
+ *
187
+ * @uses vye_generate_generatE_transcript Generate the transcript output
188
+ *
189
+ * @param string $id YouTube video ID
190
+ * @return string Transcript file in XHTML format
191
+ */
192
+
193
+ function get_youtube_transcript( $id ) {
194
+ return vye_generate_transcript( $id );
195
+ }
196
+
197
+ /**
198
+ * Get Video Name
199
+ *
200
+ * Function to return the name of a YouTube video
201
+ *
202
+ * @since 2.0
203
+ *
204
+ * @uses vye_extract_id Extract the video ID
205
+ * @uses vye_validate_id Get the name and video type
206
+ * @uses vye_error Return an error
207
+ *
208
+ * @param string $id Video ID
209
+ * @return string Video name
210
+ */
211
+
212
+ function get_youtube_name( $id ) {
213
+
214
+ // Extract the ID if a full URL has been specified
215
+ $id = vye_extract_id( $id );
216
+
217
+ // Check what type of video it is and whether it's valid
218
+ $return = vye_validate_id( $id, true );
219
+ $embed_type = $return[ 'type' ];
220
+ if ( strlen( $embed_type ) > 1 ) {
221
+ echo vye_error( $embed_type );
222
+ } else {
223
+ echo vye_error( sprintf( __ ( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
224
+ }
225
+
226
+ // Return the video title
227
+ return $return['title'];
228
+ }
229
+ ?>
includes/generate-download-code.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Generate Download Code
4
+ *
5
+ * Create code to allow a YouTube video to be downloaded
6
+ *
7
+ * @package YouTube-Embed
8
+ * @since 2.0
9
+ *
10
+ * @uses vye_extract_id Extract an ID from a string
11
+ * @uses vye_validate_id Confirm the type of video
12
+ * @uses vye_error Display an error
13
+ * @uses vye_get_file Fetch a file
14
+ *
15
+ * @param string $id YouTube video ID
16
+ * @return string Download HTML
17
+ */
18
+
19
+ function vye_generate_download_code( $id ) {
20
+
21
+ if ( $id == '' ) { return vye_error( __ ( 'No YouTube ID was found.', 'youtube-embed' ) ); }
22
+
23
+ // Extract the ID if a full URL has been specified
24
+
25
+ $id = vye_extract_id( $id );
26
+
27
+ // Check what type of video it is and whether it's valid
28
+
29
+ $embed_type = vye_validate_id( $id );
30
+ if ( $embed_type != 'v' ) {
31
+ if ( strlen( $embed_type ) > 1 ) {
32
+ return vye_error( $embed_type );
33
+ } else {
34
+ return vye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
35
+ }
36
+ }
37
+
38
+ // See if a ShareASale affiliate ID has been specified - if so, get it!
39
+
40
+ $options = vye_set_general_defaults();
41
+ if ( $options[ 'shareasale_id' ] == '' ) {
42
+ $affiliate = '';
43
+ } else {
44
+ $affiliate = $options[ 'shareasale_id' ];
45
+ }
46
+
47
+ // Get the link from Vixy
48
+
49
+ $url = 'http://vixy.net/downloadbar?id=' . $id . '&sip=' . $_SERVER['SERVER_ADDR']. '&affiliate_id=' . $affiliate;
50
+
51
+ $file = vye_get_file( $url );
52
+
53
+ // Return the resulting code
54
+
55
+ return $file[ 'file' ];
56
+ }
57
+ ?>
includes/{aye-generate-embed-code.php → generate-embed-code.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Functions calls to generate the required YouTube code
6
  *
7
- * @package Artiss-YouTube-Embed
8
  */
9
 
10
  /**
@@ -14,13 +14,13 @@
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
@@ -57,23 +57,23 @@
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
@@ -83,28 +83,28 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
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
@@ -115,8 +115,8 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
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
 
@@ -146,7 +146,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
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
  }
@@ -157,7 +157,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
157
 
158
  // Generate a cache key for the above passed parameters
159
 
160
- $cache_key = 'aye_video_' . md5( $id . $type . $width . $height . $fullscreen . $related . $autoplay . $loop . $start . $info . $annotation . $cc . $style . $link . $react . $stop . $sweetspot . $disablekb . $ratio . $autohide . $controls . $profile . $list_style . $audio . $template . $hd . $color . $theme . $https . $dynamic . $search . $user . serialize( $general ) . serialize( $options ) . serialize( $list ) . serialize( $return ) );
161
 
162
  // Try and get the output from cache. If it exists, return the code
163
 
@@ -209,7 +209,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
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
@@ -239,7 +239,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
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
@@ -393,7 +393,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
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
 
@@ -478,11 +478,11 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
478
 
479
  // Add the download link, if requested
480
 
481
- if ( $options[ 'download' ] == 1 ) { $result .= '<br/><div style="' . $options[ 'download_style' ] . '" class="aye_download"><a href="' . aye_generate_download_code( $id ) . "\">" . $options[ 'download_text' ] . "</a></div>\n"; }
482
 
483
  // Now add a commented header and trailer
484
 
485
- $result = "\n<!-- YouTube Embed v" . youtube_embed_version . " | http://www.artiss.co.uk/youtube-embed -->\n" . $result;
486
  $result .= "<!-- End of YouTube Embed code -->\n";
487
 
488
  // Cache the output
@@ -504,7 +504,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
504
  * @return string The profile number (defaults to 0)
505
  */
506
 
507
- function aye_validate_profile( $name, $number ) {
508
 
509
  $profile = 0;
510
  $name = strtolower( $name );
@@ -540,7 +540,7 @@ function aye_validate_profile( $name, $number ) {
540
  * @return string The list (defaults to blank)
541
  */
542
 
543
- function aye_validate_list( $name, $number ) {
544
 
545
  $list = '';
546
 
@@ -588,7 +588,7 @@ function aye_validate_list( $name, $number ) {
588
  * @return string The parameter value
589
  */
590
 
591
- function aye_get_url_para( $id, $para, $current ) {
592
 
593
  // Look for an ampersand
594
 
@@ -621,7 +621,7 @@ function aye_get_url_para( $id, $para, $current ) {
621
  * @return string The decoded string
622
  */
623
 
624
- function aye_decode( $encoded ) {
625
 
626
  $find = array( '&amp;', '&quot;', '&#039;', '&lt;', '&gt;' );
627
  $replace = array( '&', '"', "'", '<', '>' );
4
  *
5
  * Functions calls to generate the required YouTube code
6
  *
7
+ * @package YouTube-Embed
8
  */
9
 
10
  /**
14
  *
15
  * @since 2.0
16
  *
17
+ * @uses vye_error Display an error
18
+ * @uses vye_extract_id Get the video ID
19
+ * @uses vye_validate_list Get the requested listr
20
+ * @uses vye_validate_id Validate the video ID
21
+ * @uses vye_validate_profile Get the requested profile
22
+ * @uses vye_set_general_defaults Get general options
23
+ * @uses vye_set_profile_defaults Set default profile options
24
  *
25
  * @param string $id Video ID
26
  * @param string $type Embed type
57
  * @return string Code output
58
  */
59
 
60
+ function vye_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 vye_error( __( 'No video/playlist ID has been supplied', 'youtube-embed' ) ); }
65
 
66
  // Get general options
67
 
68
+ $general = vye_set_general_defaults();
69
 
70
  // Find the profile, if one is specified
71
 
72
+ $profile = vye_validate_profile( $profile, $general[ 'profile_no' ] );
73
 
74
  // Get default values if no values are supplied
75
 
76
+ $options = vye_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
83
  // Check it's not a list
84
 
85
  $playlist_ids = '';
86
+ $list = vye_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 = vye_get_url_para( $id, 'w', $width );
92
+ $height = vye_get_url_para( $id, 'h', $height );
93
 
94
  // Extract the ID if a full URL has been specified
95
 
96
+ $id = vye_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( 'vye_type_' . $id );
102
+ delete_transient( 'vye_title_' . $id );
103
  }
104
 
105
  // Check what type of video it is and whether it's valid
106
 
107
+ $return = vye_validate_id( $id, true );
108
  $embed_type = $return[ 'type' ];
109
 
110
  // If the video is invalid, output an appropriate error
115
  } else {
116
  $error = $embed_type;
117
  }
118
+ $result = "\n<!-- Vixy YouTube Embed v" . youtube_embed_version . " -->\n";
119
+ $result .= "<!-- " . $error . " -->\n" . vye_decode( $general[ 'error_message' ] ) . "\n<!-- End of YouTube Embed code -->\n";
120
  return $result;
121
  }
122
 
146
  $loop = 1;
147
  while ( $loop < count( $list ) ) {
148
  if ( $playlist_ids != '' ) { $playlist_ids .= ','; }
149
+ $list_id = vye_extract_id( $list[ $loop ] );
150
  $playlist_ids .= $list_id;
151
  $loop ++;
152
  }
157
 
158
  // Generate a cache key for the above passed parameters
159
 
160
+ $cache_key = 'vye_video_' . md5( $id . $type . $width . $height . $fullscreen . $related . $autoplay . $loop . $start . $info . $annotation . $cc . $style . $link . $react . $stop . $sweetspot . $disablekb . $ratio . $autohide . $controls . $profile . $list_style . $audio . $template . $hd . $color . $theme . $https . $dynamic . $search . $user . serialize( $general ) . serialize( $options ) . serialize( $list ) . serialize( $return ) );
161
 
162
  // Try and get the output from cache. If it exists, return the code
163
 
209
  // This is to maintain backwards compatibility after version 2.6
210
 
211
  if ( ( !is_numeric( $controls ) ) && ( $controls != '' ) ) {
212
+ $controls = vye_convert( $controls );
213
  }
214
 
215
  // If values have not been pressed, use the default values
239
 
240
  // Build the required template
241
 
242
+ if ( $template == '' ) { $template = $options[ 'template' ]; } else { $template = vye_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
393
  $privacy = $general[ 'privacy' ];
394
 
395
  if ( $privacy == 2 ) {
396
+ $do_not_track = vye_do_not_track();
397
  if ( $do_not_track ) { $privacy = 1; } else { $privacy = 0; }
398
  }
399
 
478
 
479
  // Add the download link, if requested
480
 
481
+ if ( $options[ 'vixy_download' ] == 1 ) { $result .= '<br/><span style="' . $options[ 'download_style' ] . '" class="vye_download">' . vye_generate_download_code( $id ) . "</span>\n"; }
482
 
483
  // Now add a commented header and trailer
484
 
485
+ $result = "\n<!-- Vixy YouTube Embed v" . youtube_embed_version . " -->\n" . $result;
486
  $result .= "<!-- End of YouTube Embed code -->\n";
487
 
488
  // Cache the output
504
  * @return string The profile number (defaults to 0)
505
  */
506
 
507
+ function vye_validate_profile( $name, $number ) {
508
 
509
  $profile = 0;
510
  $name = strtolower( $name );
540
  * @return string The list (defaults to blank)
541
  */
542
 
543
+ function vye_validate_list( $name, $number ) {
544
 
545
  $list = '';
546
 
588
  * @return string The parameter value
589
  */
590
 
591
+ function vye_get_url_para( $id, $para, $current ) {
592
 
593
  // Look for an ampersand
594
 
621
  * @return string The decoded string
622
  */
623
 
624
+ function vye_decode( $encoded ) {
625
 
626
  $find = array( '&amp;', '&quot;', '&#039;', '&lt;', '&gt;' );
627
  $replace = array( '&', '"', "'", '<', '>' );
includes/{aye-generate-shorturl-code.php → generate-shorturl-code.php} RENAMED
@@ -4,34 +4,34 @@
4
  *
5
  * Create a short URL to a YouTube video
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  *
10
- * @uses aye_extract_id Extract an ID from a string
11
- * @uses aye_validate_id Confirm the type of video
12
- * @uses aye_error Display an error
13
  *
14
  * @param string $id YouTube video ID
15
  * @return string $youtube_code Code
16
  */
17
 
18
- function aye_generate_shorturl_code( $id ) {
19
 
20
  // Check that an ID has been specified
21
  if ( $id == '' ) {
22
- return aye_error( __( 'No video ID has been supplied', 'youtube-embed' ) );
23
  } else {
24
 
25
  // Extract the ID if a full URL has been specified
26
- $id = aye_extract_id( $id );
27
 
28
  // Check what type of video it is and whether it's valid
29
- $embed_type = aye_validate_id( $id );
30
  if ( $embed_type != 'v' ) {
31
  if ( strlen( $embed_type ) > 1 ) {
32
- return aye_error( $embed_type );
33
  } else {
34
- return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
35
  }
36
  }
37
 
4
  *
5
  * Create a short URL to a YouTube video
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  *
10
+ * @uses vye_extract_id Extract an ID from a string
11
+ * @uses vye_validate_id Confirm the type of video
12
+ * @uses vye_error Display an error
13
  *
14
  * @param string $id YouTube video ID
15
  * @return string $youtube_code Code
16
  */
17
 
18
+ function vye_generate_shorturl_code( $id ) {
19
 
20
  // Check that an ID has been specified
21
  if ( $id == '' ) {
22
+ return vye_error( __( 'No video ID has been supplied', 'youtube-embed' ) );
23
  } else {
24
 
25
  // Extract the ID if a full URL has been specified
26
+ $id = vye_extract_id( $id );
27
 
28
  // Check what type of video it is and whether it's valid
29
+ $embed_type = vye_validate_id( $id );
30
  if ( $embed_type != 'v' ) {
31
  if ( strlen( $embed_type ) > 1 ) {
32
+ return vye_error( $embed_type );
33
  } else {
34
+ return vye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
35
  }
36
  }
37
 
includes/{aye-generate-thumbnail-code.php → generate-thumbnail-code.php} RENAMED
@@ -4,12 +4,12 @@
4
  *
5
  * Generate XHTML compatible YouTube video thumbnail
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  *
10
- * @uses aye_extract_id Extract an ID from a string
11
- * @uses aye_validate_id Confirm the type of video
12
- * @uses aye_error Display an error
13
  *
14
  * @param string $id YouTube video ID
15
  * @param string $style Link STYLE
@@ -24,19 +24,19 @@
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 );
31
 
32
  // Check what type of video it is and whether it's valid
33
- $embed_type = aye_validate_id( $id );
34
 
35
  if ( $embed_type != 'v' ) {
36
  if ( strlen( $embed_type ) > 1 ) {
37
- return aye_error( $embed_type );
38
  } else {
39
- return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
40
  }
41
  }
42
 
4
  *
5
  * Generate XHTML compatible YouTube video thumbnail
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  *
10
+ * @uses vye_extract_id Extract an ID from a string
11
+ * @uses vye_validate_id Confirm the type of video
12
+ * @uses vye_error Display an error
13
  *
14
  * @param string $id YouTube video ID
15
  * @param string $style Link STYLE
24
  * @return string $youtube_code Code
25
  */
26
 
27
+ function vye_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 = vye_extract_id( $id );
31
 
32
  // Check what type of video it is and whether it's valid
33
+ $embed_type = vye_validate_id( $id );
34
 
35
  if ( $embed_type != 'v' ) {
36
  if ( strlen( $embed_type ) > 1 ) {
37
+ return vye_error( $embed_type );
38
  } else {
39
+ return vye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
40
  }
41
  }
42
 
includes/{aye-generate-transcript-code.php → generate-transcript-code.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * All functions relating to creating YouTube transcripts
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
 
@@ -15,48 +15,48 @@
15
  *
16
  * @since 2.0
17
  *
18
- * @uses aye_extract_id Extract the ID
19
- * @uses aye_get_file Get a file
20
- * @uses aye_set_general_defaults Set default options
21
- * @uses aye_validate_id Validate the ID
22
  *
23
  * @param string $id Video ID
24
  * @return string $output Transcript output
25
  */
26
 
27
- function aye_generate_transcript( $id ) {
28
 
29
  // Extract the ID if a full URL has been specified
30
- $id = aye_extract_id( $id );
31
 
32
  // Check what type of video it is and whether it's valid
33
- $embed_type = aye_validate_id( $id );
34
  if ( $embed_type != 'v' ) {
35
  if ( strlen( $embed_type ) > 1 ) {
36
- return aye_error( $embed_type );
37
  } else {
38
- return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
39
  }
40
  }
41
 
42
  // Get general options
43
- $general = aye_set_general_defaults();
44
 
45
  // Check to see if cache is available
46
  if ( $general[ 'transcript_cache' ] != 0 ) {
47
- $cache_key = 'aye_transcript_'.$id;
48
  $output = get_transient( $cache_key );
49
  if ( $output !== false) { return $output; }
50
  }
51
 
52
  // Get transcript file
53
- $return = aye_get_file( 'http://video.google.com/timedtext?lang=en&v=' . $id );
54
  $xml = $return[ 'file' ];
55
  $output = '';
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
 
@@ -85,7 +85,7 @@ function aye_generate_transcript( $id ) {
85
  $eof = true;
86
  }
87
  }
88
- $output .= "<!-- End of YouTube Embed code -->\n";
89
  }
90
 
91
  // Save the cache
4
  *
5
  * All functions relating to creating YouTube transcripts
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
 
15
  *
16
  * @since 2.0
17
  *
18
+ * @uses vye_extract_id Extract the ID
19
+ * @uses vye_get_file Get a file
20
+ * @uses vye_set_general_defaults Set default options
21
+ * @uses vye_validate_id Validate the ID
22
  *
23
  * @param string $id Video ID
24
  * @return string $output Transcript output
25
  */
26
 
27
+ function vye_generate_transcript( $id ) {
28
 
29
  // Extract the ID if a full URL has been specified
30
+ $id = vye_extract_id( $id );
31
 
32
  // Check what type of video it is and whether it's valid
33
+ $embed_type = vye_validate_id( $id );
34
  if ( $embed_type != 'v' ) {
35
  if ( strlen( $embed_type ) > 1 ) {
36
+ return vye_error( $embed_type );
37
  } else {
38
+ return vye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) );
39
  }
40
  }
41
 
42
  // Get general options
43
+ $general = vye_set_general_defaults();
44
 
45
  // Check to see if cache is available
46
  if ( $general[ 'transcript_cache' ] != 0 ) {
47
+ $cache_key = 'vye_transcript_'.$id;
48
  $output = get_transient( $cache_key );
49
  if ( $output !== false) { return $output; }
50
  }
51
 
52
  // Get transcript file
53
+ $return = vye_get_file( 'http://video.google.com/timedtext?lang=en&v=' . $id );
54
  $xml = $return[ 'file' ];
55
  $output = '';
56
 
57
  // If transcript file exists, strip and output
58
  if ( $return[ 'rc' ] == 0 ) {
59
+ $output = "<!-- Vixy YouTube Embed v" . youtube_embed_version . " -->\n";
60
  $pos = 0;
61
  $eof = false;
62
 
85
  $eof = true;
86
  }
87
  }
88
+ $output .= "<!-- End of Vixy YouTube Embed code -->\n";
89
  }
90
 
91
  // Save the cache
includes/{aye-generate-widgets.php → generate-widgets.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Create and display widgets
6
  *
7
- * @package Artiss-YouTube-Embed
8
  */
9
 
10
  class YouTubeEmbedWidget extends WP_Widget {
@@ -56,7 +56,7 @@ class YouTubeEmbedWidget extends WP_Widget {
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' ],
@@ -139,7 +139,7 @@ class YouTubeEmbedWidget extends WP_Widget {
139
  */
140
 
141
  function form( $instance ) {
142
- include ( WP_PLUGIN_DIR . '/youtube-embed/includes/aye-options-widgets.php' );
143
  }
144
  }
145
 
4
  *
5
  * Create and display widgets
6
  *
7
+ * @package YouTube-Embed
8
  */
9
 
10
  class YouTubeEmbedWidget extends WP_Widget {
56
  if ( $instance[ 'id_type' ] == 'u' ) { $user = 1; } else { $user = ''; }
57
 
58
  // Generate the video and output it
59
+ echo vye_generate_youtube_code ( $instance[ 'id' ],
60
  $instance[ 'type' ],
61
  $instance[ 'width' ],
62
  $instance[ 'height' ],
139
  */
140
 
141
  function form( $instance ) {
142
+ include ( WP_PLUGIN_DIR . '/youtube-embed/includes/options-widgets.php' );
143
  }
144
  }
145
 
includes/{aye-options-general.php → options-general.php} RENAMED
@@ -4,14 +4,16 @@
4
  *
5
  * Screen for generic options
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
 
11
  ?>
12
  <div class="wrap" style="width: 1010px;">
13
- <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
14
- <h2><?php _e( 'Artiss YouTube Embed Options', 'youtube-embed' ); ?></h2>
 
 
15
 
16
  <?php
17
 
@@ -19,7 +21,6 @@
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' ];
@@ -53,8 +54,8 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
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
 
@@ -76,7 +77,7 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
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
 
@@ -91,48 +92,33 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
91
 
92
  // Get options
93
 
94
- $options = aye_set_general_defaults();
95
- $shortcode = aye_set_shortcode_option();
96
- $url = aye_set_url_option();
97
- $editor_sc = aye_set_editor_sc();
98
-
99
- // Display ads
100
-
101
- if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
102
  ?>
103
 
104
- <div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
105
-
106
- <p><?php _e( 'These are the general settings for Artiss YouTube Embed. Please select <a href="admin.php?page=aye-profile-options">Profiles</a> for default embedding settings.', 'youtube-embed' ); ?></p>
107
-
108
- <form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-general-options' ?>">
109
-
110
- <table class="form-table">
111
-
112
- <tr>
113
- <th scope="row"><?php _e( 'Remove Adverts', 'youtube-embed' ); ?></th>
114
- <td><input type="checkbox" name="youtube_embed_donated" value="1"<?php if ( $options[ 'donated' ] == "1" ) { echo ' checked="checked"'; } ?>/>&nbsp;<span class="description"><?php _e( "If you've <a href=\"http://www.artiss.co.uk/donate\">donated</a>, tick here to remove the adverts from these administration screens", 'youtube-embed' ); ?></span></td>
115
- </tr>
116
 
117
- </table></br>
118
 
119
  <span class="yt_heading"><?php _e( 'Embedding', 'youtube-embed' ); ?></span>
120
 
121
  <table class="form-table">
122
  <tr>
123
  <th scope="row"><?php _e( 'Add Metadata', 'youtube-embed' ); ?></th>
124
- <td><input type="checkbox" name="youtube_embed_metadata" value="1"<?php if ( $options[ 'metadata' ] == "1" ) { echo ' checked="checked"'; } ?>/>&nbsp;<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"'; } ?>/>&nbsp;<span class="description"><?php _e( 'Allow YouTube URLs in comments - will display as embedded videos. <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-comments">Learn more</a>', 'youtube-embed' ); ?></span></td>
130
  </tr>
131
 
132
  <tr>
133
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
134
  <td><select name="youtube_embed_comments_profile">
135
- <?php aye_generate_profile_list( $options[ 'comments_profile' ], $options[ 'profile_no' ] ) ?>
136
  </select></td>
137
  </tr>
138
 
@@ -173,7 +159,7 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
173
  <tr>
174
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
175
  <td><select name="youtube_embed_alt_profile">
176
- <?php aye_generate_profile_list( $options[ 'alt_profile' ], $options[ 'profile_no' ] ) ?>
177
  </select></td>
178
  </tr>
179
 
@@ -185,12 +171,12 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
185
  <tr>
186
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
187
  <td><select name="youtube_embed_alt_profile2">
188
- <?php aye_generate_profile_list( $options[ 'alt_profile2' ], $options[ 'profile_no' ] ) ?>
189
  </select></td>
190
  </tr>
191
  </table>
192
 
193
- <br/><span class="yt_heading"><?php _e( 'Migration', 'youtube-embed' ); ?></span><br/><br/><?php _e( 'Switch on compatibility with other embedding plugins. For more details on migrating from another plugin, please <a href="http://www.artiss.co.uk/youtube-embed/compatibility">click here</a>.', 'youtube-embed' ); ?>
194
 
195
  <table class="form-table">
196
  <tr>
@@ -206,7 +192,7 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
206
  <tr>
207
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
208
  <td><select name="youtube_embed_other_profile">
209
- <?php aye_generate_profile_list( $options[ 'other_profile' ], $options[ 'profile_no' ] ) ?>
210
  </select>&nbsp;<span class="description"><?php _e( 'For above 2 options', 'youtube-embed' ); ?></span></td>
211
  </tr>
212
  </table>
@@ -230,23 +216,13 @@ if ( $options[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
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>&nbsp;<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>&nbsp;<span class="description"><?php _e( 'Specify the user access required for the lists screen', 'youtube-embed' ); ?></span></td>
250
  </tr>
251
  </table>
252
 
@@ -342,6 +318,12 @@ echo '<p>' . __( 'You currently have cache for', 'youtube_embed' ) . ' ' . numbe
342
  <td><input type="checkbox" name="youtube_embed_frameborder" value="1"<?php if ( $options[ 'frameborder' ] == '1' ) { echo ' checked="checked"'; } ?>/>&nbsp;<span class="description"><?php _e( 'FRAMEBORDER is not HTML5 compliant', 'youtube-embed' ); ?></span></td>
343
  </tr></table>
344
 
 
 
 
 
 
 
345
  <?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
346
 
347
  <p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings', 'youtube-embed' ); ?>"/></p>
4
  *
5
  * Screen for generic options
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
 
11
  ?>
12
  <div class="wrap" style="width: 1010px;">
13
+ <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/admin_screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
14
+ <h2><?php _e( 'Vixy YouTube Embed Options', 'youtube-embed' ); ?></h2>
15
+
16
+ <p><a target="_blank" href="http://www.shareasale.com/r.cfm?b=146096&u=668714&m=10638&urllink=&afftrack="><img src="http://www.shareasale.com/image/RCAT1-728x90.gif" /></a></p>
17
 
18
  <?php
19
 
21
 
22
  if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'youtube_embed_general_nonce' ) ) ) {
23
 
 
24
  $options[ 'editor_button' ] = $_POST[ 'youtube_embed_editor_button' ];
25
  $options[ 'admin_bar' ] = $_POST[ 'youtube_embed_admin_bar' ];
26
  $options[ 'profile_no' ] = $_POST[ 'youtube_embed_profile_no' ];
54
  $options[ 'privacy' ] = $_POST[ 'youtube_embed_privacy' ];
55
  $options[ 'frameborder' ] = $_POST[ 'youtube_embed_frameborder' ];
56
  $options[ 'widgets' ] = $_POST[ 'youtube_embed_widgets' ];
57
+ $options[ 'menu_access' ] = $_POST[ 'youtube_embed_menu_access' ];
58
+ $options[ 'shareasale_id' ] = $_POST[ 'youtube_embed_shareasale_id' ];
59
 
60
  // Update the options
61
 
77
  update_option( 'youtube_embed_editor_sc', $_POST[ 'youtube_embed_editor_sc' ] );
78
 
79
  $expiry = 2147483647; // January 2038 (maximum value to avoid the integer overflow of the 2038 bug)
80
+ setcookie( 'vye_mce_shortcode', $_POST[ 'youtube_embed_editor_sc' ], $expiry, vye_get_cookie_path() );
81
 
82
  // If the option to clear the cache has been ticked run an SQL to clear them down
83
 
92
 
93
  // Get options
94
 
95
+ $options = vye_set_general_defaults();
96
+ $shortcode = vye_set_shortcode_option();
97
+ $url = vye_set_url_option();
98
+ $editor_sc = vye_set_editor_sc();
 
 
 
 
99
  ?>
100
 
101
+ <p><?php _e( 'These are the general settings for Vixy YouTube Embed. Please select <a href="admin.php?page=profile-options">Profiles</a> for default embedding settings.', 'youtube-embed' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
102
 
103
+ <form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=general-options' ?>">
104
 
105
  <span class="yt_heading"><?php _e( 'Embedding', 'youtube-embed' ); ?></span>
106
 
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"'; } ?>/>&nbsp;<span class="description"><?php _e( 'Allow rich metadata to be added to code. <a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#Metadata">Learn more</a>', 'youtube-embed' ); ?></span></td>
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"'; } ?>/>&nbsp;<span class="description"><?php _e( 'Allow YouTube URLs in comments - will display as embedded videos. <a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#Videos-in-Comments">Learn more</a>', 'youtube-embed' ); ?></span></td>
116
  </tr>
117
 
118
  <tr>
119
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
120
  <td><select name="youtube_embed_comments_profile">
121
+ <?php vye_generate_profile_list( $options[ 'comments_profile' ], $options[ 'profile_no' ] ) ?>
122
  </select></td>
123
  </tr>
124
 
159
  <tr>
160
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
161
  <td><select name="youtube_embed_alt_profile">
162
+ <?php vye_generate_profile_list( $options[ 'alt_profile' ], $options[ 'profile_no' ] ) ?>
163
  </select></td>
164
  </tr>
165
 
171
  <tr>
172
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
173
  <td><select name="youtube_embed_alt_profile2">
174
+ <?php vye_generate_profile_list( $options[ 'alt_profile2' ], $options[ 'profile_no' ] ) ?>
175
  </select></td>
176
  </tr>
177
  </table>
178
 
179
+ <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 please <a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#Migration">click here</a>.', 'youtube-embed' ); ?>
180
 
181
  <table class="form-table">
182
  <tr>
192
  <tr>
193
  <th scope="row">&nbsp;&nbsp;&nbsp;&nbsp;<?php _e( 'Profile to use', 'youtube-embed' ); ?></th>
194
  <td><select name="youtube_embed_other_profile">
195
+ <?php vye_generate_profile_list( $options[ 'other_profile' ], $options[ 'profile_no' ] ) ?>
196
  </select>&nbsp;<span class="description"><?php _e( 'For above 2 options', 'youtube-embed' ); ?></span></td>
197
  </tr>
198
  </table>
216
  </tr>
217
 
218
  <tr>
219
+ <th scope="row"><?php _e( 'Menu Screen Access', 'youtube-embed' ); ?></th>
220
+ <td><select name="youtube_embed_menu_access">
221
+ <option value="list_users"<?php if ( $options[ 'menu_access' ] == "list_users" ) { echo " selected='selected'"; } ?>><?php _e ( 'Administrator', 'youtube-embed' ); ?></option>
222
+ <option value="edit_pages"<?php if ( $options[ 'menu_access' ] == "edit_pages" ) { echo " selected='selected'"; } ?>><?php _e ( 'Editor', 'youtube-embed' ); ?></option>
223
+ <option value="publish_posts"<?php if ( $options[ 'menu_access' ] == "publish_posts" ) { echo " selected='selected'"; } ?>><?php _e ( 'Author', 'youtube-embed' ); ?></option>
224
+ <option value="edit_posts"<?php if ( $options[ 'menu_access' ] == "edit_posts" ) { echo " selected='selected'"; } ?>><?php _e ( 'Contributor', 'youtube-embed' ); ?></option>
225
+ </select>&nbsp;<span class="description"><?php _e( 'Specify the user access required for the menu screens', 'youtube-embed' ); ?></span></td>
 
 
 
 
 
 
 
 
 
 
226
  </tr>
227
  </table>
228
 
318
  <td><input type="checkbox" name="youtube_embed_frameborder" value="1"<?php if ( $options[ 'frameborder' ] == '1' ) { echo ' checked="checked"'; } ?>/>&nbsp;<span class="description"><?php _e( 'FRAMEBORDER is not HTML5 compliant', 'youtube-embed' ); ?></span></td>
319
  </tr></table>
320
 
321
+ <br/><span class="yt_heading"><?php _e( 'Affiliates', 'youtube-embed' ); ?></span>
322
+ <table class="form-table"><tr>
323
+ <th scope="row"><?php _e( 'ShareASale ID', 'youtube-embed' ); ?></th>
324
+ <td><input type="text" maxlength="6" size="6" name="youtube_embed_shareasale_id" value="<?php echo $options[ 'shareasale_id' ]; ?>"/>&nbsp;<span class="description"><?php _e( '<a href="http://www.shareasale.com/r.cfm?B=44&U=668714&M=47&urllink=">Sign up to ShareASale</a> and earn money. <a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#Make-Money-from-Vixy-YouTube-Embed">Read more</a>.', 'youtube-embed' ); ?></span></td>
325
+ </tr></table>
326
+
327
  <?php wp_nonce_field( 'youtube-embed-general','youtube_embed_general_nonce', true, true ); ?>
328
 
329
  <p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings', 'youtube-embed' ); ?>"/></p>
includes/{aye-options-lists.php → options-lists.php} RENAMED
@@ -4,15 +4,17 @@
4
  *
5
  * Screen for specifying different lists and the video IDs within them
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
  ?>
11
  <div class="wrap" style="width: 1010px;">
12
 
13
- <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
14
 
15
- <h2><?php _e( 'Artiss YouTube Embed Lists', 'youtube-embed' ); ?></h2>
 
 
16
 
17
  <?php
18
  // Set current list number
@@ -37,10 +39,10 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-g
37
  // Loop through the video IDs
38
  while ( $loop < count( $id_array ) ) {
39
  // Extract the ID from the provided data
40
- $id = trim( aye_extract_id( $id_array[ $loop ] ) );
41
  // Now check its validity
42
  if ( $id != '' ) {
43
- $video_info = aye_validate_id( $id, true );
44
  if ( $video_info[ 'type' ] != 'v' ) { $valid = false; }
45
  $new_id_list .= $id . "\n";
46
  }
@@ -70,17 +72,11 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-g
70
  }
71
 
72
  // Fetch options into an array
73
- if ( $class != "error" ) { $options = aye_set_list_defaults( $list_no ); }
74
- $general = aye_set_general_defaults();
75
-
76
- // Display ads
77
-
78
- if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
79
  ?>
80
 
81
- <div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
82
-
83
- <form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-list-options'; ?>">
84
 
85
  <span class="alignright">
86
  <select name="youtube_embed_list_no">
@@ -140,12 +136,12 @@ if ( $options[ 'list' ] != '' ) {
140
 
141
  // Extract the ID from the provided data
142
 
143
- $id = trim( aye_extract_id( $id_array[ $loop ] ) );
144
  if ( $id != '' ) {
145
 
146
  // Validate the video type
147
 
148
- $video_info = aye_validate_id( $id, true );
149
  $type = $video_info[ 'type' ];
150
 
151
  if ( $type == 'p' ) {
4
  *
5
  * Screen for specifying different lists and the video IDs within them
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
  ?>
11
  <div class="wrap" style="width: 1010px;">
12
 
13
+ <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/admin_screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
14
 
15
+ <h2><?php _e( 'Vixy YouTube Embed Lists', 'youtube-embed' ); ?></h2>
16
+
17
+ <p><a target="_blank" href="http://www.shareasale.com/r.cfm?b=146096&u=668714&m=10638&urllink=&afftrack="><img src="http://www.shareasale.com/image/RCAT1-728x90.gif" /></a></p>
18
 
19
  <?php
20
  // Set current list number
39
  // Loop through the video IDs
40
  while ( $loop < count( $id_array ) ) {
41
  // Extract the ID from the provided data
42
+ $id = trim( vye_extract_id( $id_array[ $loop ] ) );
43
  // Now check its validity
44
  if ( $id != '' ) {
45
+ $video_info = vye_validate_id( $id, true );
46
  if ( $video_info[ 'type' ] != 'v' ) { $valid = false; }
47
  $new_id_list .= $id . "\n";
48
  }
72
  }
73
 
74
  // Fetch options into an array
75
+ if ( $class != "error" ) { $options = vye_set_list_defaults( $list_no ); }
76
+ $general = vye_set_general_defaults();
 
 
 
 
77
  ?>
78
 
79
+ <form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=list-options'; ?>">
 
 
80
 
81
  <span class="alignright">
82
  <select name="youtube_embed_list_no">
136
 
137
  // Extract the ID from the provided data
138
 
139
+ $id = trim( vye_extract_id( $id_array[ $loop ] ) );
140
  if ( $id != '' ) {
141
 
142
  // Validate the video type
143
 
144
+ $video_info = vye_validate_id( $id, true );
145
  $type = $video_info[ 'type' ];
146
 
147
  if ( $type == 'p' ) {
includes/{aye-options-profiles.php → options-profiles.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Screen for specifying different profiles and settings the options for each
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
  ?>
@@ -12,9 +12,11 @@
12
 
13
  <div style="width: 1010px;">
14
 
15
- <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
16
 
17
- <h2><?php _e( 'Artiss YouTube Embed Profiles', 'youtube-embed' ); ?></h2>
 
 
18
 
19
  <?php
20
 
@@ -61,9 +63,8 @@ if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-p
61
  $options[ 'modest' ] = $_POST[ 'youtube_embed_modest' ];
62
  $options[ 'dynamic' ] = $_POST[ 'youtube_embed_dynamic' ];
63
  $options[ 'fixed' ] = $_POST[ 'youtube_embed_fixed' ];
64
- $options[ 'download' ] = $_POST[ 'youtube_embed_download' ];
65
  $options[ 'download_style' ] = $_POST[ 'youtube_embed_download_style' ];
66
- $options[ 'download_text' ] = str_replace( '\"', '"', str_replace( "\'", "'", $_POST[ 'youtube_embed_download_text' ] ) );
67
 
68
  $default_size = $_POST[ 'youtube_embed_size' ];
69
 
@@ -101,21 +102,15 @@ if ( !empty( $_POST[ 'Video' ] ) ) { $video_type = $_POST[ 'youtube_embed_video_
101
 
102
  // Fetch options into an array
103
 
104
- $options = aye_set_profile_defaults( $profile_no );
105
- $general = aye_set_general_defaults();
106
-
107
- // Display ads
108
-
109
- if ( $general[ 'donated'] != 1 ) { artiss_plugin_ads( 'youtube-embed', 990 ); }
110
  ?>
111
 
112
- <div class="updated fade"><p>Have you voted for which features of YouTube Embed you'd like to retain in version 3? <a href="http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote" target="_new">Click here</a> to vote!</p></div>
113
-
114
- <form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=aye-profile-options' ?>">
115
 
116
  <span class="alignright">
117
  <select name="youtube_embed_profile_no">
118
- <?php aye_generate_profile_list( $profile_no, $general[ 'profile_no' ] ) ?>
119
  </select>
120
  <input type="submit" name="Profile" class="button-secondary" value="<?php _e( 'Change profile', 'youtube-embed' ); ?>"/>
121
  </span><br/>
@@ -142,8 +137,8 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
142
  <td><span class="description"><?php _e( 'The type of player to use for videos.', 'youtube-embed' ); ?></span><br/>
143
  <input type="radio" name="youtube_embed_type" value="v"<?php if ( $options[ 'type' ] == "v" ) { echo ' checked="checked"'; } ?>/><?php echo '&nbsp;' . __( 'IFRAME', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( 'Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 player. This is the current YouTube default.', 'youtube-embed' ); ?></span><br/>
144
  <input type="radio" name="youtube_embed_type" value="p"<?php if ( $options[ 'type' ] == "p" ) { echo ' checked="checked"'; } ?>/><?php echo '&nbsp;' . __( 'OBJECT', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( 'Use the AS3 Flash player.', 'youtube-embed' ); ?></span><br/>
145
- <input type="radio" name="youtube_embed_type" value="c"<?php if ( $options[ 'type' ] == "c" ) { echo ' checked="checked"'; } ?>/><?php echo '&nbsp;' . __( 'Chromeless', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( 'Use the <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-chromeless">Chromeless</a> version of the AS3 Flash Player.', 'youtube-embed' ); ?></span><br/>
146
- <input type="radio" name="youtube_embed_type" value="m"<?php if ( $options[ 'type' ] == "m" ) { echo ' checked="checked"'; } ?>/><?php echo '&nbsp;' . __( 'EmbedPlus', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( 'Use <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus">EmbedPlus</a>, if Flash is available.', 'youtube-embed' ); ?></span>
147
  </td>
148
  </tr>
149
 
@@ -172,18 +167,13 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
172
 
173
  <table class="form-table ytbox_grey">
174
  <tr>
175
- <th scope="row"><?php _e( 'Show Download Link', 'youtube-embed' ); ?></th>
176
- <td><input type="checkbox" name="youtube_embed_download" value="1"<?php if ( $options[ 'download' ] == "1" ) { echo ' checked="checked"'; } ?>/>&nbsp;<span class="description"><?php echo sprintf( __( 'Show a link to %s under the video', 'youtube-embed' ), '<a href="http://www.videodownloadx.com/">Videodownloadx</a>' ); ?></span></td>
177
  </tr>
178
 
179
  <tr>
180
- <th scope="row"><?php _e( 'Download Text', 'youtube-embed' ); ?></th>
181
- <td><input type="text" size="40" name="youtube_embed_download_text" value="<?php echo htmlspecialchars( $options[ 'download_text' ] ); ?>"/>&nbsp;<span class="description"><?php _e( 'Text or HTML to display to prompt download', 'youtube-embed' ); ?></span></td>
182
- </tr>
183
-
184
- <tr>
185
- <th scope="row"><?php _e( 'Download Style', 'youtube-embed' ); ?></th>
186
- <td><input type="text" size="40" name="youtube_embed_download_style" value="<?php echo htmlspecialchars( $options[ 'download_style' ] ); ?>"/>&nbsp;<span class="description"><?php _e( 'CSS elements to apply to video download link', 'youtube-embed' ); ?></span></td>
187
  </tr>
188
  </table><br/>
189
 
@@ -340,7 +330,7 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
340
 
341
  </table>
342
 
343
- <br/><span class="yt_heading"><?php _e( 'Options Only Supported By EmbedPlus', 'youtube-embed' ); ?></span>&nbsp;&nbsp;<span class="description"><?php echo '<a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus">' . __( 'Learn more about EmbedPlus', 'youtube-embed' ) . '</a>'; ?></span>
344
 
345
  <table class="form-table">
346
  <tr valign="top">
@@ -372,12 +362,10 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
372
 
373
  </form>
374
 
375
- <div class="updated fade"><p><strong><?php _e( 'Would you like the video below to be yours? <a href="http://www.artiss.co.uk/youtube-embed/further-help#ye-sponsorship">Click here</a> for sponsorship information.', 'youtube-embed' ); ?></strong></p></div>
376
-
377
  </div>
378
 
379
  <a href="#" name="video"></a>
380
- <form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=aye-profile-options#video' ?>">
381
  <div class="ytbox_grey">
382
  <h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
383
  <p><?php _e( 'The video below uses the above, saved profile settings. Use the drop-down below to change which parameters the video uses - press the Change Video button to update it.', 'youtube-embed' ); ?></p>
@@ -391,11 +379,11 @@ echo ' ' . __( 'Use the drop-down on the right hand side to swap between profile
391
  <input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video', 'youtube-embed' ); ?>"/></p>
392
 
393
  <p><?php
394
- if ( $video_type == "d" ) { $id = 'Vlw7tM7UySk'; $type = ''; }
395
  if ( $video_type == "p" ) { $id = 'YVvn8dpSAt0'; $type = 'm'; }
396
  if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; $type = ''; ; }
397
  if ( $video_type == "l" ) { $id = '095393D5B42B2266'; $type = ''; }
398
- echo aye_generate_youtube_code( $id, $type, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $profile_no );
399
  ?></p>
400
  </div>
401
 
4
  *
5
  * Screen for specifying different profiles and settings the options for each
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
  ?>
12
 
13
  <div style="width: 1010px;">
14
 
15
+ <div class="icon32"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/admin_screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
16
 
17
+ <h2><?php _e( 'Vixy YouTube Embed Profiles', 'youtube-embed' ); ?></h2>
18
+
19
+ <p><a target="_blank" href="http://www.shareasale.com/r.cfm?b=146096&u=668714&m=10638&urllink=&afftrack="><img src="http://www.shareasale.com/image/RCAT1-728x90.gif" /></a></p>
20
 
21
  <?php
22
 
63
  $options[ 'modest' ] = $_POST[ 'youtube_embed_modest' ];
64
  $options[ 'dynamic' ] = $_POST[ 'youtube_embed_dynamic' ];
65
  $options[ 'fixed' ] = $_POST[ 'youtube_embed_fixed' ];
66
+ $options[ 'vixy_download' ] = $_POST[ 'youtube_embed_download' ];
67
  $options[ 'download_style' ] = $_POST[ 'youtube_embed_download_style' ];
 
68
 
69
  $default_size = $_POST[ 'youtube_embed_size' ];
70
 
102
 
103
  // Fetch options into an array
104
 
105
+ $options = vye_set_profile_defaults( $profile_no );
106
+ $general = vye_set_general_defaults();
 
 
 
 
107
  ?>
108
 
109
+ <form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=profile-options' ?>">
 
 
110
 
111
  <span class="alignright">
112
  <select name="youtube_embed_profile_no">
113
+ <?php vye_generate_profile_list( $profile_no, $general[ 'profile_no' ] ) ?>
114
  </select>
115
  <input type="submit" name="Profile" class="button-secondary" value="<?php _e( 'Change profile', 'youtube-embed' ); ?>"/>
116
  </span><br/>
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 '&nbsp;' . __( 'IFRAME', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( '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 '&nbsp;' . __( 'OBJECT', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( '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 '&nbsp;' . __( 'Chromeless', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( 'Use the <a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#The-Chromeless-Player">Chromeless</a> version of the AS3 Flash Player.', 'youtube-embed' ); ?></span><br/>
141
+ <input type="radio" name="youtube_embed_type" value="m"<?php if ( $options[ 'type' ] == "m" ) { echo ' checked="checked"'; } ?>/><?php echo '&nbsp;' . __( 'EmbedPlus', 'youtube-embed' ); ?><span class="description"><?php echo '&nbsp;' . __( 'Use <a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#EmbedPlus">EmbedPlus</a>, if Flash is available.', 'youtube-embed' ); ?></span>
142
  </td>
143
  </tr>
144
 
167
 
168
  <table class="form-table ytbox_grey">
169
  <tr>
170
+ <th scope="row"><?php _e( 'Show Download Bar', 'youtube-embed' ); ?></th>
171
+ <td><input type="checkbox" name="youtube_embed_download" value="1"<?php if ( $options[ 'vixy_download' ] == "1" ) { echo ' checked="checked"'; } ?>/>&nbsp;<span class="description"><?php echo __( 'Show a download bar under the video', 'youtube-embed' ); ?></span></td>
172
  </tr>
173
 
174
  <tr>
175
+ <th scope="row"><?php _e( 'Bar Style', 'youtube-embed' ); ?></th>
176
+ <td><input type="text" size="40" name="youtube_embed_download_style" value="<?php echo htmlspecialchars( $options[ 'download_style' ] ); ?>"/>&nbsp;<span class="description"><?php _e( 'CSS elements to apply to video download bar', 'youtube-embed' ); ?></span></td>
 
 
 
 
 
177
  </tr>
178
  </table><br/>
179
 
330
 
331
  </table>
332
 
333
+ <br/><span class="yt_heading"><?php _e( 'Options Only Supported By EmbedPlus', 'youtube-embed' ); ?></span>&nbsp;&nbsp;<span class="description"><?php echo '<a href="http://wordpress.org/extend/plugins/youtube-embed/other_notes#EmbedPlus">' . __( 'Learn more about EmbedPlus', 'youtube-embed' ) . '</a>'; ?></span>
334
 
335
  <table class="form-table">
336
  <tr valign="top">
362
 
363
  </form>
364
 
 
 
365
  </div>
366
 
367
  <a href="#" name="video"></a>
368
+ <form method="post" action="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=profile-options#video' ?>">
369
  <div class="ytbox_grey">
370
  <h3><?php _e( 'YouTube Video Sample', 'youtube-embed' ); ?></h3>
371
  <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>
379
  <input type="submit" name="Video" class="button-secondary" value="<?php _e( 'Change video', 'youtube-embed' ); ?>"/></p>
380
 
381
  <p><?php
382
+ if ( $video_type == "d" ) { $id = 'Y7ny1YdTShg'; $type = ''; }
383
  if ( $video_type == "p" ) { $id = 'YVvn8dpSAt0'; $type = 'm'; }
384
  if ( $video_type == "3" ) { $id = 'NR5UoBY87GM'; $type = ''; ; }
385
  if ( $video_type == "l" ) { $id = '095393D5B42B2266'; $type = ''; }
386
+ echo vye_generate_youtube_code( $id, $type, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $profile_no );
387
  ?></p>
388
  </div>
389
 
includes/{aye-options-widgets.php → options-widgets.php} RENAMED
@@ -4,7 +4,7 @@
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
 
9
  // Widget Title field
10
 
@@ -39,7 +39,7 @@ echo "</table>\n";
39
  $field_id = $this -> get_field_id( 'profile' );
40
  $field_name = $this -> get_field_name( 'profile' );
41
  echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Profile', 'youtube-embed' ) . ': </label><select name="' . $field_name . '" class="widefat" id="' . $field_id . '">';
42
- aye_generate_profile_list( attribute_escape( $instance[ 'profile' ] ), $general[ 'profile_no' ] );
43
  echo '</select></p>';
44
 
45
  // Template
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 = vye_set_general_defaults();
8
 
9
  // Widget Title field
10
 
39
  $field_id = $this -> get_field_id( 'profile' );
40
  $field_name = $this -> get_field_name( 'profile' );
41
  echo "\r\n" . '<p><label for="' . $field_id . '">' . __( 'Profile', 'youtube-embed' ) . ': </label><select name="' . $field_name . '" class="widefat" id="' . $field_id . '">';
42
+ vye_generate_profile_list( attribute_escape( $instance[ 'profile' ] ), $general[ 'profile_no' ] );
43
  echo '</select></p>';
44
 
45
  // Template
includes/{aye-set-defaults.php → set-defaults.php} RENAMED
@@ -4,15 +4,7 @@
4
  *
5
  * Set up default values for the various options
6
  *
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
  /**
@@ -25,7 +17,7 @@
25
  * @return string Alternative Shortcode
26
  */
27
 
28
- function aye_set_shortcode_option() {
29
 
30
  $shortcode = get_option( 'youtube_embed_shortcode' );
31
 
@@ -50,7 +42,7 @@ function aye_set_shortcode_option() {
50
  * @return string URL override
51
  */
52
 
53
- function aye_set_url_option() {
54
 
55
  $url = get_option( 'youtube_embed_url' );
56
 
@@ -72,7 +64,7 @@ function aye_set_url_option() {
72
  * @return string Editor shortcode
73
  */
74
 
75
- function aye_set_editor_sc() {
76
 
77
  $editor_sc = get_option( 'youtube_embed_editor_sc' );
78
 
@@ -96,7 +88,7 @@ function aye_set_editor_sc() {
96
  * @return strings Options array
97
  */
98
 
99
- function aye_set_general_defaults() {
100
 
101
  $options = get_option( 'youtube_embed_general' );
102
  $changed = false;
@@ -124,7 +116,6 @@ function aye_set_general_defaults() {
124
 
125
  // Because of upgrading, check each option - if not set, apply default
126
 
127
- if ( !array_key_exists( 'donated', $options ) ) { $options[ 'donated' ] = ''; $changed = true; }
128
  if ( !array_key_exists( 'editor_button', $options ) ) { $options[ 'editor_button' ] = 1; $changed = true; }
129
  if ( !array_key_exists( 'admin_bar', $options ) ) { $options[ 'admin_bar' ] = 1; $changed = true; }
130
  if ( !array_key_exists( 'profile_no', $options ) ) { $options[ 'profile_no' ] = 5; $changed = true; }
@@ -147,8 +138,7 @@ function aye_set_general_defaults() {
147
  if ( !array_key_exists( 'privacy', $options ) ) { $options[ 'privacy' ] = 0; $changed = true; }
148
  if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
149
  if ( !array_key_exists( 'widgets', $options ) ) { $options[ 'widgets' ] = 0; $changed = true; }
150
- if ( !array_key_exists( 'profile_access', $options ) ) { $options[ 'profile_access' ] = 'delete_plugins'; $changed = true; }
151
- if ( !array_key_exists( 'list_access', $options ) ) { $options[ 'list_access' ] = 'delete_plugins'; $changed = true; }
152
 
153
  // Update the options, if changed, and return the result
154
 
@@ -168,7 +158,7 @@ function aye_set_general_defaults() {
168
  * @return string Options array
169
  */
170
 
171
- function aye_set_profile_defaults( $profile ) {
172
 
173
  if ( $profile == 0 ) {
174
  $profname = 'Default';
@@ -239,9 +229,8 @@ function aye_set_profile_defaults( $profile ) {
239
  if ( !array_key_exists( 'modest', $options ) ) { $options[ 'modest' ] = 1; $changed = true; }
240
  if ( !array_key_exists( 'dynamic', $options ) ) { $options[ 'dynamic' ] = ''; $changed = true; }
241
  if ( !array_key_exists( 'fixed', $options ) ) { $options[ 'fixed' ] = ''; $changed = true; }
242
- if ( !array_key_exists( 'download', $options ) ) { $options[ 'download' ] = ''; $changed = true; }
243
  if ( !array_key_exists( 'download_style', $options ) ) { $options[ 'download_style' ] = ''; $changed = true; }
244
- if ( !array_key_exists( 'download_text', $options ) ) { $options[ 'download_text' ] = 'Click here to download the video'; $changed = true; }
245
 
246
  // Update the options, if changed, and return the result
247
 
@@ -266,7 +255,7 @@ function aye_set_profile_defaults( $profile ) {
266
  * @return string Options array
267
  */
268
 
269
- function aye_set_list_defaults( $list ) {
270
  $options = get_option( 'youtube_embed_list' . $list );
271
  $changed = false;
272
 
4
  *
5
  * Set up default values for the various options
6
  *
7
+ * @package YouTube-Embed
 
 
 
 
 
 
 
 
8
  */
9
 
10
  /**
17
  * @return string Alternative Shortcode
18
  */
19
 
20
+ function vye_set_shortcode_option() {
21
 
22
  $shortcode = get_option( 'youtube_embed_shortcode' );
23
 
42
  * @return string URL override
43
  */
44
 
45
+ function vye_set_url_option() {
46
 
47
  $url = get_option( 'youtube_embed_url' );
48
 
64
  * @return string Editor shortcode
65
  */
66
 
67
+ function vye_set_editor_sc() {
68
 
69
  $editor_sc = get_option( 'youtube_embed_editor_sc' );
70
 
88
  * @return strings Options array
89
  */
90
 
91
+ function vye_set_general_defaults() {
92
 
93
  $options = get_option( 'youtube_embed_general' );
94
  $changed = false;
116
 
117
  // Because of upgrading, check each option - if not set, apply default
118
 
 
119
  if ( !array_key_exists( 'editor_button', $options ) ) { $options[ 'editor_button' ] = 1; $changed = true; }
120
  if ( !array_key_exists( 'admin_bar', $options ) ) { $options[ 'admin_bar' ] = 1; $changed = true; }
121
  if ( !array_key_exists( 'profile_no', $options ) ) { $options[ 'profile_no' ] = 5; $changed = true; }
138
  if ( !array_key_exists( 'privacy', $options ) ) { $options[ 'privacy' ] = 0; $changed = true; }
139
  if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
140
  if ( !array_key_exists( 'widgets', $options ) ) { $options[ 'widgets' ] = 0; $changed = true; }
141
+ if ( !array_key_exists( 'menu_access', $options ) ) { $options[ 'menu_access' ] = 'list_users'; $changed = true; }
 
142
 
143
  // Update the options, if changed, and return the result
144
 
158
  * @return string Options array
159
  */
160
 
161
+ function vye_set_profile_defaults( $profile ) {
162
 
163
  if ( $profile == 0 ) {
164
  $profname = 'Default';
229
  if ( !array_key_exists( 'modest', $options ) ) { $options[ 'modest' ] = 1; $changed = true; }
230
  if ( !array_key_exists( 'dynamic', $options ) ) { $options[ 'dynamic' ] = ''; $changed = true; }
231
  if ( !array_key_exists( 'fixed', $options ) ) { $options[ 'fixed' ] = ''; $changed = true; }
232
+ if ( !array_key_exists( 'vixy_download', $options ) ) { $options[ 'vixy_download' ] = 1; $changed = true; }
233
  if ( !array_key_exists( 'download_style', $options ) ) { $options[ 'download_style' ] = ''; $changed = true; }
 
234
 
235
  // Update the options, if changed, and return the result
236
 
255
  * @return string Options array
256
  */
257
 
258
+ function vye_set_list_defaults( $list ) {
259
  $options = get_option( 'youtube_embed_list' . $list );
260
  $changed = false;
261
 
includes/{aye-shared-functions.php → shared-functions.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Small utilities shared by a number of other functions
6
  *
7
- * @package Artiss-YouTube-Embed
8
  */
9
 
10
  /**
@@ -18,7 +18,7 @@
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; }
@@ -42,7 +42,7 @@ function aye_do_not_track() { // 1.0
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
 
@@ -71,7 +71,7 @@ function aye_get_cookie_path() {
71
  * @return string Parameter value (if found)
72
  */
73
 
74
- function aye_get_parameters( $input, $para ) {
75
 
76
  $start = strpos( strtolower( $input ), $para . '=' );
77
  $content = '';
@@ -97,7 +97,7 @@ function aye_get_parameters( $input, $para ) {
97
  * @return string Extracted ID
98
  */
99
 
100
- function aye_extract_id( $id ) {
101
 
102
  // Convert and trim video ID characters
103
 
@@ -169,26 +169,26 @@ function aye_extract_id( $id ) {
169
  *
170
  * @since 2.0
171
  *
172
- * @uses aye_set_general_defaults Get the default settings
173
  *
174
  * @param string $id Video ID
175
  * @param string $title_needed Whether the title requires extracting
176
  * @return string Array containing file details
177
  */
178
 
179
- function aye_validate_id( $id, $title_needed = false ) {
180
 
181
  $type = false;
182
  $title = false;
183
  $options = false;
184
 
185
- $options = aye_set_general_defaults();
186
 
187
  // Attempt to get the video type and title from cache
188
 
189
  if ( $options[ 'info_cache' ] != 0 ) {
190
- $type = get_transient( 'aye_type_' . $id );
191
- $title = get_transient( 'aye_title_' . $id );
192
  }
193
 
194
  // Check if items are cached
@@ -208,14 +208,14 @@ function aye_validate_id( $id, $title_needed = false ) {
208
 
209
  // Check with YouTube API as to whether the ID is a video
210
 
211
- $id_check = aye_get_file( 'http' . $https . '://gdata.youtube.com/feeds/api/videos/' . $id . '?v=2', false );
212
  if ( $id_check[ 'rc' ] == 0 ) {
213
  if ( $id_check[ 'response' ] != 200 ) {
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 ) {
221
  $type = '';
@@ -256,7 +256,7 @@ function aye_validate_id( $id, $title_needed = false ) {
256
 
257
  // Update the cache
258
 
259
- set_transient( 'aye_type_' . $id, $type, $options[ 'info_cache' ] * 3600 );
260
 
261
  // If the video is valid extract the title from the XML
262
 
@@ -274,7 +274,7 @@ function aye_validate_id( $id, $title_needed = false ) {
274
 
275
  // Update the cache
276
 
277
- set_transient( 'aye_title_' . $id, $title, $options[ 'info_cache' ] * 3600 );
278
  }
279
  }
280
 
@@ -296,7 +296,7 @@ function aye_validate_id( $id, $title_needed = false ) {
296
  * @return string Error output
297
  */
298
 
299
- function aye_error( $errorin ) {
300
 
301
  return '<p style="color: #f00; font-weight: bold;">Artiss YouTube Embed: ' . $errorin . "</p>\n";
302
 
@@ -309,15 +309,15 @@ function aye_error( $errorin ) {
309
  *
310
  * @since 2.0
311
  *
312
- * @uses aye_yes_or_no Convert input to a true or false equivalent
313
  *
314
  * @param string $input Input, usually Yes or No
315
  * @return string 1, 0 or blank, depending on input
316
  */
317
 
318
- function aye_convert( $input ) {
319
 
320
- $input = aye_yes_or_no( $input );
321
  $output = '';
322
  if ( $input === true ) { $output = '1'; }
323
  if ( $input === false ) { $output = '0'; }
@@ -332,15 +332,15 @@ function aye_convert( $input ) {
332
  *
333
  * @since 2.0
334
  *
335
- * @uses aye_yes_or_no Convert input to a true or false equivalent
336
  *
337
  * @param string $input Input, usually Yes or No
338
  * @return string 1, 3 or blank, depending on input
339
  */
340
 
341
- function aye_convert_3( $input ) {
342
 
343
- $input = aye_yes_or_no( $input );
344
  $output = '';
345
  if ( $input === true ) { $output = '1'; }
346
  if ( $input === false ) { $output = '3'; }
@@ -360,7 +360,7 @@ function aye_convert_3( $input ) {
360
  * @return string Blank string or boolean true, false
361
  */
362
 
363
- function aye_yes_or_no( $input = '' ) {
364
 
365
  $input = strtolower( $input );
366
  if ( ( $input === true ) or ( $input == 'true' ) or ( $input == '1' ) or ( $input == 'yes' ) or ( $input == 'on' ) ) { return true; }
@@ -382,7 +382,7 @@ function aye_yes_or_no( $input = '' ) {
382
  * @return string Array containing file contents and response
383
  */
384
 
385
- function aye_get_file( $filein, $header = false ) {
386
 
387
  $rc = 0;
388
  $error = '';
@@ -422,16 +422,16 @@ function aye_get_file( $filein, $header = false ) {
422
  *
423
  * @since 2.0
424
  *
425
- * @uses aye_convert Convert value to a 0 or 1 equivalent
426
  *
427
  * @param string $type Current embed type
428
  * @param string $embedplus Whether EmbedPlus embedding is required
429
  * @return string The type of embedding to use
430
  */
431
 
432
- function aye_get_embed_type( $type, $embedplus ) {
433
 
434
- $embedplus = aye_convert( $embedplus );
435
  $type = strtolower( $type );
436
 
437
  if ( ( $type == 'embedplus' ) or ( $embedplus == '1' ) ) { $type = 'm'; }
@@ -453,7 +453,7 @@ function aye_get_embed_type( $type, $embedplus ) {
453
  * @return string Autohide numeric equivalent
454
  */
455
 
456
- function aye_set_autohide( $autohide ) {
457
 
458
  $autohide = strtolower( $autohide );
459
  if ( $autohide == 'no' ) { $autohide = '0'; }
@@ -474,7 +474,7 @@ function aye_set_autohide( $autohide ) {
474
  * @param string $total The total number of profiles
475
  */
476
 
477
- function aye_generate_profile_list( $current, $total ) {
478
 
479
  echo '<option value="0"';
480
  if ( $current == "0" ) { echo " selected='selected'"; }
4
  *
5
  * Small utilities shared by a number of other functions
6
  *
7
+ * @package YouTube-Embed
8
  */
9
 
10
  /**
18
  * @return string True or false
19
  */
20
 
21
+ function vye_do_not_track() { // 1.0
22
 
23
  if ( isset( $_SERVER[ 'HTTP_DNT' ] ) ) {
24
  if ( $_SERVER[ 'HTTP_DNT' ] == 1 ) { return true; }
42
  * @return string Cookie path
43
  */
44
 
45
+ function vye_get_cookie_path() {
46
 
47
  // Remove the http:// from the beginning of the site URL
48
 
71
  * @return string Parameter value (if found)
72
  */
73
 
74
+ function vye_get_parameters( $input, $para ) {
75
 
76
  $start = strpos( strtolower( $input ), $para . '=' );
77
  $content = '';
97
  * @return string Extracted ID
98
  */
99
 
100
+ function vye_extract_id( $id ) {
101
 
102
  // Convert and trim video ID characters
103
 
169
  *
170
  * @since 2.0
171
  *
172
+ * @uses vye_set_general_defaults Get the default settings
173
  *
174
  * @param string $id Video ID
175
  * @param string $title_needed Whether the title requires extracting
176
  * @return string Array containing file details
177
  */
178
 
179
+ function vye_validate_id( $id, $title_needed = false ) {
180
 
181
  $type = false;
182
  $title = false;
183
  $options = false;
184
 
185
+ $options = vye_set_general_defaults();
186
 
187
  // Attempt to get the video type and title from cache
188
 
189
  if ( $options[ 'info_cache' ] != 0 ) {
190
+ $type = get_transient( 'vye_type_' . $id );
191
+ $title = get_transient( 'vye_title_' . $id );
192
  }
193
 
194
  // Check if items are cached
208
 
209
  // Check with YouTube API as to whether the ID is a video
210
 
211
+ $id_check = vye_get_file( 'http' . $https . '://gdata.youtube.com/feeds/api/videos/' . $id . '?v=2', false );
212
  if ( $id_check[ 'rc' ] == 0 ) {
213
  if ( $id_check[ 'response' ] != 200 ) {
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 = vye_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 ) {
221
  $type = '';
256
 
257
  // Update the cache
258
 
259
+ set_transient( 'vye_type_' . $id, $type, $options[ 'info_cache' ] * 3600 );
260
 
261
  // If the video is valid extract the title from the XML
262
 
274
 
275
  // Update the cache
276
 
277
+ set_transient( 'vye_title_' . $id, $title, $options[ 'info_cache' ] * 3600 );
278
  }
279
  }
280
 
296
  * @return string Error output
297
  */
298
 
299
+ function vye_error( $errorin ) {
300
 
301
  return '<p style="color: #f00; font-weight: bold;">Artiss YouTube Embed: ' . $errorin . "</p>\n";
302
 
309
  *
310
  * @since 2.0
311
  *
312
+ * @uses vye_yes_or_no Convert input to a true or false equivalent
313
  *
314
  * @param string $input Input, usually Yes or No
315
  * @return string 1, 0 or blank, depending on input
316
  */
317
 
318
+ function vye_convert( $input ) {
319
 
320
+ $input = vye_yes_or_no( $input );
321
  $output = '';
322
  if ( $input === true ) { $output = '1'; }
323
  if ( $input === false ) { $output = '0'; }
332
  *
333
  * @since 2.0
334
  *
335
+ * @uses vye_yes_or_no Convert input to a true or false equivalent
336
  *
337
  * @param string $input Input, usually Yes or No
338
  * @return string 1, 3 or blank, depending on input
339
  */
340
 
341
+ function vye_convert_3( $input ) {
342
 
343
+ $input = vye_yes_or_no( $input );
344
  $output = '';
345
  if ( $input === true ) { $output = '1'; }
346
  if ( $input === false ) { $output = '3'; }
360
  * @return string Blank string or boolean true, false
361
  */
362
 
363
+ function vye_yes_or_no( $input = '' ) {
364
 
365
  $input = strtolower( $input );
366
  if ( ( $input === true ) or ( $input == 'true' ) or ( $input == '1' ) or ( $input == 'yes' ) or ( $input == 'on' ) ) { return true; }
382
  * @return string Array containing file contents and response
383
  */
384
 
385
+ function vye_get_file( $filein, $header = false ) {
386
 
387
  $rc = 0;
388
  $error = '';
422
  *
423
  * @since 2.0
424
  *
425
+ * @uses vye_convert Convert value to a 0 or 1 equivalent
426
  *
427
  * @param string $type Current embed type
428
  * @param string $embedplus Whether EmbedPlus embedding is required
429
  * @return string The type of embedding to use
430
  */
431
 
432
+ function vye_get_embed_type( $type, $embedplus ) {
433
 
434
+ $embedplus = vye_convert( $embedplus );
435
  $type = strtolower( $type );
436
 
437
  if ( ( $type == 'embedplus' ) or ( $embedplus == '1' ) ) { $type = 'm'; }
453
  * @return string Autohide numeric equivalent
454
  */
455
 
456
+ function vye_set_autohide( $autohide ) {
457
 
458
  $autohide = strtolower( $autohide );
459
  if ( $autohide == 'no' ) { $autohide = '0'; }
474
  * @param string $total The total number of profiles
475
  */
476
 
477
+ function vye_generate_profile_list( $current, $total ) {
478
 
479
  echo '<option value="0"';
480
  if ( $current == "0" ) { echo " selected='selected'"; }
includes/{aye-shortcodes.php → shortcodes.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Define the various shortcodes
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
 
@@ -15,18 +15,18 @@
15
  *
16
  * @since 2.0
17
  *
18
- * @uses aye_video_shortcode Action the shortcode parameters
19
  *
20
  * @param string $paras Shortcode parameters
21
  * @param string $content Shortcode content
22
  * @return string YouTube embed code
23
  */
24
 
25
- function aye_video_shortcode_default( $paras = '', $content = '' ) {
26
- return do_shortcode( aye_video_shortcode( $paras, $content ) );
27
  }
28
 
29
- add_shortcode( 'youtube', 'aye_video_shortcode_default' );
30
 
31
  /**
32
  * Alternative Video shortcode 1
@@ -35,18 +35,18 @@ add_shortcode( 'youtube', 'aye_video_shortcode_default' );
35
  *
36
  * @since 2.0
37
  *
38
- * @uses aye_video_shortcode Action the shortcode parameters
39
  *
40
  * @param string $paras Shortcode parameters
41
  * @param string $content Shortcode content
42
  * @return string YouTube embed code
43
  */
44
 
45
- function aye_video_shortcode_alt1( $paras = '', $content = '' ) {
46
- return do_shortcode( aye_video_shortcode( $paras, $content, '', 1 ) );
47
  }
48
- $shortcode = aye_set_shortcode_option();
49
- if ( $shortcode[ 1 ] != '' ) { add_shortcode( $shortcode[ 1 ], 'aye_video_shortcode_alt1' ); }
50
 
51
  /**
52
  * Alternative Video shortcode 2
@@ -55,17 +55,17 @@ if ( $shortcode[ 1 ] != '' ) { add_shortcode( $shortcode[ 1 ], 'aye_video_shortc
55
  *
56
  * @since 2.0
57
  *
58
- * @uses aye_video_shortcode Action the shortcode parameters
59
  *
60
  * @param string $paras Shortcode parameters
61
  * @param string $content Shortcode content
62
  * @return string YouTube embed code
63
  */
64
 
65
- function aye_video_shortcode_alt2( $paras = '', $content = '' ) {
66
- return do_shortcode( aye_video_shortcode( $paras, $content, '', 2 ) );
67
  }
68
- if ( $shortcode[ 2 ] != '' ) { add_shortcode( $shortcode[ 2 ], 'aye_video_shortcode_alt2' ); }
69
 
70
  /**
71
  * Video shortcode
@@ -74,10 +74,10 @@ if ( $shortcode[ 2 ] != '' ) { add_shortcode( $shortcode[ 2 ], 'aye_video_shortc
74
  *
75
  * @since 2.0
76
  *
77
- * @uses aye_get_embed_type Get the embed type
78
- * @uses aye_set_autohide Get the autohide parameter
79
- * @uses aye_set_general_defaults Set default options
80
- * @uses aye_generate_youtube_code Generate the embed code
81
  *
82
  * @param string $paras Shortcode parameters
83
  * @param string $content Shortcode content
@@ -85,7 +85,7 @@ if ( $shortcode[ 2 ] != '' ) { add_shortcode( $shortcode[ 2 ], 'aye_video_shortc
85
  * @return string YouTube embed code
86
  */
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
 
@@ -99,7 +99,7 @@ function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_s
99
 
100
  // Get general options
101
 
102
- $options = aye_set_general_defaults();
103
  $profile = $options[ 'alt_profile' . $alt_shortcode ];
104
  }
105
 
@@ -129,15 +129,15 @@ function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_s
129
 
130
  // Get Embed type
131
 
132
- $type = aye_get_embed_type( $type, $embedplus );
133
 
134
  // Set up Autohide parameter
135
 
136
- $autohide = aye_set_autohide( $autohide );
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
  }
@@ -149,19 +149,19 @@ function aye_video_shortcode( $paras = '', $content = '', $callback = '', $alt_s
149
  *
150
  * @since 2.0
151
  *
152
- * @uses aye_generate_thumbnail_code Generate the thumbnail code
153
  *
154
  * @param string $paras Shortcode parameters
155
  * @param string $content Shortcode content
156
  * @return string YouTube thumbnail code
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' );
165
 
166
  /**
167
  * Short URL shortcode
@@ -170,19 +170,19 @@ add_shortcode( 'youtube_thumb', 'aye_thumbnail_sc' );
170
  *
171
  * @since 2.0
172
  *
173
- * @uses aye_generate_shorturl_code Generate the code
174
  *
175
  * @param string $paras Shortcode parameters
176
  * @param string $content Shortcode content
177
  * @return string YouTube short URL code
178
  */
179
 
180
- function aye_shorturl_sc( $paras = '', $content = '' ) {
181
  extract( shortcode_atts( array( 'id' => '' ), $paras ) );
182
- return do_shortcode( aye_generate_shorturl_code( $id ) );
183
  }
184
 
185
- add_shortcode( 'youtube_url', 'aye_shorturl_sc' );
186
 
187
  /**
188
  * Download shortcode
@@ -191,34 +191,27 @@ add_shortcode( 'youtube_url', 'aye_shorturl_sc' );
191
  *
192
  * @since 2.0
193
  *
194
- * @uses aye_generate_download_code Generate the download code
195
  *
196
  * @param string $paras Shortcode parameters
197
  * @param string $content Shortcode content
198
  * @return string YouTube download link
199
  */
200
 
201
- function aye_video_download( $paras = '', $content = '' ) {
202
 
203
- extract( shortcode_atts( array( 'id' => '', 'target' => '', 'nofollow' => '' ), $paras ) );
204
-
205
- // Return the URL
206
 
207
- $link = aye_generate_download_code( $id );
208
 
209
- // Now add the HTML to the URL (assuming it's not an error)
210
 
211
- if ( substr( $link, 0, 2 ) != '<p' ) {
212
- $link = '<a href="' . $link . '"';
213
- if ( $target != '' ) { $link .= ' target="' . $target . '"'; }
214
- if ( strtolower( $nofollow ) != 'no' ) { $link .= ' rel="nofollow"'; }
215
- $link .= '>' . $content . '</a>';
216
- }
217
 
218
  return do_shortcode( $link );
219
  }
220
 
221
- add_shortcode( 'download_video', 'aye_video_download' );
222
 
223
  /**
224
  * Transcript Shortcode
@@ -227,18 +220,18 @@ add_shortcode( 'download_video', 'aye_video_download' );
227
  *
228
  * @since 2.0
229
  *
230
- * @uses aye_generate_transcript Generate the transcript
231
  *
232
  * @param string $paras Shortcode parameters
233
  * @param string $content Shortcode content
234
  * @return string Transcript XHTML
235
  */
236
 
237
- function aye_transcript_sc( $paras = '', $content = '' ) {
238
- return do_shortcode( aye_generate_transcript( $content ) );
239
  }
240
 
241
- add_shortcode( 'transcript', 'aye_transcript_sc' );
242
 
243
  /**
244
  * Video Name Shortcode
@@ -247,31 +240,31 @@ add_shortcode( 'transcript', 'aye_transcript_sc' );
247
  *
248
  * @since 2.0
249
  *
250
- * @uses aye_extract_id Extract the video ID
251
- * @uses aye_validate_id Get the name and video type
252
- * @uses aye_error Return an error
253
  *
254
  * @param string $paras Shortcode parameters
255
  * @param string $content Shortcode content
256
  * @return string Video name
257
  */
258
 
259
- function aye_video_name_shortcode( $paras = '', $content = '' ) {
260
 
261
  // Extract the ID if a full URL has been specified
262
 
263
- $id = aye_extract_id( $content );
264
 
265
  // Check what type of video it is and whether it's valid
266
 
267
- $return = aye_validate_id( $id, true );
268
- if ( !$return[ 'type' ] ) { return aye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) ); }
269
- if ( strlen( $return[ 'type' ] ) != 1 ) { return aye_error( $return[ 'type' ] ); }
270
 
271
  // Return the video title
272
 
273
  return do_shortcode( $return['title'] );
274
  }
275
 
276
- add_shortcode( 'youtube_name', 'aye_video_name_shortcode' );
277
  ?>
4
  *
5
  * Define the various shortcodes
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
 
15
  *
16
  * @since 2.0
17
  *
18
+ * @uses vye_video_shortcode Action the shortcode parameters
19
  *
20
  * @param string $paras Shortcode parameters
21
  * @param string $content Shortcode content
22
  * @return string YouTube embed code
23
  */
24
 
25
+ function vye_video_shortcode_default( $paras = '', $content = '' ) {
26
+ return do_shortcode( vye_video_shortcode( $paras, $content ) );
27
  }
28
 
29
+ add_shortcode( 'youtube', 'vye_video_shortcode_default' );
30
 
31
  /**
32
  * Alternative Video shortcode 1
35
  *
36
  * @since 2.0
37
  *
38
+ * @uses vye_video_shortcode Action the shortcode parameters
39
  *
40
  * @param string $paras Shortcode parameters
41
  * @param string $content Shortcode content
42
  * @return string YouTube embed code
43
  */
44
 
45
+ function vye_video_shortcode_alt1( $paras = '', $content = '' ) {
46
+ return do_shortcode( vye_video_shortcode( $paras, $content, '', 1 ) );
47
  }
48
+ $shortcode = vye_set_shortcode_option();
49
+ if ( $shortcode[ 1 ] != '' ) { add_shortcode( $shortcode[ 1 ], 'vye_video_shortcode_alt1' ); }
50
 
51
  /**
52
  * Alternative Video shortcode 2
55
  *
56
  * @since 2.0
57
  *
58
+ * @uses vye_video_shortcode Action the shortcode parameters
59
  *
60
  * @param string $paras Shortcode parameters
61
  * @param string $content Shortcode content
62
  * @return string YouTube embed code
63
  */
64
 
65
+ function vye_video_shortcode_alt2( $paras = '', $content = '' ) {
66
+ return do_shortcode( vye_video_shortcode( $paras, $content, '', 2 ) );
67
  }
68
+ if ( $shortcode[ 2 ] != '' ) { add_shortcode( $shortcode[ 2 ], 'vye_video_shortcode_alt2' ); }
69
 
70
  /**
71
  * Video shortcode
74
  *
75
  * @since 2.0
76
  *
77
+ * @uses vye_get_embed_type Get the embed type
78
+ * @uses vye_set_autohide Get the autohide parameter
79
+ * @uses vye_set_general_defaults Set default options
80
+ * @uses vye_generate_youtube_code Generate the embed code
81
  *
82
  * @param string $paras Shortcode parameters
83
  * @param string $content Shortcode content
85
  * @return string YouTube embed code
86
  */
87
 
88
+ function vye_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
 
99
 
100
  // Get general options
101
 
102
+ $options = vye_set_general_defaults();
103
  $profile = $options[ 'alt_profile' . $alt_shortcode ];
104
  }
105
 
129
 
130
  // Get Embed type
131
 
132
+ $type = vye_get_embed_type( $type, $embedplus );
133
 
134
  // Set up Autohide parameter
135
 
136
+ $autohide = vye_set_autohide( $autohide );
137
 
138
  // Create YouTube code
139
 
140
+ $youtube_code = vye_generate_youtube_code( $content, $type, $width, $height, vye_convert( $fullscreen ), vye_convert( $related ), vye_convert( $autoplay ), vye_convert( $loop ), $start, vye_convert( $info ), vye_convert_3( $annotation ), vye_convert( $cc ), $style, vye_convert( $link ), vye_convert( $react ), $stop, vye_convert( $sweetspot ), vye_convert( $disablekb ), $ratio, $autohide, $controls, $profile, $list, vye_convert( $audio ), $template, vye_convert( $hd ), $color, $theme, vye_convert( $ssl ), vye_convert( $dynamic ), vye_convert( $search ), vye_convert( $user ) );
141
 
142
  return do_shortcode( $youtube_code );
143
  }
149
  *
150
  * @since 2.0
151
  *
152
+ * @uses vye_generate_thumbnail_code Generate the thumbnail code
153
  *
154
  * @param string $paras Shortcode parameters
155
  * @param string $content Shortcode content
156
  * @return string YouTube thumbnail code
157
  */
158
 
159
+ function vye_thumbnail_sc( $paras = '', $content = '' ) {
160
  extract( shortcode_atts( array( 'style' => '', 'class' => '', 'rel' => '', 'target' => '', 'width' => '', 'height' => '', 'alt' => '', 'version' => '', 'nolink' => '' ), $paras ) );
161
+ return do_shortcode( vye_generate_thumbnail_code( $content, $style, $class, $rel, $target, $width, $height, $alt, $version, $nolink ) );
162
  }
163
 
164
+ add_shortcode( 'youtube_thumb', 'vye_thumbnail_sc' );
165
 
166
  /**
167
  * Short URL shortcode
170
  *
171
  * @since 2.0
172
  *
173
+ * @uses vye_generate_shorturl_code Generate the code
174
  *
175
  * @param string $paras Shortcode parameters
176
  * @param string $content Shortcode content
177
  * @return string YouTube short URL code
178
  */
179
 
180
+ function vye_shorturl_sc( $paras = '', $content = '' ) {
181
  extract( shortcode_atts( array( 'id' => '' ), $paras ) );
182
+ return do_shortcode( vye_generate_shorturl_code( $id ) );
183
  }
184
 
185
+ add_shortcode( 'youtube_url', 'vye_shorturl_sc' );
186
 
187
  /**
188
  * Download shortcode
191
  *
192
  * @since 2.0
193
  *
194
+ * @uses vye_generate_download_code Generate the download code
195
  *
196
  * @param string $paras Shortcode parameters
197
  * @param string $content Shortcode content
198
  * @return string YouTube download link
199
  */
200
 
201
+ function vye_video_download( $paras = '', $content = '' ) {
202
 
203
+ extract( shortcode_atts( array( 'id' => '' ), $paras ) );
 
 
204
 
205
+ // Get the download code
206
 
207
+ $link = vye_generate_download_code( $id );
208
 
209
+ // Now return the HTML
 
 
 
 
 
210
 
211
  return do_shortcode( $link );
212
  }
213
 
214
+ add_shortcode( 'download_video', 'vye_video_download' );
215
 
216
  /**
217
  * Transcript Shortcode
220
  *
221
  * @since 2.0
222
  *
223
+ * @uses vye_generate_transcript Generate the transcript
224
  *
225
  * @param string $paras Shortcode parameters
226
  * @param string $content Shortcode content
227
  * @return string Transcript XHTML
228
  */
229
 
230
+ function vye_transcript_sc( $paras = '', $content = '' ) {
231
+ return do_shortcode( vye_generate_transcript( $content ) );
232
  }
233
 
234
+ add_shortcode( 'transcript', 'vye_transcript_sc' );
235
 
236
  /**
237
  * Video Name Shortcode
240
  *
241
  * @since 2.0
242
  *
243
+ * @uses vye_extract_id Extract the video ID
244
+ * @uses vye_validate_id Get the name and video type
245
+ * @uses vye_error Return an error
246
  *
247
  * @param string $paras Shortcode parameters
248
  * @param string $content Shortcode content
249
  * @return string Video name
250
  */
251
 
252
+ function vye_video_name_shortcode( $paras = '', $content = '' ) {
253
 
254
  // Extract the ID if a full URL has been specified
255
 
256
+ $id = vye_extract_id( $content );
257
 
258
  // Check what type of video it is and whether it's valid
259
 
260
+ $return = vye_validate_id( $id, true );
261
+ if ( !$return[ 'type' ] ) { return vye_error( sprintf( __( 'The YouTube ID of %s is invalid.', 'youtube-embed' ), $id ) ); }
262
+ if ( strlen( $return[ 'type' ] ) != 1 ) { return vye_error( $return[ 'type' ] ); }
263
 
264
  // Return the video title
265
 
266
  return do_shortcode( $return['title'] );
267
  }
268
 
269
+ add_shortcode( 'youtube_name', 'vye_video_name_shortcode' );
270
  ?>
includes/{aye-update-post-content.php → update-post-content.php} RENAMED
@@ -4,7 +4,7 @@
4
  *
5
  * Process the post/page content for embed requests
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
 
@@ -16,18 +16,18 @@
16
  *
17
  * @since 2.0
18
  *
19
- * @uses aye_convert_content Convert a URL to the embed code
20
- * @uses aye_generate_youtube_code Generate the YouTube embed code
21
- * @uses aye_set_general_defaults Get general defaults
22
- * @uses aye_validate_id Validate the video ID
23
  *
24
  * @param string $content Post/page content
25
  * @return string Resulting post/page content
26
  */
27
 
28
- function aye_content_search( $content ) {
29
 
30
- $options = aye_set_general_defaults();
31
 
32
  // The following are URL modifications
33
 
@@ -41,29 +41,29 @@ function aye_content_search( $content ) {
41
  // Search for httpv URL
42
  $identifier = 'httpv://www.youtube.com/watch?v=';
43
  $search = strpos( $content, $identifier );
44
- if ( $search !== false ) { $content = aye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), '', '', $options[ 'other_profile' ] ); $changed = true; }
45
 
46
  // Search for httpa URL
47
  $identifier = 'httpa://www.youtube.com/watch?v=';
48
  $search = strpos( $content, $identifier );
49
- if ( $search !== false ) { $content = aye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), 1, '', $options[ 'other_profile' ] ); $changed = true; }
50
 
51
  // Search for httpvh URL
52
  $identifier = 'httpvh://www.youtube.com/watch?v=';
53
  $search = strpos( $content, $identifier );
54
- if ( $search !== false ) { $content = aye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), '', '', $options[ 'other_profile' ] ); $changed = true; }
55
 
56
  // Search for httpvp playlist URL
57
  $identifier = 'httpvp://www.youtube.com/watch?p=';
58
  $search = strpos( $content, $identifier );
59
- if ( $search !== false ) { $content = aye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 16 ), '', '', $options[ 'other_profile' ] ); $changed = true; }
60
 
61
  // Search for youtube:: URL
62
  $identifier = 'youtube::';
63
  $search = strpos( $content, $identifier );
64
  if ( $search !== false ) {
65
  $suffix = substr( $content, $search + strlen( $identifier ) + 11, 2 );
66
- if ( $suffix == '::' ) { $content = aye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), '', '::', $options[ 'other_profile' ] ); $changed = true; }
67
  }
68
  }
69
 
@@ -92,7 +92,7 @@ function aye_content_search( $content ) {
92
  // Maybe a video ID - validate first
93
 
94
  if ( ( strlen( $code ) == 11 ) && ( !strpos( $code, ' ' ) ) ) {
95
- $type = aye_validate_id( $code );
96
  if ( $type == 'v' ) { $code_found = true; }
97
  }
98
 
@@ -114,7 +114,7 @@ function aye_content_search( $content ) {
114
  // If an ID was found, update the code
115
 
116
  if ( $code_found ) {
117
- $ye_code = aye_generate_youtube_code( $id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $options[ 'other_profile' ], '', '' );
118
  $content = str_replace( '[' . $code . ']', $ye_code, $content );
119
  }
120
  }
@@ -127,7 +127,7 @@ function aye_content_search( $content ) {
127
 
128
  return $content;
129
  }
130
- add_filter( 'the_content', 'aye_content_search' );
131
 
132
  /**
133
  * Convert the Content
@@ -136,7 +136,7 @@ add_filter( 'the_content', 'aye_content_search' );
136
  *
137
  * @since 2.0
138
  *
139
- * @uses aye_generate_youtube_code Generate the embed code
140
  *
141
  * @param string $content The post content
142
  * @param string $identifier The text that identifies the embed
@@ -147,9 +147,9 @@ add_filter( 'the_content', 'aye_content_search' );
147
  * @return string Content to return
148
  */
149
 
150
- function aye_convert_content( $content, $identifier, $id, $audio = '', $suffix = '', $profile = '' ) {
151
 
152
- $code = aye_generate_youtube_code( $id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $profile, '', $audio );
153
  $content = str_replace( $identifier.$id.$suffix, $code, $content);
154
 
155
  return $content;
@@ -162,16 +162,16 @@ function aye_convert_content( $content, $identifier, $id, $audio = '', $suffix =
162
  *
163
  * @since 2.0
164
  *
165
- * @uses aye_set_general_defaults Get the general defaults
166
- * @uses aye_generate_youtube_code Generate the YouTube embed code
167
  *
168
  * @param string $content The comments content
169
  * @return string Content to return
170
  */
171
 
172
- function aye_filter_comments( $content ) {
173
 
174
- $options = aye_set_general_defaults();
175
 
176
  if ( $options[ 'comments' ] == 1 ) {
177
 
@@ -198,7 +198,7 @@ function aye_filter_comments( $content ) {
198
  // Work out video ID and generate code
199
 
200
  $id = substr( $content, $search + strlen( $identifier ), 11 );
201
- $code = aye_generate_youtube_code( $id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $options[ 'comments_profile' ], '', '' );
202
 
203
  // Now replace the URL with the resultant code
204
 
@@ -218,5 +218,5 @@ function aye_filter_comments( $content ) {
218
  }
219
  return $content;
220
  }
221
- add_filter( 'comment_text', 'aye_filter_comments' );
222
  ?>
4
  *
5
  * Process the post/page content for embed requests
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
 
16
  *
17
  * @since 2.0
18
  *
19
+ * @uses vye_convert_content Convert a URL to the embed code
20
+ * @uses vye_generate_youtube_code Generate the YouTube embed code
21
+ * @uses vye_set_general_defaults Get general defaults
22
+ * @uses vye_validate_id Validate the video ID
23
  *
24
  * @param string $content Post/page content
25
  * @return string Resulting post/page content
26
  */
27
 
28
+ function vye_content_search( $content ) {
29
 
30
+ $options = vye_set_general_defaults();
31
 
32
  // The following are URL modifications
33
 
41
  // Search for httpv URL
42
  $identifier = 'httpv://www.youtube.com/watch?v=';
43
  $search = strpos( $content, $identifier );
44
+ if ( $search !== false ) { $content = vye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), '', '', $options[ 'other_profile' ] ); $changed = true; }
45
 
46
  // Search for httpa URL
47
  $identifier = 'httpa://www.youtube.com/watch?v=';
48
  $search = strpos( $content, $identifier );
49
+ if ( $search !== false ) { $content = vye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), 1, '', $options[ 'other_profile' ] ); $changed = true; }
50
 
51
  // Search for httpvh URL
52
  $identifier = 'httpvh://www.youtube.com/watch?v=';
53
  $search = strpos( $content, $identifier );
54
+ if ( $search !== false ) { $content = vye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), '', '', $options[ 'other_profile' ] ); $changed = true; }
55
 
56
  // Search for httpvp playlist URL
57
  $identifier = 'httpvp://www.youtube.com/watch?p=';
58
  $search = strpos( $content, $identifier );
59
+ if ( $search !== false ) { $content = vye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 16 ), '', '', $options[ 'other_profile' ] ); $changed = true; }
60
 
61
  // Search for youtube:: URL
62
  $identifier = 'youtube::';
63
  $search = strpos( $content, $identifier );
64
  if ( $search !== false ) {
65
  $suffix = substr( $content, $search + strlen( $identifier ) + 11, 2 );
66
+ if ( $suffix == '::' ) { $content = vye_convert_content( $content, $identifier, substr( $content, $search + strlen( $identifier ), 11 ), '', '::', $options[ 'other_profile' ] ); $changed = true; }
67
  }
68
  }
69
 
92
  // Maybe a video ID - validate first
93
 
94
  if ( ( strlen( $code ) == 11 ) && ( !strpos( $code, ' ' ) ) ) {
95
+ $type = vye_validate_id( $code );
96
  if ( $type == 'v' ) { $code_found = true; }
97
  }
98
 
114
  // If an ID was found, update the code
115
 
116
  if ( $code_found ) {
117
+ $ye_code = vye_generate_youtube_code( $id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $options[ 'other_profile' ], '', '' );
118
  $content = str_replace( '[' . $code . ']', $ye_code, $content );
119
  }
120
  }
127
 
128
  return $content;
129
  }
130
+ add_filter( 'the_content', 'vye_content_search' );
131
 
132
  /**
133
  * Convert the Content
136
  *
137
  * @since 2.0
138
  *
139
+ * @uses vye_generate_youtube_code Generate the embed code
140
  *
141
  * @param string $content The post content
142
  * @param string $identifier The text that identifies the embed
147
  * @return string Content to return
148
  */
149
 
150
+ function vye_convert_content( $content, $identifier, $id, $audio = '', $suffix = '', $profile = '' ) {
151
 
152
+ $code = vye_generate_youtube_code( $id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $profile, '', $audio );
153
  $content = str_replace( $identifier.$id.$suffix, $code, $content);
154
 
155
  return $content;
162
  *
163
  * @since 2.0
164
  *
165
+ * @uses vye_set_general_defaults Get the general defaults
166
+ * @uses vye_generate_youtube_code Generate the YouTube embed code
167
  *
168
  * @param string $content The comments content
169
  * @return string Content to return
170
  */
171
 
172
+ function vye_filter_comments( $content ) {
173
 
174
+ $options = vye_set_general_defaults();
175
 
176
  if ( $options[ 'comments' ] == 1 ) {
177
 
198
  // Work out video ID and generate code
199
 
200
  $id = substr( $content, $search + strlen( $identifier ), 11 );
201
+ $code = vye_generate_youtube_code( $id, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', $options[ 'comments_profile' ], '', '' );
202
 
203
  // Now replace the URL with the resultant code
204
 
218
  }
219
  return $content;
220
  }
221
+ add_filter( 'comment_text', 'vye_filter_comments' );
222
  ?>
js/{aye-mce-button.min.php → mce-button.min.php} RENAMED
@@ -1,3 +1,3 @@
1
  (function(){
2
- <?php $cookie_name='aye_mce_shortcode'; if(isset($_COOKIE[$cookie_name])) {$shortcode=$_COOKIE[$cookie_name];} else {$shortcode='youtube';} ?>
3
  var shortcode="<?php echo $shortcode; ?>";tinymce.create('tinymce.plugins.youtube',{init:function(ed,url){ed.addButton('YouTube',{title:'YouTube Embed',onclick:function(){if(ed.selection.getContent()==''){var yeOut='Insert video URL or ID here'}else{var yeOut=ed.selection.getContent()}ed.selection.setContent('['+shortcode+']'+yeOut+'[/'+shortcode+']')}})},createControl:function(n,cm){return null}});tinymce.PluginManager.add('YouTube',tinymce.plugins.youtube)})();
1
  (function(){
2
+ <?php $cookie_name='vye_mce_shortcode'; if(isset($_COOKIE[$cookie_name])) {$shortcode=$_COOKIE[$cookie_name];} else {$shortcode='youtube';} ?>
3
  var shortcode="<?php echo $shortcode; ?>";tinymce.create('tinymce.plugins.youtube',{init:function(ed,url){ed.addButton('YouTube',{title:'YouTube Embed',onclick:function(){if(ed.selection.getContent()==''){var yeOut='Insert video URL or ID here'}else{var yeOut=ed.selection.getContent()}ed.selection.setContent('['+shortcode+']'+yeOut+'[/'+shortcode+']')}})},createControl:function(n,cm){return null}});tinymce.PluginManager.add('YouTube',tinymce.plugins.youtube)})();
js/{aye-mce-button.php → mce-button.php} RENAMED
@@ -5,7 +5,7 @@
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; ?>";
5
 
6
  // Get cookie of default shortcode to use
7
 
8
+ $cookie_name = 'vye_mce_shortcode';
9
  if ( isset( $_COOKIE[ $cookie_name ] ) ) { $shortcode = $_COOKIE[ $cookie_name ]; } else { $shortcode = 'youtube'; }
10
  ?>
11
  var shortcode = "<?php echo $shortcode; ?>";
languages/youtube-embed.mo CHANGED
Binary file
languages/youtube-embed.po CHANGED
@@ -1,1277 +1,1177 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Artiss YouTube Embed\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-12-20 09:29-0000\n"
6
- "PO-Revision-Date: 2012-12-20 09:29-0000\n"
7
  "Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_x;_ex;esc_attr_x;esc_html_x;_n;_nx;_n_noop;_nx_noop\n"
 
13
  "X-Poedit-Basepath: ../\n"
 
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
- #: includes/artiss-plugin-ads.php:46
17
- #: includes/aye-admin-config.php:56
18
- msgid "Donate"
19
- msgstr ""
20
-
21
- #: includes/artiss-plugin-ads.php:47
22
- msgid "If you like this plugin and appreciate the effort being put into it, <a href=\"http://www.artiss.co.uk/donate\">please consider donating</a>."
23
- msgstr ""
24
-
25
- #: includes/artiss-plugin-ads.php:48
26
- msgid "Follow Me"
27
- msgstr ""
28
-
29
- #: includes/artiss-plugin-ads.php:49
30
- msgid "Please stay in touch with the latest news via one of the following social streams..."
31
- msgstr ""
32
-
33
- #: includes/artiss-plugin-ads.php:51
34
- msgid "Follow Artiss.co.uk on Twitter"
35
- msgstr ""
36
-
37
- #: includes/artiss-plugin-ads.php:52
38
- msgid "Follow Artiss.co.uk on Facebook"
39
- msgstr ""
40
-
41
- #: includes/artiss-plugin-ads.php:53
42
- msgid "Follow Artiss.co.uk on Google+"
43
- msgstr ""
44
-
45
- #: includes/artiss-plugin-ads.php:54
46
- msgid "Follow Artiss.co.uk on RSS feed"
47
- msgstr ""
48
-
49
- #: includes/aye-add-to-admin-bar.php:36
50
- #: includes/aye-add-to-admin-bar.php:76
51
  msgid "YouTube Embed"
52
  msgstr ""
53
 
54
- #: includes/aye-add-to-admin-bar.php:82
55
- #: includes/aye-admin-config.php:103
56
  msgid "Instructions"
57
  msgstr ""
58
 
59
- #: includes/aye-add-to-admin-bar.php:91
60
- #: includes/aye-admin-config.php:110
61
  msgid "Options"
62
  msgstr ""
63
 
64
- #: includes/aye-add-to-admin-bar.php:100
65
- #: includes/aye-admin-config.php:120
66
  msgid "Profiles"
67
  msgstr ""
68
 
69
- #: includes/aye-add-to-admin-bar.php:109
70
- #: includes/aye-admin-config.php:130
71
  msgid "Lists"
72
  msgstr ""
73
 
74
- #: includes/aye-admin-config.php:29
75
  msgid "Settings"
76
  msgstr ""
77
 
78
- #: includes/aye-admin-config.php:54
79
  msgid "Support"
80
  msgstr ""
81
 
82
- #: includes/aye-admin-config.php:88
83
- msgid "About Artiss YouTube Embeds"
84
  msgstr ""
85
 
86
- #: includes/aye-admin-config.php:88
87
  msgid "YouTube"
88
  msgstr ""
89
 
90
- #: includes/aye-admin-config.php:94
91
- #: includes/aye-display-about.php:14
92
- msgid "About Artiss YouTube Embed"
93
- msgstr ""
94
-
95
- #: includes/aye-admin-config.php:94
96
- msgid "About"
97
- msgstr ""
98
-
99
- #: includes/aye-admin-config.php:103
100
- #: includes/aye-display-instructions.php:14
101
- msgid "Artiss YouTube Embed Instructions"
102
- msgstr ""
103
-
104
- #: includes/aye-admin-config.php:110
105
- msgid "Artiss YouTube Embed Options"
106
  msgstr ""
107
 
108
- #: includes/aye-admin-config.php:120
109
- msgid "Artiss YouTube Embed Profiles"
110
  msgstr ""
111
 
112
- #: includes/aye-admin-config.php:130
113
- msgid "Artiss YouTube Embed Lists"
114
  msgstr ""
115
 
116
- #: includes/aye-admin-config.php:254
117
- #: includes/aye-admin-config.php:296
118
- #: includes/aye-admin-config.php:339
119
- #: includes/aye-admin-config.php:381
120
  msgid "Help"
121
  msgstr ""
122
 
123
- #: includes/aye-admin-config.php:269
124
- msgid "This screen allows you to select non-specific options for the Artiss YouTube Embed plugin. For the default embedding settings, please select the <a href=\"admin.php?page=aye-profile-options\">Profiles</a> administration option."
 
 
 
125
  msgstr ""
126
 
127
- #: includes/aye-admin-config.php:270
128
- #: includes/aye-admin-config.php:312
129
- #: includes/aye-admin-config.php:355
130
- msgid "Remember to click the Save Settings button at the bottom of the screen for new settings to take effect."
 
131
  msgstr ""
132
 
133
- #: includes/aye-admin-config.php:271
134
- #: includes/aye-admin-config.php:313
135
- #: includes/aye-admin-config.php:356
136
- #: includes/aye-admin-config.php:397
137
  msgid "For more information:"
138
  msgstr ""
139
 
140
- #: includes/aye-admin-config.php:272
141
- #: includes/aye-admin-config.php:314
142
- #: includes/aye-admin-config.php:357
143
- #: includes/aye-admin-config.php:398
144
- msgid "Artiss YouTube Embed Plugin Documentation"
145
  msgstr ""
146
 
147
- #: includes/aye-admin-config.php:273
148
- #: includes/aye-admin-config.php:315
149
- #: includes/aye-admin-config.php:358
150
- #: includes/aye-admin-config.php:399
151
  msgid "YouTube Player Documentation"
152
  msgstr ""
153
 
154
- #: includes/aye-admin-config.php:274
155
- #: includes/aye-admin-config.php:317
156
- #: includes/aye-admin-config.php:359
157
- #: includes/aye-admin-config.php:400
158
- #: includes/aye-display-about.php:52
159
- msgid "This plugin, and all support, is supplied for free, but <a title=\"Donate\" href=\"http://artiss.co.uk/donate\" target=\"_blank\">donations</a> are always welcome."
160
- msgstr ""
161
-
162
- #: includes/aye-admin-config.php:311
163
- msgid "This screen allows you to set the options for the default and additional profiles. If you don't specify a specific parameter when displaying your YouTube video then the default profile option will be used instead. Additional profiles, which you may name, can be used as well and used as required."
164
  msgstr ""
165
 
166
- #: includes/aye-admin-config.php:316
167
  msgid "EmbedPlus website"
168
  msgstr ""
169
 
170
- #: includes/aye-admin-config.php:354
171
- msgid "This screen allows you to create lists of YouTube videos, which may be named. These lists can then be used in preference to a single video ID."
172
- msgstr ""
173
-
174
- #: includes/aye-admin-config.php:396
175
- msgid "This screen provides useful information about this plugin along with methods of support."
176
  msgstr ""
177
 
178
- #: includes/aye-admin-config.php:458
179
- msgid "Welcome to Artiss YouTube Embed"
180
  msgstr ""
181
 
182
- #: includes/aye-admin-config.php:459
183
  msgid "Thank you for installing this plugin."
184
  msgstr ""
185
 
186
- #: includes/aye-admin-config.php:460
187
- msgid "These new menu options will allow you to configure your videos to just how you want them and provide links for help and support."
 
 
188
  msgstr ""
189
 
190
- #: includes/aye-admin-config.php:461
191
- msgid "Even if you do nothing else, please visit the Profiles option to check your default video values."
 
 
192
  msgstr ""
193
 
194
- #: includes/aye-deprecated.php:55
195
  msgid "This function does not support playlists"
196
  msgstr ""
197
 
198
- #: includes/aye-display-about.php:26
199
- #, php-format
200
- msgid "You are using Artiss YouTube Embed version %s. It was written by David Artiss."
201
- msgstr ""
202
-
203
- #: includes/aye-display-about.php:28
204
- msgid "Powered by YouTube"
205
- msgstr ""
206
-
207
- #: includes/aye-display-about.php:32
208
- msgid "Copyrights"
209
- msgstr ""
210
-
211
- #: includes/aye-display-about.php:34
212
- msgid "YouTube, and all associated logos, is the copyright of Google Inc."
213
- msgstr ""
214
-
215
- #: includes/aye-display-about.php:36
216
- msgid "EmbedPlus is copyright. Read the <a href=\"http://embedplus.com/terms.aspx\" target=\"_blank\">Terms &amp; Conditions of Use</a>."
217
- msgstr ""
218
-
219
- #: includes/aye-display-about.php:38
220
- msgid "Acknowledgements"
221
- msgstr ""
222
-
223
- #: includes/aye-display-about.php:40
224
- msgid "Images have been compressed with <a href=\"http://www.smushit.com/ysmush.it/\">Smush.it</a>."
225
- msgstr ""
226
-
227
- #: includes/aye-display-about.php:42
228
- msgid "JavaScript has been compressed with <a href=\"http://javascriptcompressor.com/\">JavaScript Compressor</a>."
229
- msgstr ""
230
-
231
- #: includes/aye-display-about.php:44
232
- msgid "YouTube icons are from <a href=\"http://www.youtube.com/t/creators_downloads\">YouTube</a>. Other icons are by <a href=\"http://p.yusukekamiyamane.com/\">Yusuke Kamiyamane</a>."
233
- msgstr ""
234
-
235
- #: includes/aye-display-about.php:46
236
- msgid "Video downloads are courtesy of <a href=\"http://www.videodownloadx.com/\">Videodownloadx</a>."
237
- msgstr ""
238
-
239
- #: includes/aye-display-about.php:48
240
- msgid "Support Information"
241
- msgstr ""
242
-
243
- #: includes/aye-display-about.php:50
244
- msgid "Useful support information and links can be found by clicking on the Help tab at the top of each of the Artiss YouTube Embed administration screens."
245
- msgstr ""
246
-
247
- #: includes/aye-display-about.php:54
248
- msgid "Stay in Touch"
249
- msgstr ""
250
-
251
- #: includes/aye-display-about.php:56
252
- msgid "<a href=\"http://www.artiss.co.uk/wp-plugins\">See the full list</a> of Artiss plugins, including beta releases."
253
- msgstr ""
254
-
255
- #: includes/aye-display-about.php:58
256
- msgid "<a href=\"http://www.twitter.com/artiss_tech\">Follow Artiss.co.uk</a> on Twitter."
257
- msgstr ""
258
-
259
- #: includes/aye-display-about.php:60
260
- msgid "<a href=\"http://www.artiss.co.uk/feed\">Subscribe</a> to the Artiss.co.uk news feed."
261
- msgstr ""
262
-
263
- #: includes/aye-function-calls.php:162
264
- #: includes/aye-function-calls.php:223
265
- #: includes/aye-generate-download-code.php:36
266
- #: includes/aye-generate-embed-code.php:114
267
- #: includes/aye-generate-shorturl-code.php:34
268
- #: includes/aye-generate-thumbnail-code.php:39
269
- #: includes/aye-generate-transcript-code.php:38
270
  #, php-format
271
  msgid "The YouTube ID of %s is invalid."
272
  msgstr ""
273
 
274
- #: includes/aye-function-calls.php:173
275
  #, php-format
276
  msgid "Could not fetch the transcript file %s."
277
  msgstr ""
278
 
279
- #: includes/aye-generate-download-code.php:23
280
  msgid "No YouTube ID was found."
281
  msgstr ""
282
 
283
- #: includes/aye-generate-embed-code.php:64
284
  msgid "No video/playlist ID has been supplied"
285
  msgstr ""
286
 
287
- #: includes/aye-generate-embed-code.php:181
288
- msgid "A video list cannot be viewed within this feed - please view the original content"
 
 
289
  msgstr ""
290
 
291
- #: includes/aye-generate-embed-code.php:185
292
  msgid "Click here to view the video on YouTube"
293
  msgstr ""
294
 
295
- #: includes/aye-generate-shorturl-code.php:22
296
  msgid "No video ID has been supplied"
297
  msgstr ""
298
 
299
- #: includes/aye-generate-thumbnail-code.php:51
300
  #, php-format
301
  msgid "YouTube Video %s"
302
  msgstr ""
303
 
304
- #: includes/aye-generate-widgets.php:25
305
  msgid "Embed YouTube Widget."
306
  msgstr ""
307
 
308
- #: includes/aye-options-general.php:62
309
- #: includes/aye-options-lists.php:26
310
  msgid "Settings Saved."
311
  msgstr ""
312
 
313
- #: includes/aye-options-general.php:86
314
  msgid "Cache cleared."
315
  msgstr ""
316
 
317
- #: includes/aye-options-general.php:106
318
- msgid "These are the general settings for Artiss YouTube Embed. Please select <a href=\"admin.php?page=aye-profile-options\">Profiles</a> for default embedding settings."
319
- msgstr ""
320
-
321
- #: includes/aye-options-general.php:113
322
- msgid "Remove Adverts"
323
- msgstr ""
324
-
325
- #: includes/aye-options-general.php:114
326
- msgid "If you've <a href=\"http://www.artiss.co.uk/donate\">donated</a>, tick here to remove the adverts from these administration screens"
327
  msgstr ""
328
 
329
- #: includes/aye-options-general.php:119
330
  msgid "Embedding"
331
  msgstr ""
332
 
333
- #: includes/aye-options-general.php:123
334
  msgid "Add Metadata"
335
  msgstr ""
336
 
337
- #: includes/aye-options-general.php:124
338
- msgid "Allow rich metadata to be added to code. <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-metadata\">Learn more</a>"
 
 
339
  msgstr ""
340
 
341
- #: includes/aye-options-general.php:128
342
  msgid "Comment Embedding"
343
  msgstr ""
344
 
345
- #: includes/aye-options-general.php:129
346
- msgid "Allow YouTube URLs in comments - will display as embedded videos. <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-comments\">Learn more</a>"
 
 
 
347
  msgstr ""
348
 
349
- #: includes/aye-options-general.php:133
350
- #: includes/aye-options-general.php:174
351
- #: includes/aye-options-general.php:186
352
- #: includes/aye-options-general.php:207
353
  msgid "Profile to use"
354
  msgstr ""
355
 
356
- #: includes/aye-options-general.php:140
357
  msgid "Feed"
358
  msgstr ""
359
 
360
- #: includes/aye-options-general.php:142
361
  msgid "Text link"
362
  msgstr ""
363
 
364
- #: includes/aye-options-general.php:143
365
  msgid "Thumbnail"
366
  msgstr ""
367
 
368
- #: includes/aye-options-general.php:144
369
  msgid "Thumbnail &amp; Text Link"
370
  msgstr ""
371
 
372
- #: includes/aye-options-general.php:145
373
- msgid "Videos cannot be embedded in feeds. Select how you wish them to be shown instead"
 
 
374
  msgstr ""
375
 
376
- #: includes/aye-options-general.php:149
377
  msgid "Thumbnail to use"
378
  msgstr ""
379
 
380
- #: includes/aye-options-general.php:151
381
- #: includes/aye-shared-functions.php:481
382
  msgid "Default"
383
  msgstr ""
384
 
385
- #: includes/aye-options-general.php:152
386
  msgid "Default (HQ)"
387
  msgstr ""
388
 
389
- #: includes/aye-options-general.php:153
390
  msgid "Start"
391
  msgstr ""
392
 
393
- #: includes/aye-options-general.php:154
394
  msgid "Middle"
395
  msgstr ""
396
 
397
- #: includes/aye-options-general.php:155
398
  msgid "End"
399
  msgstr ""
400
 
401
- #: includes/aye-options-general.php:156
402
  msgid "Which thumbnail to use"
403
  msgstr ""
404
 
405
- #: includes/aye-options-general.php:160
406
  msgid "Allow shortcodes in widgets"
407
  msgstr ""
408
 
409
- #: includes/aye-options-general.php:161
410
- msgid "Allow shortcodes to be used in widgets - this will apply to <strong>all</strong> widgets"
 
 
411
  msgstr ""
412
 
413
- #: includes/aye-options-general.php:165
414
  msgid "Alternative Shortcodes"
415
  msgstr ""
416
 
417
- #: includes/aye-options-general.php:165
418
- msgid "Specify up to 2 alternative shortcodes to compliment the standard <code>youtube</code> shortcode. <strong>NB: These should be specified without the surrounding square brackets.</strong>"
 
 
 
419
  msgstr ""
420
 
421
- #: includes/aye-options-general.php:169
422
  msgid "Alternative Shortcode 1"
423
  msgstr ""
424
 
425
- #: includes/aye-options-general.php:181
426
  msgid "Alternative Shortcode 2"
427
  msgstr ""
428
 
429
- #: includes/aye-options-general.php:193
430
  msgid "Migration"
431
  msgstr ""
432
 
433
- #: includes/aye-options-general.php:193
434
- msgid "Switch on compatibility with other embedding plugins. For more details on migrating from another plugin, please <a href=\"http://www.artiss.co.uk/youtube-embed/compatibility\">click here</a>."
 
 
 
435
  msgstr ""
436
 
437
- #: includes/aye-options-general.php:197
438
  msgid "Bracket Embedding"
439
  msgstr ""
440
 
441
- #: includes/aye-options-general.php:198
442
- msgid "Allow embedding using URLs within brackets. Activating impacts performance"
 
443
  msgstr ""
444
 
445
- #: includes/aye-options-general.php:202
446
  msgid "Alternative Embedding"
447
  msgstr ""
448
 
449
- #: includes/aye-options-general.php:203
450
  msgid "Allow all other types of embedding. Activating impacts performance"
451
  msgstr ""
452
 
453
- #: includes/aye-options-general.php:210
454
  msgid "For above 2 options"
455
  msgstr ""
456
 
457
- #: includes/aye-options-general.php:214
458
  msgid "Admin Options"
459
  msgstr ""
460
 
461
- #: includes/aye-options-general.php:218
462
  msgid "Show Editor Button"
463
  msgstr ""
464
 
465
- #: includes/aye-options-general.php:219
466
  msgid "Show the YouTube button on the post editor"
467
  msgstr ""
468
 
469
- #: includes/aye-options-general.php:223
470
  msgid "Editor Button Shortcode"
471
  msgstr ""
472
 
473
- #: includes/aye-options-general.php:224
474
  msgid "Shortcode for editor button to use."
475
  msgstr ""
476
 
477
- #: includes/aye-options-general.php:228
478
  msgid "Add to Admin Bar"
479
  msgstr ""
480
 
481
- #: includes/aye-options-general.php:229
482
  msgid "Add link to options screen to Admin Bar"
483
  msgstr ""
484
 
485
- #: includes/aye-options-general.php:233
486
- msgid "Profiles Screen Access"
487
  msgstr ""
488
 
489
- #: includes/aye-options-general.php:235
490
- #: includes/aye-options-general.php:245
491
  msgid "Administrator"
492
  msgstr ""
493
 
494
- #: includes/aye-options-general.php:236
495
- #: includes/aye-options-general.php:246
496
  msgid "Editor"
497
  msgstr ""
498
 
499
- #: includes/aye-options-general.php:237
500
- #: includes/aye-options-general.php:247
501
  msgid "Author"
502
  msgstr ""
503
 
504
- #: includes/aye-options-general.php:238
505
- #: includes/aye-options-general.php:248
506
  msgid "Contributor"
507
  msgstr ""
508
 
509
- #: includes/aye-options-general.php:239
510
- msgid "Specify the user access required for the profiles screen"
511
- msgstr ""
512
-
513
- #: includes/aye-options-general.php:243
514
- msgid "Lists Screen Access"
515
  msgstr ""
516
 
517
- #: includes/aye-options-general.php:249
518
- msgid "Specify the user access required for the lists screen"
519
- msgstr ""
520
-
521
- #: includes/aye-options-general.php:253
522
  msgid "Profile &amp; List Sizes"
523
  msgstr ""
524
 
525
- #: includes/aye-options-general.php:257
526
  msgid "Number of Profiles"
527
  msgstr ""
528
 
529
- #: includes/aye-options-general.php:258
530
  msgid "Maximum number of profiles"
531
  msgstr ""
532
 
533
- #: includes/aye-options-general.php:262
534
  msgid "Number of Lists"
535
  msgstr ""
536
 
537
- #: includes/aye-options-general.php:263
538
  msgid "Maximum number of lists"
539
  msgstr ""
540
 
541
- #: includes/aye-options-general.php:267
542
  msgid "Performance"
543
  msgstr ""
544
 
545
- #: includes/aye-options-general.php:271
546
  msgid "Embed Cache"
547
  msgstr ""
548
 
549
- #: includes/aye-options-general.php:272
550
  msgid "How many hours to retain embed output. 0 to switch off"
551
  msgstr ""
552
 
553
- #: includes/aye-options-general.php:276
554
  msgid "Video Information Cache"
555
  msgstr ""
556
 
557
- #: includes/aye-options-general.php:277
558
- msgid "How many hours to retain video information, including it's validity. 0 to switch off"
 
 
559
  msgstr ""
560
 
561
- #: includes/aye-options-general.php:281
562
  msgid "Transcript Cache"
563
  msgstr ""
564
 
565
- #: includes/aye-options-general.php:282
566
  msgid "How many hours to store transcripts for in cache. 0 to switch off"
567
  msgstr ""
568
 
569
- #: includes/aye-options-general.php:291
570
  msgid "You currently have cache for"
571
  msgstr ""
572
 
573
- #: includes/aye-options-general.php:291
574
  msgid "and"
575
  msgstr ""
576
 
577
- #: includes/aye-options-general.php:295
578
  msgid "Clear Cache"
579
  msgstr ""
580
 
581
- #: includes/aye-options-general.php:296
582
  msgid "Select this option to remove all YouTube Embed cache."
583
  msgstr ""
584
 
585
- #: includes/aye-options-general.php:299
586
  msgid "YouTube API"
587
  msgstr ""
588
 
589
- #: includes/aye-options-general.php:301
590
- msgid "The YouTube API is used to validate video IDs and to determine if it is a video or playlist."
 
 
591
  msgstr ""
592
 
593
- #: includes/aye-options-general.php:305
594
  msgid "API State"
595
  msgstr ""
596
 
597
- #: includes/aye-options-general.php:307
598
  msgid "API should not be used"
599
  msgstr ""
600
 
601
- #: includes/aye-options-general.php:308
602
  msgid "HTTP API used and errors are reported"
603
  msgstr ""
604
 
605
- #: includes/aye-options-general.php:309
606
  msgid "HTTPS API used and errors are reported"
607
  msgstr ""
608
 
609
- #: includes/aye-options-general.php:310
610
  msgid "HTTP API used and no errors are reported"
611
  msgstr ""
612
 
613
- #: includes/aye-options-general.php:311
614
  msgid "HTTPS API used and no errors are reported"
615
  msgstr ""
616
 
617
- #: includes/aye-options-general.php:316
618
  msgid "Error Reporting"
619
  msgstr ""
620
 
621
- #: includes/aye-options-general.php:318
622
- msgid "Playback errors are within the XHTML source code as comments - parameter errors and other types are displayed on the post output."
 
 
623
  msgstr ""
624
 
625
- #: includes/aye-options-general.php:321
626
  msgid "Video Playback Error Message"
627
  msgstr ""
628
 
629
- #: includes/aye-options-general.php:322
630
  msgid "This is the message that will be shown on the post"
631
  msgstr ""
632
 
633
- #: includes/aye-options-general.php:325
634
  msgid "Security"
635
  msgstr ""
636
 
637
- #: includes/aye-options-general.php:330
638
  msgid "Privacy-Enhanced Mode"
639
  msgstr ""
640
 
641
- #: includes/aye-options-general.php:332
642
  msgid "Cookies should always be stored"
643
  msgstr ""
644
 
645
- #: includes/aye-options-general.php:333
646
  msgid "Cookies should never be stored"
647
  msgstr ""
648
 
649
- #: includes/aye-options-general.php:334
650
  msgid "Cookies should be stored based on user's Do Not Track setting"
651
  msgstr ""
652
 
653
- #: includes/aye-options-general.php:335
654
  msgid "Read more about <a href=\"http://donottrack.us/\">Do Not Track</a>"
655
  msgstr ""
656
 
657
- #: includes/aye-options-general.php:338
658
  msgid "Compatibility"
659
  msgstr ""
660
 
661
- #: includes/aye-options-general.php:341
662
  msgid "Allow Frame Border on IFRAME"
663
  msgstr ""
664
 
665
- #: includes/aye-options-general.php:342
666
  msgid "FRAMEBORDER is not HTML5 compliant"
667
  msgstr ""
668
 
669
- #: includes/aye-options-general.php:347
670
- #: includes/aye-options-lists.php:125
671
- #: includes/aye-options-profiles.php:371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  msgid "Save Settings"
673
  msgstr ""
674
 
675
- #: includes/aye-options-lists.php:31
676
  msgid "All fields must be completed."
677
  msgstr ""
678
 
679
- #: includes/aye-options-lists.php:53
680
  msgid "Errors were found with your video list. See the list below for details."
681
  msgstr ""
682
 
683
- #: includes/aye-options-lists.php:94
684
  msgid "List"
685
  msgstr ""
686
 
687
- #: includes/aye-options-lists.php:104
688
  msgid "Change list"
689
  msgstr ""
690
 
691
- #: includes/aye-options-lists.php:107
692
  msgid "These are the options for list "
693
  msgstr ""
694
 
695
- #: includes/aye-options-lists.php:107
696
- msgid "Update the name, if required, and specify a list of YouTube video IDs. Use the drop-down on the right hand side to swap between lists."
 
 
697
  msgstr ""
698
 
699
- #: includes/aye-options-lists.php:112
700
  msgid "List name"
701
  msgstr ""
702
 
703
- #: includes/aye-options-lists.php:114
704
  msgid "The name you wish to give this list"
705
  msgstr ""
706
 
707
- #: includes/aye-options-lists.php:118
708
  msgid "Video IDs (one per line)"
709
  msgstr ""
710
 
711
- #: includes/aye-options-lists.php:136
712
- #: includes/aye-options-widgets.php:19
713
  msgid "Video ID"
714
  msgstr ""
715
 
716
- #: includes/aye-options-lists.php:136
717
  msgid "Video Title"
718
  msgstr ""
719
 
720
- #: includes/aye-options-lists.php:136
721
  msgid "Status"
722
  msgstr ""
723
 
724
- #: includes/aye-options-lists.php:152
725
  msgid "This is a playlist"
726
  msgstr ""
727
 
728
- #: includes/aye-options-lists.php:156
729
  msgid "Invalid video ID"
730
  msgstr ""
731
 
732
- #: includes/aye-options-lists.php:160
733
  msgid "YouTube API error"
734
  msgstr ""
735
 
736
- #: includes/aye-options-lists.php:163
737
  msgid "Valid video"
738
  msgstr ""
739
 
740
- #: includes/aye-options-lists.php:181
741
  msgid "The video ID is valid"
742
  msgstr ""
743
 
744
- #: includes/aye-options-lists.php:184
745
  msgid "The video ID is invalid"
746
  msgstr ""
747
 
748
- #: includes/aye-options-profiles.php:93
749
  msgid " Profile Saved."
750
  msgstr ""
751
 
752
- #: includes/aye-options-profiles.php:120
753
  msgid "Change profile"
754
  msgstr ""
755
 
756
- #: includes/aye-options-profiles.php:125
757
  msgid "These are the options for the default profile."
758
  msgstr ""
759
 
760
- #: includes/aye-options-profiles.php:127
761
  #, php-format
762
  msgid "These are the options for profile %s."
763
  msgstr ""
764
 
765
- #: includes/aye-options-profiles.php:129
766
  msgid "Use the drop-down on the right hand side to swap between profiles."
767
  msgstr ""
768
 
769
- #: includes/aye-options-profiles.php:135
770
  msgid "Profile name"
771
  msgstr ""
772
 
773
- #: includes/aye-options-profiles.php:137
774
  msgid "The name you wish to give this profile"
775
  msgstr ""
776
 
777
- #: includes/aye-options-profiles.php:141
778
  msgid "Video Embed Type"
779
  msgstr ""
780
 
781
- #: includes/aye-options-profiles.php:142
782
  msgid "The type of player to use for videos."
783
  msgstr ""
784
 
785
- #: includes/aye-options-profiles.php:143
786
- #: includes/aye-options-profiles.php:153
787
- #: includes/aye-options-profiles.php:349
788
- #: includes/aye-options-widgets.php:89
789
  msgid "IFRAME"
790
  msgstr ""
791
 
792
- #: includes/aye-options-profiles.php:143
793
- msgid "Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 player. This is the current YouTube default."
 
 
794
  msgstr ""
795
 
796
- #: includes/aye-options-profiles.php:144
797
- #: includes/aye-options-profiles.php:154
798
- #: includes/aye-options-profiles.php:350
799
- #: includes/aye-options-widgets.php:91
800
  msgid "OBJECT"
801
  msgstr ""
802
 
803
- #: includes/aye-options-profiles.php:144
804
  msgid "Use the AS3 Flash player."
805
  msgstr ""
806
 
807
- #: includes/aye-options-profiles.php:145
808
- #: includes/aye-options-widgets.php:93
809
  msgid "Chromeless"
810
  msgstr ""
811
 
812
- #: includes/aye-options-profiles.php:145
813
- msgid "Use the <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-chromeless\">Chromeless</a> version of the AS3 Flash Player."
 
 
 
814
  msgstr ""
815
 
816
- #: includes/aye-options-profiles.php:146
817
- #: includes/aye-options-profiles.php:386
818
- #: includes/aye-options-widgets.php:95
819
  msgid "EmbedPlus"
820
  msgstr ""
821
 
822
- #: includes/aye-options-profiles.php:146
823
- msgid "Use <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-embedplus\">EmbedPlus</a>, if Flash is available."
 
 
824
  msgstr ""
825
 
826
- #: includes/aye-options-profiles.php:151
827
  msgid "Playlist Embed Type"
828
  msgstr ""
829
 
830
- #: includes/aye-options-profiles.php:152
831
  msgid "The type of player to use when showing playlists."
832
  msgstr ""
833
 
834
- #: includes/aye-options-profiles.php:159
835
  msgid "Options For All Player Types"
836
  msgstr ""
837
 
838
- #: includes/aye-options-profiles.php:163
839
- #: includes/aye-options-widgets.php:49
840
  msgid "Template"
841
  msgstr ""
842
 
843
- #: includes/aye-options-profiles.php:164
844
- msgid "Wrapper for video output. Must include <code>%video%</code> tag to show video position"
 
 
845
  msgstr ""
846
 
847
- #: includes/aye-options-profiles.php:168
848
- #: includes/aye-options-widgets.php:55
849
  msgid "Style"
850
  msgstr ""
851
 
852
- #: includes/aye-options-profiles.php:169
853
  msgid "CSS elements to apply to video"
854
  msgstr ""
855
 
856
- #: includes/aye-options-profiles.php:175
857
- msgid "Show Download Link"
858
- msgstr ""
859
-
860
- #: includes/aye-options-profiles.php:176
861
- #, php-format
862
- msgid "Show a link to %s under the video"
863
- msgstr ""
864
-
865
- #: includes/aye-options-profiles.php:180
866
- msgid "Download Text"
867
  msgstr ""
868
 
869
- #: includes/aye-options-profiles.php:181
870
- msgid "Text or HTML to display to prompt download"
871
  msgstr ""
872
 
873
- #: includes/aye-options-profiles.php:185
874
- msgid "Download Style"
875
  msgstr ""
876
 
877
- #: includes/aye-options-profiles.php:186
878
- msgid "CSS elements to apply to video download link"
879
  msgstr ""
880
 
881
- #: includes/aye-options-profiles.php:192
882
  msgid "Video size"
883
  msgstr ""
884
 
885
- #: includes/aye-options-profiles.php:193
886
  msgid "The width x height of the video, in pixels"
887
  msgstr ""
888
 
889
- #: includes/aye-options-profiles.php:197
890
  msgid "Default Sizes"
891
  msgstr ""
892
 
893
- #: includes/aye-options-profiles.php:199
894
  msgid "Use above sizes"
895
  msgstr ""
896
 
897
- #: includes/aye-options-profiles.php:205
898
  msgid "Select one of these default sizes to override the above video sizes"
899
  msgstr ""
900
 
901
- #: includes/aye-options-profiles.php:209
902
- #: includes/aye-options-widgets.php:73
903
  msgid "Dynamically Resize"
904
  msgstr ""
905
 
906
- #: includes/aye-options-profiles.php:210
907
  msgid "Show full width and resize with the browser"
908
  msgstr ""
909
 
910
- #: includes/aye-options-profiles.php:214
911
  msgid "Set Maximum Size"
912
  msgstr ""
913
 
914
- #: includes/aye-options-profiles.php:215
915
  msgid "Use above width to define maximum size"
916
  msgstr ""
917
 
918
- #: includes/aye-options-profiles.php:222
919
  msgid "Audio Only"
920
  msgstr ""
921
 
922
- #: includes/aye-options-profiles.php:223
923
  msgid "Only show the toolbar for audio only playback"
924
  msgstr ""
925
 
926
- #: includes/aye-options-profiles.php:227
927
- #: includes/aye-options-widgets.php:101
928
  msgid "Autoplay"
929
  msgstr ""
930
 
931
- #: includes/aye-options-profiles.php:228
932
  msgid "The video will start playing when the player loads"
933
  msgstr ""
934
 
935
- #: includes/aye-options-profiles.php:233
936
  msgid "Options Not Supported by EmbedPlus"
937
  msgstr ""
938
 
939
- #: includes/aye-options-profiles.php:238
940
  msgid "Auto hide"
941
  msgstr ""
942
 
943
- #: includes/aye-options-profiles.php:240
944
  msgid "Controls &amp; progress bar remain visible"
945
  msgstr ""
946
 
947
- #: includes/aye-options-profiles.php:241
948
  msgid "Controls &amp; progress bar fade out"
949
  msgstr ""
950
 
951
- #: includes/aye-options-profiles.php:242
952
  msgid "Progress bar fades"
953
  msgstr ""
954
 
955
- #: includes/aye-options-profiles.php:243
956
  msgid "Video controls will automatically hide after a video begins playing"
957
  msgstr ""
958
 
959
- #: includes/aye-options-profiles.php:247
960
  msgid "Controls"
961
  msgstr ""
962
 
963
- #: includes/aye-options-profiles.php:249
964
  msgid "Controls do not display &amp; Flash player loads immediately"
965
  msgstr ""
966
 
967
- #: includes/aye-options-profiles.php:250
968
  msgid "Controls display &amp; Flash player loads immediately"
969
  msgstr ""
970
 
971
- #: includes/aye-options-profiles.php:251
972
  msgid "Controls display &amp; Flash player loads once video starts"
973
  msgstr ""
974
 
975
- #: includes/aye-options-profiles.php:252
976
- msgid "Whether the video player controls will display. For AS3 player it also defines when the Flash player will load"
 
 
977
  msgstr ""
978
 
979
- #: includes/aye-options-profiles.php:257
980
- msgid "Use SSL? <a href=\"http://www.google.com/support/youtube/bin/answer.py?answer=171780&expand=UseHTTPS#HTTPS\">Read more</a>"
 
 
981
  msgstr ""
982
 
983
- #: includes/aye-options-profiles.php:261
984
- #: includes/aye-options-widgets.php:147
985
  msgid "Loop Video"
986
  msgstr ""
987
 
988
- #: includes/aye-options-profiles.php:262
989
- msgid "Play the initial video again and again. In the case of a playlist, this will play the entire playlist and then start again at the first video"
 
 
990
  msgstr ""
991
 
992
- #: includes/aye-options-profiles.php:266
993
  msgid "Information"
994
  msgstr ""
995
 
996
- #: includes/aye-options-profiles.php:267
997
- msgid "Display the video title and uploader before the video starts. If displaying a playlist this will show video thumbnails"
 
 
998
  msgstr ""
999
 
1000
- #: includes/aye-options-profiles.php:271
1001
  msgid "Related Videos"
1002
  msgstr ""
1003
 
1004
- #: includes/aye-options-profiles.php:272
1005
- msgid "Load related videos once playback starts. Also toggles the search option."
 
1006
  msgstr ""
1007
 
1008
- #: includes/aye-options-profiles.php:276
1009
  msgid "Theme"
1010
  msgstr ""
1011
 
1012
- #: includes/aye-options-profiles.php:278
1013
  msgid "Dark"
1014
  msgstr ""
1015
 
1016
- #: includes/aye-options-profiles.php:279
1017
  msgid "Light"
1018
  msgstr ""
1019
 
1020
- #: includes/aye-options-profiles.php:280
1021
  msgid "Display player controls within a dark or light control bar"
1022
  msgstr ""
1023
 
1024
- #: includes/aye-options-profiles.php:284
1025
  msgid "Progress Bar Colour"
1026
  msgstr ""
1027
 
1028
- #: includes/aye-options-profiles.php:286
1029
  msgid "Red"
1030
  msgstr ""
1031
 
1032
- #: includes/aye-options-profiles.php:287
1033
  msgid "White (desaturated)"
1034
  msgstr ""
1035
 
1036
- #: includes/aye-options-profiles.php:288
1037
- msgid "The colour that will be used in the player's video progress bar to highlight the amount of the video that's already been seen"
 
 
1038
  msgstr ""
1039
 
1040
- #: includes/aye-options-profiles.php:292
1041
  msgid "Modest Branding"
1042
  msgstr ""
1043
 
1044
- #: includes/aye-options-profiles.php:293
1045
  msgid "Reduce branding on video."
1046
  msgstr ""
1047
 
1048
- #: includes/aye-options-profiles.php:298
1049
  msgid "Options for AS3 Player"
1050
  msgstr ""
1051
 
1052
- #: includes/aye-options-profiles.php:299
1053
- msgid "The following options are not supported if using EmbedPlus or if the IFRAME player uses HTML5."
 
 
1054
  msgstr ""
1055
 
1056
- #: includes/aye-options-profiles.php:303
1057
  msgid "Annotations"
1058
  msgstr ""
1059
 
1060
- #: includes/aye-options-profiles.php:304
1061
  msgid "Video annotations are shown by default"
1062
  msgstr ""
1063
 
1064
- #: includes/aye-options-profiles.php:308
1065
  msgid "Closed Captions"
1066
  msgstr ""
1067
 
1068
- #: includes/aye-options-profiles.php:309
1069
- msgid "Show closed captions (subtitles) by default, even if the user has turned captions off"
 
 
1070
  msgstr ""
1071
 
1072
- #: includes/aye-options-profiles.php:313
1073
  msgid "Disable Keyboard"
1074
  msgstr ""
1075
 
1076
- #: includes/aye-options-profiles.php:314
1077
  msgid "Disable the player keyboard controls"
1078
  msgstr ""
1079
 
1080
- #: includes/aye-options-profiles.php:318
1081
  msgid "Fullscreen"
1082
  msgstr ""
1083
 
1084
- #: includes/aye-options-profiles.php:319
1085
  msgid "A button will allow the viewer to watch the video fullscreen"
1086
  msgstr ""
1087
 
1088
- #: includes/aye-options-profiles.php:323
1089
  msgid "Link to YouTube"
1090
  msgstr ""
1091
 
1092
- #: includes/aye-options-profiles.php:324
1093
  msgid "Video links back to YouTube when clicked"
1094
  msgstr ""
1095
 
1096
- #: includes/aye-options-profiles.php:329
1097
  msgid "Options Not Supported by HTML5 Player"
1098
  msgstr ""
1099
 
1100
- #: includes/aye-options-profiles.php:333
1101
  msgid "Window Mode"
1102
  msgstr ""
1103
 
1104
- #: includes/aye-options-profiles.php:335
1105
  msgid "Opaque"
1106
  msgstr ""
1107
 
1108
- #: includes/aye-options-profiles.php:336
1109
  msgid "Transparent"
1110
  msgstr ""
1111
 
1112
- #: includes/aye-options-profiles.php:337
1113
  msgid "Window"
1114
  msgstr ""
1115
 
1116
- #: includes/aye-options-profiles.php:338
1117
- msgid "Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. <a href=\"http://www.communitymx.com/content/article.cfm?cid=e5141\">Learn more</a>."
 
 
 
1118
  msgstr ""
1119
 
1120
- #: includes/aye-options-profiles.php:343
1121
  msgid "Options Only Supported By EmbedPlus"
1122
  msgstr ""
1123
 
1124
- #: includes/aye-options-profiles.php:343
1125
  msgid "Learn more about EmbedPlus"
1126
  msgstr ""
1127
 
1128
- #: includes/aye-options-profiles.php:347
1129
  msgid "Fallback Embed Type"
1130
  msgstr ""
1131
 
1132
- #: includes/aye-options-profiles.php:348
1133
- msgid "The type of player to use if Flash is not available and EmbedPlus cannot be used."
 
 
1134
  msgstr ""
1135
 
1136
- #: includes/aye-options-profiles.php:354
1137
  msgid "Play HD"
1138
  msgstr ""
1139
 
1140
- #: includes/aye-options-profiles.php:355
1141
  msgid "Play the video in HD if possible"
1142
  msgstr ""
1143
 
1144
- #: includes/aye-options-profiles.php:359
1145
  msgid "Real-time Reactions"
1146
  msgstr ""
1147
 
1148
- #: includes/aye-options-profiles.php:360
1149
  msgid "Show the Real-time Reactions button"
1150
  msgstr ""
1151
 
1152
- #: includes/aye-options-profiles.php:364
1153
  msgid "Sweet Spots"
1154
  msgstr ""
1155
 
1156
- #: includes/aye-options-profiles.php:365
1157
  msgid "Find sweet spots for the next and previous buttons"
1158
  msgstr ""
1159
 
1160
- #: includes/aye-options-profiles.php:375
1161
- msgid "Would you like the video below to be yours? <a href=\"http://www.artiss.co.uk/youtube-embed/further-help#ye-sponsorship\">Click here</a> for sponsorship information."
1162
- msgstr ""
1163
-
1164
- #: includes/aye-options-profiles.php:382
1165
  msgid "YouTube Video Sample"
1166
  msgstr ""
1167
 
1168
- #: includes/aye-options-profiles.php:383
1169
- msgid "The video below uses the above, saved profile settings. Use the drop-down below to change which parameters the video uses - press the Change Video button to update it."
 
 
 
1170
  msgstr ""
1171
 
1172
- #: includes/aye-options-profiles.php:385
1173
  msgid "Standard"
1174
  msgstr ""
1175
 
1176
- #: includes/aye-options-profiles.php:387
1177
  msgid "3D"
1178
  msgstr ""
1179
 
1180
- #: includes/aye-options-profiles.php:388
1181
  msgid "Playlist"
1182
  msgstr ""
1183
 
1184
- #: includes/aye-options-profiles.php:391
1185
  msgid "Change video"
1186
  msgstr ""
1187
 
1188
- #: includes/aye-options-widgets.php:13
1189
  msgid "Widget Title"
1190
  msgstr ""
1191
 
1192
- #: includes/aye-options-widgets.php:27
1193
  msgid "ID Type"
1194
  msgstr ""
1195
 
1196
- #: includes/aye-options-widgets.php:29
1197
  msgid "Video or Playlist"
1198
  msgstr ""
1199
 
1200
- #: includes/aye-options-widgets.php:31
1201
  msgid "Search"
1202
  msgstr ""
1203
 
1204
- #: includes/aye-options-widgets.php:33
1205
  msgid "User"
1206
  msgstr ""
1207
 
1208
- #: includes/aye-options-widgets.php:41
1209
- #: includes/aye-shared-functions.php:488
1210
  msgid "Profile"
1211
  msgstr ""
1212
 
1213
- #: includes/aye-options-widgets.php:61
1214
  msgid "Size"
1215
  msgstr ""
1216
 
1217
- #: includes/aye-options-widgets.php:75
1218
- #: includes/aye-options-widgets.php:87
1219
- #: includes/aye-options-widgets.php:103
1220
- #: includes/aye-options-widgets.php:135
1221
- #: includes/aye-options-widgets.php:149
1222
  msgid "Profile default"
1223
  msgstr ""
1224
 
1225
- #: includes/aye-options-widgets.php:77
1226
- #: includes/aye-options-widgets.php:105
1227
- #: includes/aye-options-widgets.php:151
1228
  msgid "No"
1229
  msgstr ""
1230
 
1231
- #: includes/aye-options-widgets.php:79
1232
- #: includes/aye-options-widgets.php:107
1233
- #: includes/aye-options-widgets.php:153
1234
  msgid "Yes"
1235
  msgstr ""
1236
 
1237
- #: includes/aye-options-widgets.php:85
1238
  msgid "Embed Type"
1239
  msgstr ""
1240
 
1241
- #: includes/aye-options-widgets.php:113
1242
  msgid "Start (seconds)"
1243
  msgstr ""
1244
 
1245
- #: includes/aye-options-widgets.php:119
1246
  msgid "Stop (seconds)"
1247
  msgstr ""
1248
 
1249
- #: includes/aye-options-widgets.php:124
1250
  msgid "Non-EmbedPlus Options"
1251
  msgstr ""
1252
 
1253
- #: includes/aye-options-widgets.php:133
1254
  msgid "List Playback"
1255
  msgstr ""
1256
 
1257
- #: includes/aye-options-widgets.php:137
1258
  msgid "Play each video in order"
1259
  msgstr ""
1260
 
1261
- #: includes/aye-options-widgets.php:139
1262
  msgid "Play videos randomly"
1263
  msgstr ""
1264
 
1265
- #: includes/aye-options-widgets.php:141
1266
  msgid "Play one random video"
1267
  msgstr ""
1268
 
1269
- #: includes/aye-set-defaults.php:103
1270
  msgid "The video cannot be shown at the moment. Please try again later."
1271
  msgstr ""
1272
 
1273
- #: includes/aye-shared-functions.php:240
1274
  #, php-format
1275
  msgid "An error occurred accessing the YouTube API for video ID %s - %s"
1276
  msgstr ""
1277
-
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Vixy YouTube Embed\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-02-05 13:42-0000\n"
6
+ "PO-Revision-Date: 2013-02-05 13:44-0000\n"
7
  "Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_x;"
13
+ "_ex;esc_attr_x;esc_html_x;_n;_nx;_n_noop;_nx_noop\n"
14
  "X-Poedit-Basepath: ../\n"
15
+ "X-Generator: Poedit 1.5.4\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
+ #: includes/add-to-admin-bar.php:36 includes/add-to-admin-bar.php:76
19
+ #: includes/generate-widgets.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  msgid "YouTube Embed"
21
  msgstr ""
22
 
23
+ #: includes/add-to-admin-bar.php:82
 
24
  msgid "Instructions"
25
  msgstr ""
26
 
27
+ #: includes/add-to-admin-bar.php:91 includes/admin-config.php:93
 
28
  msgid "Options"
29
  msgstr ""
30
 
31
+ #: includes/add-to-admin-bar.php:100 includes/admin-config.php:103
 
32
  msgid "Profiles"
33
  msgstr ""
34
 
35
+ #: includes/add-to-admin-bar.php:109 includes/admin-config.php:113
 
36
  msgid "Lists"
37
  msgstr ""
38
 
39
+ #: includes/admin-config.php:29
40
  msgid "Settings"
41
  msgstr ""
42
 
43
+ #: includes/admin-config.php:54
44
  msgid "Support"
45
  msgstr ""
46
 
47
+ #: includes/admin-config.php:87
48
+ msgid "About Vixy YouTube Embed"
49
  msgstr ""
50
 
51
+ #: includes/admin-config.php:87
52
  msgid "YouTube"
53
  msgstr ""
54
 
55
+ #: includes/admin-config.php:93 includes/options-general.php:14
56
+ msgid "Vixy YouTube Embed Options"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  msgstr ""
58
 
59
+ #: includes/admin-config.php:103 includes/options-profiles.php:17
60
+ msgid "Vixy YouTube Embed Profiles"
61
  msgstr ""
62
 
63
+ #: includes/admin-config.php:113 includes/options-lists.php:15
64
+ msgid "Vixy YouTube Embed Lists"
65
  msgstr ""
66
 
67
+ #: includes/admin-config.php:209 includes/admin-config.php:250
68
+ #: includes/admin-config.php:292
 
 
69
  msgid "Help"
70
  msgstr ""
71
 
72
+ #: includes/admin-config.php:224
73
+ msgid ""
74
+ "This screen allows you to select non-specific options for the Vixy YouTube "
75
+ "Embed plugin. For the default embedding settings, please select the <a href="
76
+ "\"admin.php?page=profile-options\">Profiles</a> administration option."
77
  msgstr ""
78
 
79
+ #: includes/admin-config.php:225 includes/admin-config.php:266
80
+ #: includes/admin-config.php:308
81
+ msgid ""
82
+ "Remember to click the Save Settings button at the bottom of the screen for "
83
+ "new settings to take effect."
84
  msgstr ""
85
 
86
+ #: includes/admin-config.php:226 includes/admin-config.php:267
87
+ #: includes/admin-config.php:309
 
 
88
  msgid "For more information:"
89
  msgstr ""
90
 
91
+ #: includes/admin-config.php:227 includes/admin-config.php:268
92
+ #: includes/admin-config.php:310
93
+ msgid "Vixy YouTube Embed Plugin Documentation"
 
 
94
  msgstr ""
95
 
96
+ #: includes/admin-config.php:228 includes/admin-config.php:269
97
+ #: includes/admin-config.php:311
 
 
98
  msgid "YouTube Player Documentation"
99
  msgstr ""
100
 
101
+ #: includes/admin-config.php:265
102
+ msgid ""
103
+ "This screen allows you to set the options for the default and additional "
104
+ "profiles. If you don't specify a specific parameter when displaying your "
105
+ "YouTube video then the default profile option will be used instead. "
106
+ "Additional profiles, which you may name, can be used as well and used as "
107
+ "required."
 
 
 
108
  msgstr ""
109
 
110
+ #: includes/admin-config.php:270
111
  msgid "EmbedPlus website"
112
  msgstr ""
113
 
114
+ #: includes/admin-config.php:307
115
+ msgid ""
116
+ "This screen allows you to create lists of YouTube videos, which may be "
117
+ "named. These lists can then be used in preference to a single video ID."
 
 
118
  msgstr ""
119
 
120
+ #: includes/admin-config.php:369
121
+ msgid "Welcome to Vixy YouTube Embed"
122
  msgstr ""
123
 
124
+ #: includes/admin-config.php:370
125
  msgid "Thank you for installing this plugin."
126
  msgstr ""
127
 
128
+ #: includes/admin-config.php:371
129
+ msgid ""
130
+ "These new menu options will allow you to configure your videos to just how "
131
+ "you want them and provide links for help and support."
132
  msgstr ""
133
 
134
+ #: includes/admin-config.php:372
135
+ msgid ""
136
+ "Even if you do nothing else, please visit the Profiles option to check your "
137
+ "default video values."
138
  msgstr ""
139
 
140
+ #: includes/deprecated.php:55
141
  msgid "This function does not support playlists"
142
  msgstr ""
143
 
144
+ #: includes/function-calls.php:162 includes/function-calls.php:223
145
+ #: includes/generate-download-code.php:34 includes/generate-embed-code.php:114
146
+ #: includes/generate-shorturl-code.php:34
147
+ #: includes/generate-thumbnail-code.php:39
148
+ #: includes/generate-transcript-code.php:38 includes/shortcodes.php:261
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  #, php-format
150
  msgid "The YouTube ID of %s is invalid."
151
  msgstr ""
152
 
153
+ #: includes/function-calls.php:173
154
  #, php-format
155
  msgid "Could not fetch the transcript file %s."
156
  msgstr ""
157
 
158
+ #: includes/generate-download-code.php:21
159
  msgid "No YouTube ID was found."
160
  msgstr ""
161
 
162
+ #: includes/generate-embed-code.php:64
163
  msgid "No video/playlist ID has been supplied"
164
  msgstr ""
165
 
166
+ #: includes/generate-embed-code.php:181
167
+ msgid ""
168
+ "A video list cannot be viewed within this feed - please view the original "
169
+ "content"
170
  msgstr ""
171
 
172
+ #: includes/generate-embed-code.php:185
173
  msgid "Click here to view the video on YouTube"
174
  msgstr ""
175
 
176
+ #: includes/generate-shorturl-code.php:22
177
  msgid "No video ID has been supplied"
178
  msgstr ""
179
 
180
+ #: includes/generate-thumbnail-code.php:51
181
  #, php-format
182
  msgid "YouTube Video %s"
183
  msgstr ""
184
 
185
+ #: includes/generate-widgets.php:25
186
  msgid "Embed YouTube Widget."
187
  msgstr ""
188
 
189
+ #: includes/options-general.php:63 includes/options-lists.php:28
 
190
  msgid "Settings Saved."
191
  msgstr ""
192
 
193
+ #: includes/options-general.php:87
194
  msgid "Cache cleared."
195
  msgstr ""
196
 
197
+ #: includes/options-general.php:101
198
+ msgid ""
199
+ "These are the general settings for Vixy YouTube Embed. Please select <a href="
200
+ "\"admin.php?page=profile-options\">Profiles</a> for default embedding "
201
+ "settings."
 
 
 
 
 
202
  msgstr ""
203
 
204
+ #: includes/options-general.php:105
205
  msgid "Embedding"
206
  msgstr ""
207
 
208
+ #: includes/options-general.php:109
209
  msgid "Add Metadata"
210
  msgstr ""
211
 
212
+ #: includes/options-general.php:110
213
+ msgid ""
214
+ "Allow rich metadata to be added to code. <a href=\"http://wordpress.org/"
215
+ "extend/plugins/youtube-embed/other_notes#Metadata\">Learn more</a>"
216
  msgstr ""
217
 
218
+ #: includes/options-general.php:114
219
  msgid "Comment Embedding"
220
  msgstr ""
221
 
222
+ #: includes/options-general.php:115
223
+ msgid ""
224
+ "Allow YouTube URLs in comments - will display as embedded videos. <a href="
225
+ "\"http://wordpress.org/extend/plugins/youtube-embed/other_notes#Videos-in-"
226
+ "Comments\">Learn more</a>"
227
  msgstr ""
228
 
229
+ #: includes/options-general.php:119 includes/options-general.php:160
230
+ #: includes/options-general.php:172 includes/options-general.php:193
 
 
231
  msgid "Profile to use"
232
  msgstr ""
233
 
234
+ #: includes/options-general.php:126
235
  msgid "Feed"
236
  msgstr ""
237
 
238
+ #: includes/options-general.php:128
239
  msgid "Text link"
240
  msgstr ""
241
 
242
+ #: includes/options-general.php:129
243
  msgid "Thumbnail"
244
  msgstr ""
245
 
246
+ #: includes/options-general.php:130
247
  msgid "Thumbnail &amp; Text Link"
248
  msgstr ""
249
 
250
+ #: includes/options-general.php:131
251
+ msgid ""
252
+ "Videos cannot be embedded in feeds. Select how you wish them to be shown "
253
+ "instead"
254
  msgstr ""
255
 
256
+ #: includes/options-general.php:135
257
  msgid "Thumbnail to use"
258
  msgstr ""
259
 
260
+ #: includes/options-general.php:137 includes/shared-functions.php:481
 
261
  msgid "Default"
262
  msgstr ""
263
 
264
+ #: includes/options-general.php:138
265
  msgid "Default (HQ)"
266
  msgstr ""
267
 
268
+ #: includes/options-general.php:139
269
  msgid "Start"
270
  msgstr ""
271
 
272
+ #: includes/options-general.php:140
273
  msgid "Middle"
274
  msgstr ""
275
 
276
+ #: includes/options-general.php:141
277
  msgid "End"
278
  msgstr ""
279
 
280
+ #: includes/options-general.php:142
281
  msgid "Which thumbnail to use"
282
  msgstr ""
283
 
284
+ #: includes/options-general.php:146
285
  msgid "Allow shortcodes in widgets"
286
  msgstr ""
287
 
288
+ #: includes/options-general.php:147
289
+ msgid ""
290
+ "Allow shortcodes to be used in widgets - this will apply to <strong>all</"
291
+ "strong> widgets"
292
  msgstr ""
293
 
294
+ #: includes/options-general.php:151
295
  msgid "Alternative Shortcodes"
296
  msgstr ""
297
 
298
+ #: includes/options-general.php:151
299
+ msgid ""
300
+ "Specify up to 2 alternative shortcodes to compliment the standard "
301
+ "<code>youtube</code> shortcode. <strong>NB: These should be specified "
302
+ "without the surrounding square brackets.</strong>"
303
  msgstr ""
304
 
305
+ #: includes/options-general.php:155
306
  msgid "Alternative Shortcode 1"
307
  msgstr ""
308
 
309
+ #: includes/options-general.php:167
310
  msgid "Alternative Shortcode 2"
311
  msgstr ""
312
 
313
+ #: includes/options-general.php:179
314
  msgid "Migration"
315
  msgstr ""
316
 
317
+ #: includes/options-general.php:179
318
+ msgid ""
319
+ "Switch on compatibility with other embedding plugins. For more details "
320
+ "please <a href=\"http://wordpress.org/extend/plugins/youtube-embed/"
321
+ "other_notes#Migration\">click here</a>."
322
  msgstr ""
323
 
324
+ #: includes/options-general.php:183
325
  msgid "Bracket Embedding"
326
  msgstr ""
327
 
328
+ #: includes/options-general.php:184
329
+ msgid ""
330
+ "Allow embedding using URLs within brackets. Activating impacts performance"
331
  msgstr ""
332
 
333
+ #: includes/options-general.php:188
334
  msgid "Alternative Embedding"
335
  msgstr ""
336
 
337
+ #: includes/options-general.php:189
338
  msgid "Allow all other types of embedding. Activating impacts performance"
339
  msgstr ""
340
 
341
+ #: includes/options-general.php:196
342
  msgid "For above 2 options"
343
  msgstr ""
344
 
345
+ #: includes/options-general.php:200
346
  msgid "Admin Options"
347
  msgstr ""
348
 
349
+ #: includes/options-general.php:204
350
  msgid "Show Editor Button"
351
  msgstr ""
352
 
353
+ #: includes/options-general.php:205
354
  msgid "Show the YouTube button on the post editor"
355
  msgstr ""
356
 
357
+ #: includes/options-general.php:209
358
  msgid "Editor Button Shortcode"
359
  msgstr ""
360
 
361
+ #: includes/options-general.php:210
362
  msgid "Shortcode for editor button to use."
363
  msgstr ""
364
 
365
+ #: includes/options-general.php:214
366
  msgid "Add to Admin Bar"
367
  msgstr ""
368
 
369
+ #: includes/options-general.php:215
370
  msgid "Add link to options screen to Admin Bar"
371
  msgstr ""
372
 
373
+ #: includes/options-general.php:219
374
+ msgid "Menu Screen Access"
375
  msgstr ""
376
 
377
+ #: includes/options-general.php:221
 
378
  msgid "Administrator"
379
  msgstr ""
380
 
381
+ #: includes/options-general.php:222
 
382
  msgid "Editor"
383
  msgstr ""
384
 
385
+ #: includes/options-general.php:223
 
386
  msgid "Author"
387
  msgstr ""
388
 
389
+ #: includes/options-general.php:224
 
390
  msgid "Contributor"
391
  msgstr ""
392
 
393
+ #: includes/options-general.php:225
394
+ msgid "Specify the user access required for the menu screens"
 
 
 
 
395
  msgstr ""
396
 
397
+ #: includes/options-general.php:229
 
 
 
 
398
  msgid "Profile &amp; List Sizes"
399
  msgstr ""
400
 
401
+ #: includes/options-general.php:233
402
  msgid "Number of Profiles"
403
  msgstr ""
404
 
405
+ #: includes/options-general.php:234
406
  msgid "Maximum number of profiles"
407
  msgstr ""
408
 
409
+ #: includes/options-general.php:238
410
  msgid "Number of Lists"
411
  msgstr ""
412
 
413
+ #: includes/options-general.php:239
414
  msgid "Maximum number of lists"
415
  msgstr ""
416
 
417
+ #: includes/options-general.php:243
418
  msgid "Performance"
419
  msgstr ""
420
 
421
+ #: includes/options-general.php:247
422
  msgid "Embed Cache"
423
  msgstr ""
424
 
425
+ #: includes/options-general.php:248
426
  msgid "How many hours to retain embed output. 0 to switch off"
427
  msgstr ""
428
 
429
+ #: includes/options-general.php:252
430
  msgid "Video Information Cache"
431
  msgstr ""
432
 
433
+ #: includes/options-general.php:253
434
+ msgid ""
435
+ "How many hours to retain video information, including it's validity. 0 to "
436
+ "switch off"
437
  msgstr ""
438
 
439
+ #: includes/options-general.php:257
440
  msgid "Transcript Cache"
441
  msgstr ""
442
 
443
+ #: includes/options-general.php:258
444
  msgid "How many hours to store transcripts for in cache. 0 to switch off"
445
  msgstr ""
446
 
447
+ #: includes/options-general.php:267
448
  msgid "You currently have cache for"
449
  msgstr ""
450
 
451
+ #: includes/options-general.php:267
452
  msgid "and"
453
  msgstr ""
454
 
455
+ #: includes/options-general.php:271
456
  msgid "Clear Cache"
457
  msgstr ""
458
 
459
+ #: includes/options-general.php:272
460
  msgid "Select this option to remove all YouTube Embed cache."
461
  msgstr ""
462
 
463
+ #: includes/options-general.php:275
464
  msgid "YouTube API"
465
  msgstr ""
466
 
467
+ #: includes/options-general.php:277
468
+ msgid ""
469
+ "The YouTube API is used to validate video IDs and to determine if it is a "
470
+ "video or playlist."
471
  msgstr ""
472
 
473
+ #: includes/options-general.php:281
474
  msgid "API State"
475
  msgstr ""
476
 
477
+ #: includes/options-general.php:283
478
  msgid "API should not be used"
479
  msgstr ""
480
 
481
+ #: includes/options-general.php:284
482
  msgid "HTTP API used and errors are reported"
483
  msgstr ""
484
 
485
+ #: includes/options-general.php:285
486
  msgid "HTTPS API used and errors are reported"
487
  msgstr ""
488
 
489
+ #: includes/options-general.php:286
490
  msgid "HTTP API used and no errors are reported"
491
  msgstr ""
492
 
493
+ #: includes/options-general.php:287
494
  msgid "HTTPS API used and no errors are reported"
495
  msgstr ""
496
 
497
+ #: includes/options-general.php:292
498
  msgid "Error Reporting"
499
  msgstr ""
500
 
501
+ #: includes/options-general.php:294
502
+ msgid ""
503
+ "Playback errors are within the XHTML source code as comments - parameter "
504
+ "errors and other types are displayed on the post output."
505
  msgstr ""
506
 
507
+ #: includes/options-general.php:297
508
  msgid "Video Playback Error Message"
509
  msgstr ""
510
 
511
+ #: includes/options-general.php:298
512
  msgid "This is the message that will be shown on the post"
513
  msgstr ""
514
 
515
+ #: includes/options-general.php:301
516
  msgid "Security"
517
  msgstr ""
518
 
519
+ #: includes/options-general.php:306
520
  msgid "Privacy-Enhanced Mode"
521
  msgstr ""
522
 
523
+ #: includes/options-general.php:308
524
  msgid "Cookies should always be stored"
525
  msgstr ""
526
 
527
+ #: includes/options-general.php:309
528
  msgid "Cookies should never be stored"
529
  msgstr ""
530
 
531
+ #: includes/options-general.php:310
532
  msgid "Cookies should be stored based on user's Do Not Track setting"
533
  msgstr ""
534
 
535
+ #: includes/options-general.php:311
536
  msgid "Read more about <a href=\"http://donottrack.us/\">Do Not Track</a>"
537
  msgstr ""
538
 
539
+ #: includes/options-general.php:314
540
  msgid "Compatibility"
541
  msgstr ""
542
 
543
+ #: includes/options-general.php:317
544
  msgid "Allow Frame Border on IFRAME"
545
  msgstr ""
546
 
547
+ #: includes/options-general.php:318
548
  msgid "FRAMEBORDER is not HTML5 compliant"
549
  msgstr ""
550
 
551
+ #: includes/options-general.php:321
552
+ msgid "Affiliates"
553
+ msgstr ""
554
+
555
+ #: includes/options-general.php:323
556
+ msgid "ShareASale ID"
557
+ msgstr ""
558
+
559
+ #: includes/options-general.php:324
560
+ msgid ""
561
+ "<a href=\"http://www.shareasale.com/r.cfm?B=44&U=668714&M=47&urllink=\">Sign "
562
+ "up to ShareASale</a> and earn money. <a href=\"http://wordpress.org/extend/"
563
+ "plugins/youtube-embed/other_notes#Make-Money-from-Vixy-YouTube-Embed\">Read "
564
+ "more</a>."
565
+ msgstr ""
566
+
567
+ #: includes/options-general.php:329 includes/options-lists.php:121
568
+ #: includes/options-profiles.php:361
569
  msgid "Save Settings"
570
  msgstr ""
571
 
572
+ #: includes/options-lists.php:33
573
  msgid "All fields must be completed."
574
  msgstr ""
575
 
576
+ #: includes/options-lists.php:55
577
  msgid "Errors were found with your video list. See the list below for details."
578
  msgstr ""
579
 
580
+ #: includes/options-lists.php:90
581
  msgid "List"
582
  msgstr ""
583
 
584
+ #: includes/options-lists.php:100
585
  msgid "Change list"
586
  msgstr ""
587
 
588
+ #: includes/options-lists.php:103
589
  msgid "These are the options for list "
590
  msgstr ""
591
 
592
+ #: includes/options-lists.php:103
593
+ msgid ""
594
+ "Update the name, if required, and specify a list of YouTube video IDs. Use "
595
+ "the drop-down on the right hand side to swap between lists."
596
  msgstr ""
597
 
598
+ #: includes/options-lists.php:108
599
  msgid "List name"
600
  msgstr ""
601
 
602
+ #: includes/options-lists.php:110
603
  msgid "The name you wish to give this list"
604
  msgstr ""
605
 
606
+ #: includes/options-lists.php:114
607
  msgid "Video IDs (one per line)"
608
  msgstr ""
609
 
610
+ #: includes/options-lists.php:132 includes/options-widgets.php:19
 
611
  msgid "Video ID"
612
  msgstr ""
613
 
614
+ #: includes/options-lists.php:132
615
  msgid "Video Title"
616
  msgstr ""
617
 
618
+ #: includes/options-lists.php:132
619
  msgid "Status"
620
  msgstr ""
621
 
622
+ #: includes/options-lists.php:148
623
  msgid "This is a playlist"
624
  msgstr ""
625
 
626
+ #: includes/options-lists.php:152
627
  msgid "Invalid video ID"
628
  msgstr ""
629
 
630
+ #: includes/options-lists.php:156
631
  msgid "YouTube API error"
632
  msgstr ""
633
 
634
+ #: includes/options-lists.php:159
635
  msgid "Valid video"
636
  msgstr ""
637
 
638
+ #: includes/options-lists.php:177
639
  msgid "The video ID is valid"
640
  msgstr ""
641
 
642
+ #: includes/options-lists.php:180
643
  msgid "The video ID is invalid"
644
  msgstr ""
645
 
646
+ #: includes/options-profiles.php:94
647
  msgid " Profile Saved."
648
  msgstr ""
649
 
650
+ #: includes/options-profiles.php:115
651
  msgid "Change profile"
652
  msgstr ""
653
 
654
+ #: includes/options-profiles.php:120
655
  msgid "These are the options for the default profile."
656
  msgstr ""
657
 
658
+ #: includes/options-profiles.php:122
659
  #, php-format
660
  msgid "These are the options for profile %s."
661
  msgstr ""
662
 
663
+ #: includes/options-profiles.php:124
664
  msgid "Use the drop-down on the right hand side to swap between profiles."
665
  msgstr ""
666
 
667
+ #: includes/options-profiles.php:130
668
  msgid "Profile name"
669
  msgstr ""
670
 
671
+ #: includes/options-profiles.php:132
672
  msgid "The name you wish to give this profile"
673
  msgstr ""
674
 
675
+ #: includes/options-profiles.php:136
676
  msgid "Video Embed Type"
677
  msgstr ""
678
 
679
+ #: includes/options-profiles.php:137
680
  msgid "The type of player to use for videos."
681
  msgstr ""
682
 
683
+ #: includes/options-profiles.php:138 includes/options-profiles.php:148
684
+ #: includes/options-profiles.php:339 includes/options-widgets.php:89
 
 
685
  msgid "IFRAME"
686
  msgstr ""
687
 
688
+ #: includes/options-profiles.php:138
689
+ msgid ""
690
+ "Uses AS3 Flash player, if Flash is available. Alternatively, uses HTML5 "
691
+ "player. This is the current YouTube default."
692
  msgstr ""
693
 
694
+ #: includes/options-profiles.php:139 includes/options-profiles.php:149
695
+ #: includes/options-profiles.php:340 includes/options-widgets.php:91
 
 
696
  msgid "OBJECT"
697
  msgstr ""
698
 
699
+ #: includes/options-profiles.php:139
700
  msgid "Use the AS3 Flash player."
701
  msgstr ""
702
 
703
+ #: includes/options-profiles.php:140 includes/options-widgets.php:93
 
704
  msgid "Chromeless"
705
  msgstr ""
706
 
707
+ #: includes/options-profiles.php:140
708
+ msgid ""
709
+ "Use the <a href=\"http://wordpress.org/extend/plugins/youtube-embed/"
710
+ "other_notes#The-Chromeless-Player\">Chromeless</a> version of the AS3 Flash "
711
+ "Player."
712
  msgstr ""
713
 
714
+ #: includes/options-profiles.php:141 includes/options-profiles.php:374
715
+ #: includes/options-widgets.php:95
 
716
  msgid "EmbedPlus"
717
  msgstr ""
718
 
719
+ #: includes/options-profiles.php:141
720
+ msgid ""
721
+ "Use <a href=\"http://wordpress.org/extend/plugins/youtube-embed/"
722
+ "other_notes#EmbedPlus\">EmbedPlus</a>, if Flash is available."
723
  msgstr ""
724
 
725
+ #: includes/options-profiles.php:146
726
  msgid "Playlist Embed Type"
727
  msgstr ""
728
 
729
+ #: includes/options-profiles.php:147
730
  msgid "The type of player to use when showing playlists."
731
  msgstr ""
732
 
733
+ #: includes/options-profiles.php:154
734
  msgid "Options For All Player Types"
735
  msgstr ""
736
 
737
+ #: includes/options-profiles.php:158 includes/options-widgets.php:49
 
738
  msgid "Template"
739
  msgstr ""
740
 
741
+ #: includes/options-profiles.php:159
742
+ msgid ""
743
+ "Wrapper for video output. Must include <code>%video%</code> tag to show "
744
+ "video position"
745
  msgstr ""
746
 
747
+ #: includes/options-profiles.php:163 includes/options-widgets.php:55
 
748
  msgid "Style"
749
  msgstr ""
750
 
751
+ #: includes/options-profiles.php:164
752
  msgid "CSS elements to apply to video"
753
  msgstr ""
754
 
755
+ #: includes/options-profiles.php:170
756
+ msgid "Show Download Bar"
 
 
 
 
 
 
 
 
 
757
  msgstr ""
758
 
759
+ #: includes/options-profiles.php:171
760
+ msgid "Show a download bar under the video"
761
  msgstr ""
762
 
763
+ #: includes/options-profiles.php:175
764
+ msgid "Bar Style"
765
  msgstr ""
766
 
767
+ #: includes/options-profiles.php:176
768
+ msgid "CSS elements to apply to video download bar"
769
  msgstr ""
770
 
771
+ #: includes/options-profiles.php:182
772
  msgid "Video size"
773
  msgstr ""
774
 
775
+ #: includes/options-profiles.php:183
776
  msgid "The width x height of the video, in pixels"
777
  msgstr ""
778
 
779
+ #: includes/options-profiles.php:187
780
  msgid "Default Sizes"
781
  msgstr ""
782
 
783
+ #: includes/options-profiles.php:189
784
  msgid "Use above sizes"
785
  msgstr ""
786
 
787
+ #: includes/options-profiles.php:195
788
  msgid "Select one of these default sizes to override the above video sizes"
789
  msgstr ""
790
 
791
+ #: includes/options-profiles.php:199 includes/options-widgets.php:73
 
792
  msgid "Dynamically Resize"
793
  msgstr ""
794
 
795
+ #: includes/options-profiles.php:200
796
  msgid "Show full width and resize with the browser"
797
  msgstr ""
798
 
799
+ #: includes/options-profiles.php:204
800
  msgid "Set Maximum Size"
801
  msgstr ""
802
 
803
+ #: includes/options-profiles.php:205
804
  msgid "Use above width to define maximum size"
805
  msgstr ""
806
 
807
+ #: includes/options-profiles.php:212
808
  msgid "Audio Only"
809
  msgstr ""
810
 
811
+ #: includes/options-profiles.php:213
812
  msgid "Only show the toolbar for audio only playback"
813
  msgstr ""
814
 
815
+ #: includes/options-profiles.php:217 includes/options-widgets.php:101
 
816
  msgid "Autoplay"
817
  msgstr ""
818
 
819
+ #: includes/options-profiles.php:218
820
  msgid "The video will start playing when the player loads"
821
  msgstr ""
822
 
823
+ #: includes/options-profiles.php:223
824
  msgid "Options Not Supported by EmbedPlus"
825
  msgstr ""
826
 
827
+ #: includes/options-profiles.php:228
828
  msgid "Auto hide"
829
  msgstr ""
830
 
831
+ #: includes/options-profiles.php:230
832
  msgid "Controls &amp; progress bar remain visible"
833
  msgstr ""
834
 
835
+ #: includes/options-profiles.php:231
836
  msgid "Controls &amp; progress bar fade out"
837
  msgstr ""
838
 
839
+ #: includes/options-profiles.php:232
840
  msgid "Progress bar fades"
841
  msgstr ""
842
 
843
+ #: includes/options-profiles.php:233
844
  msgid "Video controls will automatically hide after a video begins playing"
845
  msgstr ""
846
 
847
+ #: includes/options-profiles.php:237
848
  msgid "Controls"
849
  msgstr ""
850
 
851
+ #: includes/options-profiles.php:239
852
  msgid "Controls do not display &amp; Flash player loads immediately"
853
  msgstr ""
854
 
855
+ #: includes/options-profiles.php:240
856
  msgid "Controls display &amp; Flash player loads immediately"
857
  msgstr ""
858
 
859
+ #: includes/options-profiles.php:241
860
  msgid "Controls display &amp; Flash player loads once video starts"
861
  msgstr ""
862
 
863
+ #: includes/options-profiles.php:242
864
+ msgid ""
865
+ "Whether the video player controls will display. For AS3 player it also "
866
+ "defines when the Flash player will load"
867
  msgstr ""
868
 
869
+ #: includes/options-profiles.php:247
870
+ msgid ""
871
+ "Use SSL? <a href=\"http://www.google.com/support/youtube/bin/answer.py?"
872
+ "answer=171780&expand=UseHTTPS#HTTPS\">Read more</a>"
873
  msgstr ""
874
 
875
+ #: includes/options-profiles.php:251 includes/options-widgets.php:147
 
876
  msgid "Loop Video"
877
  msgstr ""
878
 
879
+ #: includes/options-profiles.php:252
880
+ msgid ""
881
+ "Play the initial video again and again. In the case of a playlist, this will "
882
+ "play the entire playlist and then start again at the first video"
883
  msgstr ""
884
 
885
+ #: includes/options-profiles.php:256
886
  msgid "Information"
887
  msgstr ""
888
 
889
+ #: includes/options-profiles.php:257
890
+ msgid ""
891
+ "Display the video title and uploader before the video starts. If displaying "
892
+ "a playlist this will show video thumbnails"
893
  msgstr ""
894
 
895
+ #: includes/options-profiles.php:261
896
  msgid "Related Videos"
897
  msgstr ""
898
 
899
+ #: includes/options-profiles.php:262
900
+ msgid ""
901
+ "Load related videos once playback starts. Also toggles the search option."
902
  msgstr ""
903
 
904
+ #: includes/options-profiles.php:266
905
  msgid "Theme"
906
  msgstr ""
907
 
908
+ #: includes/options-profiles.php:268
909
  msgid "Dark"
910
  msgstr ""
911
 
912
+ #: includes/options-profiles.php:269
913
  msgid "Light"
914
  msgstr ""
915
 
916
+ #: includes/options-profiles.php:270
917
  msgid "Display player controls within a dark or light control bar"
918
  msgstr ""
919
 
920
+ #: includes/options-profiles.php:274
921
  msgid "Progress Bar Colour"
922
  msgstr ""
923
 
924
+ #: includes/options-profiles.php:276
925
  msgid "Red"
926
  msgstr ""
927
 
928
+ #: includes/options-profiles.php:277
929
  msgid "White (desaturated)"
930
  msgstr ""
931
 
932
+ #: includes/options-profiles.php:278
933
+ msgid ""
934
+ "The colour that will be used in the player's video progress bar to highlight "
935
+ "the amount of the video that's already been seen"
936
  msgstr ""
937
 
938
+ #: includes/options-profiles.php:282
939
  msgid "Modest Branding"
940
  msgstr ""
941
 
942
+ #: includes/options-profiles.php:283
943
  msgid "Reduce branding on video."
944
  msgstr ""
945
 
946
+ #: includes/options-profiles.php:288
947
  msgid "Options for AS3 Player"
948
  msgstr ""
949
 
950
+ #: includes/options-profiles.php:289
951
+ msgid ""
952
+ "The following options are not supported if using EmbedPlus or if the IFRAME "
953
+ "player uses HTML5."
954
  msgstr ""
955
 
956
+ #: includes/options-profiles.php:293
957
  msgid "Annotations"
958
  msgstr ""
959
 
960
+ #: includes/options-profiles.php:294
961
  msgid "Video annotations are shown by default"
962
  msgstr ""
963
 
964
+ #: includes/options-profiles.php:298
965
  msgid "Closed Captions"
966
  msgstr ""
967
 
968
+ #: includes/options-profiles.php:299
969
+ msgid ""
970
+ "Show closed captions (subtitles) by default, even if the user has turned "
971
+ "captions off"
972
  msgstr ""
973
 
974
+ #: includes/options-profiles.php:303
975
  msgid "Disable Keyboard"
976
  msgstr ""
977
 
978
+ #: includes/options-profiles.php:304
979
  msgid "Disable the player keyboard controls"
980
  msgstr ""
981
 
982
+ #: includes/options-profiles.php:308
983
  msgid "Fullscreen"
984
  msgstr ""
985
 
986
+ #: includes/options-profiles.php:309
987
  msgid "A button will allow the viewer to watch the video fullscreen"
988
  msgstr ""
989
 
990
+ #: includes/options-profiles.php:313
991
  msgid "Link to YouTube"
992
  msgstr ""
993
 
994
+ #: includes/options-profiles.php:314
995
  msgid "Video links back to YouTube when clicked"
996
  msgstr ""
997
 
998
+ #: includes/options-profiles.php:319
999
  msgid "Options Not Supported by HTML5 Player"
1000
  msgstr ""
1001
 
1002
+ #: includes/options-profiles.php:323
1003
  msgid "Window Mode"
1004
  msgstr ""
1005
 
1006
+ #: includes/options-profiles.php:325
1007
  msgid "Opaque"
1008
  msgstr ""
1009
 
1010
+ #: includes/options-profiles.php:326
1011
  msgid "Transparent"
1012
  msgstr ""
1013
 
1014
+ #: includes/options-profiles.php:327
1015
  msgid "Window"
1016
  msgstr ""
1017
 
1018
+ #: includes/options-profiles.php:328
1019
+ msgid ""
1020
+ "Sets the Window Mode property of the Flash movie for transparency, layering, "
1021
+ "and positioning in the browser. <a href=\"http://www.communitymx.com/content/"
1022
+ "article.cfm?cid=e5141\">Learn more</a>."
1023
  msgstr ""
1024
 
1025
+ #: includes/options-profiles.php:333
1026
  msgid "Options Only Supported By EmbedPlus"
1027
  msgstr ""
1028
 
1029
+ #: includes/options-profiles.php:333
1030
  msgid "Learn more about EmbedPlus"
1031
  msgstr ""
1032
 
1033
+ #: includes/options-profiles.php:337
1034
  msgid "Fallback Embed Type"
1035
  msgstr ""
1036
 
1037
+ #: includes/options-profiles.php:338
1038
+ msgid ""
1039
+ "The type of player to use if Flash is not available and EmbedPlus cannot be "
1040
+ "used."
1041
  msgstr ""
1042
 
1043
+ #: includes/options-profiles.php:344
1044
  msgid "Play HD"
1045
  msgstr ""
1046
 
1047
+ #: includes/options-profiles.php:345
1048
  msgid "Play the video in HD if possible"
1049
  msgstr ""
1050
 
1051
+ #: includes/options-profiles.php:349
1052
  msgid "Real-time Reactions"
1053
  msgstr ""
1054
 
1055
+ #: includes/options-profiles.php:350
1056
  msgid "Show the Real-time Reactions button"
1057
  msgstr ""
1058
 
1059
+ #: includes/options-profiles.php:354
1060
  msgid "Sweet Spots"
1061
  msgstr ""
1062
 
1063
+ #: includes/options-profiles.php:355
1064
  msgid "Find sweet spots for the next and previous buttons"
1065
  msgstr ""
1066
 
1067
+ #: includes/options-profiles.php:370
 
 
 
 
1068
  msgid "YouTube Video Sample"
1069
  msgstr ""
1070
 
1071
+ #: includes/options-profiles.php:371
1072
+ msgid ""
1073
+ "The video below uses the above, saved profile settings. Use the drop-down "
1074
+ "below to change which parameters the video uses - press the Change Video "
1075
+ "button to update it."
1076
  msgstr ""
1077
 
1078
+ #: includes/options-profiles.php:373
1079
  msgid "Standard"
1080
  msgstr ""
1081
 
1082
+ #: includes/options-profiles.php:375
1083
  msgid "3D"
1084
  msgstr ""
1085
 
1086
+ #: includes/options-profiles.php:376
1087
  msgid "Playlist"
1088
  msgstr ""
1089
 
1090
+ #: includes/options-profiles.php:379
1091
  msgid "Change video"
1092
  msgstr ""
1093
 
1094
+ #: includes/options-widgets.php:13
1095
  msgid "Widget Title"
1096
  msgstr ""
1097
 
1098
+ #: includes/options-widgets.php:27
1099
  msgid "ID Type"
1100
  msgstr ""
1101
 
1102
+ #: includes/options-widgets.php:29
1103
  msgid "Video or Playlist"
1104
  msgstr ""
1105
 
1106
+ #: includes/options-widgets.php:31
1107
  msgid "Search"
1108
  msgstr ""
1109
 
1110
+ #: includes/options-widgets.php:33
1111
  msgid "User"
1112
  msgstr ""
1113
 
1114
+ #: includes/options-widgets.php:41 includes/shared-functions.php:488
 
1115
  msgid "Profile"
1116
  msgstr ""
1117
 
1118
+ #: includes/options-widgets.php:61
1119
  msgid "Size"
1120
  msgstr ""
1121
 
1122
+ #: includes/options-widgets.php:75 includes/options-widgets.php:87
1123
+ #: includes/options-widgets.php:103 includes/options-widgets.php:135
1124
+ #: includes/options-widgets.php:149
 
 
1125
  msgid "Profile default"
1126
  msgstr ""
1127
 
1128
+ #: includes/options-widgets.php:77 includes/options-widgets.php:105
1129
+ #: includes/options-widgets.php:151
 
1130
  msgid "No"
1131
  msgstr ""
1132
 
1133
+ #: includes/options-widgets.php:79 includes/options-widgets.php:107
1134
+ #: includes/options-widgets.php:153
 
1135
  msgid "Yes"
1136
  msgstr ""
1137
 
1138
+ #: includes/options-widgets.php:85
1139
  msgid "Embed Type"
1140
  msgstr ""
1141
 
1142
+ #: includes/options-widgets.php:113
1143
  msgid "Start (seconds)"
1144
  msgstr ""
1145
 
1146
+ #: includes/options-widgets.php:119
1147
  msgid "Stop (seconds)"
1148
  msgstr ""
1149
 
1150
+ #: includes/options-widgets.php:124
1151
  msgid "Non-EmbedPlus Options"
1152
  msgstr ""
1153
 
1154
+ #: includes/options-widgets.php:133
1155
  msgid "List Playback"
1156
  msgstr ""
1157
 
1158
+ #: includes/options-widgets.php:137
1159
  msgid "Play each video in order"
1160
  msgstr ""
1161
 
1162
+ #: includes/options-widgets.php:139
1163
  msgid "Play videos randomly"
1164
  msgstr ""
1165
 
1166
+ #: includes/options-widgets.php:141
1167
  msgid "Play one random video"
1168
  msgstr ""
1169
 
1170
+ #: includes/set-defaults.php:95
1171
  msgid "The video cannot be shown at the moment. Please try again later."
1172
  msgstr ""
1173
 
1174
+ #: includes/shared-functions.php:240
1175
  #, php-format
1176
  msgid "An error occurred accessing the YouTube API for video ID %s - %s"
1177
  msgstr ""
 
readme.txt CHANGED
@@ -1,49 +1,66 @@
1
- === Artiss YouTube Embed ===
2
  Contributors: Applian
3
- Donate link: http://artiss.co.uk/donate
4
- Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, search, seo, sidebar, simple, smart, url, user, valid, video, widget, width, xhtml, youtube, youtuber
5
  Requires at least: 2.9
6
- Tested up to: 3.5
7
- Stable tag: 2.7
8
 
9
  A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
10
 
11
  == Description ==
12
 
13
- **I'm looking at potentially removing some of the existing features to keep the plugin streamlined - please [vote](http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote "YouTube Embed Features Vote") on what you'd like me to keep and what you'd be happy for me to jettison!**
14
 
15
- Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet powerful, method of embedding YouTube videos into your WordPress site. Options include:
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  * XHTML and HTML5 compliant - works with all the latest browsers
18
  * Multiple embedding methods available - OBJECT, IFRAME, CHROMELESS and EmbedPlus
19
  * Dynamic video sizing for responsive sites
20
  * Allow users to add videos to comments
21
- * Build your own playlists and play them back however you want
22
  * Automatically generate playlists based on user name or search text
23
  * Create multiple profiles - use them for different videos to get the exact style that you want
24
  * Google compatible metadata is added to the video output - great for SEO!
25
  * Code is cached for maximum performance
26
- * Using a different YouTube plugin? Documentation and tools are provided to help you migrate to Artiss YouTube Embed
27
- * Fully internationalized ready for translations. **If you would like to add a translation to his plugin then please [contact me](http://artiss.co.uk/contact "Contact")**
28
  * Support for Do Not Track
29
  * Compatible with [Video SEO for WordPress](http://yoast.com/wordpress/video-seo/ "Video SEO for WordPress")
30
  * And much, much more!
31
 
32
- It has all the features of other similar plugins - Smart YouTube, for instance. In fact if there's a feature in another YouTube embedding plugin that this doesn't have, let me know - I haven't come across it!
33
 
34
- Artiss YouTube Embed has been rated 5/5 by [ThemesPlugins.com](http://www.themesplugins.com/wordpress-Plugin/useful-free-wordpress-plugin-youtube-videos-adjust-hide-link/ "Artiss YouTube Embed").
 
 
 
 
 
 
 
 
35
 
36
  To add a video to a post or page simply use the shortcode `[youtube]video[/youtube]`, where `video` is the ID or URL of the video. Alternatively, you can add one (or more) widgets to your sidebar.
37
 
38
  Within the administration area of your blog you will find a new menu named `YouTube` (see screenshot 1). Click on the `Options` sub-menu to set a number of general options. Alternatively click on the `Profiles` sub-menu to set the default options which define the output of your videos - any videos you display (unless overridden by parameters - more on that later) will use the settings from the Profiles screen.
39
 
40
- The above should get you started - for more information and advanced options please read the "Other Notes" tab. This also includes details on how to migrate from another embedding plugin to Artiss YouTube Embed.
41
 
42
- Although this document contains a lot of information more is available from a series of linked pages, plus as much information as possible is provided on the various administration pages. Whilst on the administration pages, click on the "Help" button in the top right for some useful tips and links. If anything isn't covered and you're unsure of what it does please ask [on the forum](http://www.artiss.co.uk/forum "WordPress Plugins Forum").
43
 
44
  Not yet convinced? [See the feature comparison](https://spreadsheets.google.com/spreadsheet/pub?hl=en_GB&hl=en_GB&key=0AqxzQNe7e-NwdF80eUZuNjdtS1J1bWM4VERFVUN6ZHc&single=true&gid=4&output=html "YouTube Embed : Comparison") between this and the top 10 alternative plugins for embedding YouTube videos.
45
 
46
- **For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
47
 
48
  == Advanced embedding options ==
49
 
@@ -129,13 +146,13 @@ And that's it! You can use unlimited widgets, so you can add different videos to
129
 
130
  YouTube allows users to create their own playlists - collections of videos that can be played in sequence.
131
 
132
- Before version 2 of Artiss YouTube Embed, separate shortcodes and function calls had to be used to specify these. However, now you can simply specify their ID or URL with the standard methods.
133
 
134
  e.g. `[youtube]095393D5B42B2266[/youtube]`
135
 
136
  Playlists cannot be used along with the EmbedPlus embedding method.
137
 
138
- A better alternative to playlists is the build-in lists function in Artiss YouTube Embed - see the Lists section for further details.
139
 
140
  == Templates ==
141
 
@@ -205,13 +222,11 @@ The second option, `Alternative Embedding`, activates a short of other alternati
205
 
206
  In both cases, activating these will impact performance so should only be used if absolutely necessary.
207
 
208
- [Read more details](http://www.artiss.co.uk/youtube-embed/compatibility "Artiss YouTube Embed Compatibility") on which options to select for which plugin.
209
-
210
  == Further options ==
211
 
212
  **Thumbnails**
213
 
214
- Artiss YouTube embed also has the ability to return a thumbnail of a video (sorry, this doesn't work with playlists). There are two methods you can use for this - a shortcode or a function call.
215
 
216
  Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt', 'nolink' )` to add a thumbnail to any part of your theme.
217
 
@@ -303,19 +318,43 @@ Under the `YouTube` administration menu is a sub-menu named `Options`. Select th
303
 
304
  In the case of URL and Comment embedding a profile can be selected.
305
 
306
- == Licence ==
307
 
308
- This WordPress plugin is licensed under the [GPLv2 (or later)](http://wordpress.org/about/gpl/ "GNU General Public License").
 
 
309
 
310
- == Support ==
311
 
312
- All of my plugins are supported via [my website](http://www.artiss.co.uk "Artiss.co.uk").
313
 
314
- Please feel free to visit the site for plugin updates and development news - either visit the site regularly or [follow me on Twitter](http://www.twitter.com/artiss_tech "Artiss.co.uk on Twitter") (@artiss_tech).
315
 
316
- For problems, suggestions or enhancements for this plugin, there is [a dedicated page](http://www.artiss.co.uk/youtube-embed "Artiss YouTube Embed") and [a forum](http://www.artiss.co.uk/forum "WordPress Plugins Forum"). The dedicated page will also list any known issues and planned enhancements.
317
 
318
- **This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
 
320
  == Reviews & Mentions ==
321
 
@@ -344,13 +383,9 @@ If you play a YouTube video, look at the URL - it will probably look something l
344
 
345
  The video ID is the list of letters and numbers after `v=`, in this case `L5Y4qzc_JTg`.
346
 
347
- = Why can't I change the player colour as I used to? =
348
-
349
- Artiss YouTube Embed is now using the latest version of the YouTube Player, named AS3. This does not allow for the player colour to be modified, and a few other options are now missing as well.
350
 
351
- Equally, some options are not supported depending on whether you use the IFRAME or OBJECT embedding method.
352
-
353
- [Read more about which options are supported](http://www.artiss.co.uk/youtube-embed/further-help#ye-api "API Support").
354
 
355
  = How do I add a border to the video =
356
 
@@ -364,7 +399,7 @@ If you switch off API errors then the plugin will simply assume all IDs are vali
364
 
365
  I have requested further information on why these errors may be occurring from the YouTube forum but, as yet, I've had no response. [Click here](http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/764f2f2a3b5863f8?hl=en "YouTube APIs Developer Forum") if you wish to track the request.
366
 
367
- = I've upgraded from an earlier version of Artiss YouTube Embed and one of the functions / shortcodes / parameters that I used is no longer documented =
368
 
369
  Code created for previous versions of the plugin should still work - however, the functions will not be documented to deter people from using them in the future.
370
 
@@ -390,7 +425,7 @@ If you don't include Metadata then it will also validate as HTML5 compliant.
390
 
391
  The [W3C Markup Validation Service](http://validator.w3.org/ "W3C Markup Validation Service") was used to test the above.
392
 
393
- You can [read more about this here](http://www.artiss.co.uk/youtube-embed/further-help#ye-standards "Standards Compliance").
394
 
395
  = Which browsers does the output work on? =
396
 
@@ -460,7 +495,7 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
460
 
461
  == Screenshots ==
462
 
463
- 1. Artiss YouTube Embed in the administration menu
464
  2. The main options screen
465
  3. The profiles screen
466
  4. The lists screen - videos have been added and validated. The drop-down help is also shown
@@ -469,6 +504,17 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
469
 
470
  == Changelog ==
471
 
 
 
 
 
 
 
 
 
 
 
 
472
  = 2.7 =
473
  * Maintenance: Using new website for video download link
474
  * Maintenance: README updated with new compatibility details and modified FAQs
@@ -489,7 +535,7 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
489
 
490
  = 2.6 =
491
  * Bug: Fixed a bug that means videos have zero width on new installations until the default profile is updated (thanks to Aidan from [Noise Republic](http://www.noiserepublic.co.uk "Noise Republic") for reporting that)
492
- * Bug: Corrected URLs pointing to help screens at artiss.co.uk
493
  * Bug: Resolved issue where translated IDs were not corrected if included in a URL (thanks to kchayka for reporting that)
494
  * Bug: Fixed problem where video ID is not found in full URL if not specified first (thanks to christopherw for reporting that)
495
  * Bug: Modest branding profile switch wasn't doing anything - the option was hard-coded on. Now corrected
@@ -705,7 +751,10 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
705
  = 1.0 =
706
  * Initial release
707
 
708
- == Upgrade Notice ==
 
 
 
709
 
710
  = 2.7 =
711
  * Update to fix some bugs and add minor new features
1
+ === Vixy YouTube Embed ===
2
  Contributors: Applian
3
+ Tags: admin, annotations, applian, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, search, seo, sidebar, simple, smart, url, user, valid, video, vixy, widget, width, xhtml, youtube, youtuber
 
4
  Requires at least: 2.9
5
+ Tested up to: 3.5.1
6
+ Stable tag: 3.0
7
 
8
  A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
9
 
10
  == Description ==
11
 
12
+ Vixy YouTube Embed (formally Artiss YouTube Embed) is an incredibly simple, yet powerful, method of embedding YouTube videos into your WordPress site.
13
 
14
+ **Easy to Use**
15
 
16
+ Just add a shortcode with the YouTube video ID, and your video appears in the page. The shortcode looks like this:
17
+
18
+ `[youtube]adVEYkQIxCg[/youtube]`
19
+
20
+ **Powerful**
21
+
22
+ With over 50 embedding options, Vixy YouTube Embed does everything any other WordPress plug-in does, and a lot of things they don't.
23
+
24
+ Options include:
25
+
26
+ * Set size of video, controls, other behaviors via profiles or inline commands.
27
+ * Includes download links option.
28
+ * Build your own playlists and play them back however you want
29
  * XHTML and HTML5 compliant - works with all the latest browsers
30
  * Multiple embedding methods available - OBJECT, IFRAME, CHROMELESS and EmbedPlus
31
  * Dynamic video sizing for responsive sites
32
  * Allow users to add videos to comments
 
33
  * Automatically generate playlists based on user name or search text
34
  * Create multiple profiles - use them for different videos to get the exact style that you want
35
  * Google compatible metadata is added to the video output - great for SEO!
36
  * Code is cached for maximum performance
37
+ * Using a different YouTube plugin? Documentation and tools are provided to help you migrate to Vixy YouTube Embed
38
+ * Fully internationalized ready for translations. **If you would like to add a translation to his plugin then please [contact us](http://wordpress.org/support/plugin/youtube-embed "YouTube Embed Support")**
39
  * Support for Do Not Track
40
  * Compatible with [Video SEO for WordPress](http://yoast.com/wordpress/video-seo/ "Video SEO for WordPress")
41
  * And much, much more!
42
 
 
43
 
44
+ **Earn Money**
45
+
46
+ Download links under each video gives you an opportunity to earn generous affiliate commissions from [Jaksta.com]("http://jaksta.com" Jaksta.com), a powerful video download and conversion suite for PC and Mac. (Optional).
47
+
48
+ Vixy YouTube Embed has been rated 5/5 by [ThemesPlugins.com](http://www.themesplugins.com/wordpress-Plugin/useful-free-wordpress-plugin-youtube-videos-adjust-hide-link/ "Artiss YouTube Embed").
49
+
50
+
51
+
52
+ **Get Started Quickly**
53
 
54
  To add a video to a post or page simply use the shortcode `[youtube]video[/youtube]`, where `video` is the ID or URL of the video. Alternatively, you can add one (or more) widgets to your sidebar.
55
 
56
  Within the administration area of your blog you will find a new menu named `YouTube` (see screenshot 1). Click on the `Options` sub-menu to set a number of general options. Alternatively click on the `Profiles` sub-menu to set the default options which define the output of your videos - any videos you display (unless overridden by parameters - more on that later) will use the settings from the Profiles screen.
57
 
58
+ You can read read the [Full Documentation](http://vixy.net/youtube-embed/documentation.php "Documentation") to learn about all the capabilities of Vixy YouTube Embed. This also includes details on how to migrate from another embedding plugin.
59
 
60
+ Help is always available from the WordPress administration pages - just click on the "Help" button in the top right. If the Help and FAQ don't have an answer, ask us [on the forum](http://wordpress.org/support/plugin/youtube-embed "WordPress.org Forum").
61
 
62
  Not yet convinced? [See the feature comparison](https://spreadsheets.google.com/spreadsheet/pub?hl=en_GB&hl=en_GB&key=0AqxzQNe7e-NwdF80eUZuNjdtS1J1bWM4VERFVUN6ZHc&single=true&gid=4&output=html "YouTube Embed : Comparison") between this and the top 10 alternative plugins for embedding YouTube videos.
63
 
 
64
 
65
  == Advanced embedding options ==
66
 
146
 
147
  YouTube allows users to create their own playlists - collections of videos that can be played in sequence.
148
 
149
+ Before version 2 of the plugin, separate shortcodes and function calls had to be used to specify these. However, now you can simply specify their ID or URL with the standard methods.
150
 
151
  e.g. `[youtube]095393D5B42B2266[/youtube]`
152
 
153
  Playlists cannot be used along with the EmbedPlus embedding method.
154
 
155
+ A better alternative to playlists is the build-in lists function in Vixy YouTube Embed - see the Lists section for further details.
156
 
157
  == Templates ==
158
 
222
 
223
  In both cases, activating these will impact performance so should only be used if absolutely necessary.
224
 
 
 
225
  == Further options ==
226
 
227
  **Thumbnails**
228
 
229
+ Vixy 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.
230
 
231
  Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt', 'nolink' )` to add a thumbnail to any part of your theme.
232
 
318
 
319
  In the case of URL and Comment embedding a profile can be selected.
320
 
321
+ == Metadata ==
322
 
323
+ Rich metadata is added to the code generated by YouTube Embed. This gives details about the video for the purposes of search engines and other rich content interests.
324
+
325
+ To test the results you can use the [Google Rich Snippets Testing Tool](http://www.google.com/webmasters/tools/richsnippets "Structured Data Testing Tool").
326
 
327
+ For Google to pick up the metadata you must [apply to be whitelisted](http://www.google.com/support/webmasters/bin/request.py?contact_type=rich_snippets_feedback "Rich snippets not appearing?").
328
 
329
+ == Videos in Comments ==
330
 
331
+ Select this option to allow people to add YouTube videos to their comments. All they have to do is to add a YouTube URL on a separate line and it will display.
332
 
333
+ Under this tick box there is also an option to specify a different default profile.
334
 
335
+ == EmbedPlus ==
336
+
337
+ EmbedPlus is an alternative embedding method which adds new features to the standard player. The best way to learn about these new features is to [visit the website](http://www.embedplus.com/ "EmbedPlus").
338
+
339
+ EmbedPlus does not support non-Flash methods but will, instead, revert to the HTML5 player in circumstances where Flash is not available (e.g. on an iPhone).
340
+
341
+ == The Chromeless Player ==
342
+
343
+ The Chromeless player uses the Flash AS3 player but removes all controls and styling from the resulting video. It has the same restrictions as the standard AS3 Flash player and some of the profile options may not work as usual � e.g. the option on how to display player controls, due to the fact that there aren't any.
344
+
345
+ The Chromeless player can be recreated by switching off controls and all other styling for other video types. However, once a video has been started in the Chromeless player the user cannot stop it � this cannot be created with other player types.
346
+
347
+ == Make Money from Vixy YouTube Embed ==
348
+
349
+ An optional profile option to display a download link under videos can be easily moniterised.
350
+
351
+ Simply [sign up to ShareAShale](http://www.shareasale.com/r.cfm?B=44&U=668714&M=47&urllink= "Get paid for your great content.") and then, in the Options screen, supply your affiliate ID. Ensure the download link is switched on and you will generate revenue from those who click through to Jaksta and purchase a product.
352
+
353
+ How much? 30%
354
+
355
+ == Licence ==
356
+
357
+ This WordPress plugin is licensed under the [GPLv2 (or later)](http://wordpress.org/about/gpl/ "GNU General Public License").
358
 
359
  == Reviews & Mentions ==
360
 
383
 
384
  The video ID is the list of letters and numbers after `v=`, in this case `L5Y4qzc_JTg`.
385
 
386
+ = Why can't I change the player color as I used to? =
 
 
387
 
388
+ Vixy YouTube Embed uses the latest version of the YouTube Player, named AS3. This means that some options are no longer available (however, some new ones are). [See this document](https://docs.google.com/spreadsheet/pub?key=0AqxzQNe7e-NwdF80eUZuNjdtS1J1bWM4VERFVUN6ZHc&single=true&gid=1&output=html "API Compatibility") for a complete list of the supported parameter for each player type.
 
 
389
 
390
  = How do I add a border to the video =
391
 
399
 
400
  I have requested further information on why these errors may be occurring from the YouTube forum but, as yet, I've had no response. [Click here](http://groups.google.com/group/youtube-api-gdata/browse_thread/thread/764f2f2a3b5863f8?hl=en "YouTube APIs Developer Forum") if you wish to track the request.
401
 
402
+ = I've upgraded from an earlier version of the plugin and one of the functions / shortcodes / parameters that I used is no longer documented =
403
 
404
  Code created for previous versions of the plugin should still work - however, the functions will not be documented to deter people from using them in the future.
405
 
425
 
426
  The [W3C Markup Validation Service](http://validator.w3.org/ "W3C Markup Validation Service") was used to test the above.
427
 
428
+ [The following spreadsheet](https://docs.google.com/spreadsheet/pub?key=0AqxzQNe7e-NwdF80eUZuNjdtS1J1bWM4VERFVUN6ZHc&single=true&gid=0&output=html "Standards Compliance") shows which embed types were tested and to where they validated (or didn't).
429
 
430
  = Which browsers does the output work on? =
431
 
495
 
496
  == Screenshots ==
497
 
498
+ 1. Vixy YouTube Embed in the administration menu
499
  2. The main options screen
500
  3. The profiles screen
501
  4. The lists screen - videos have been added and validated. The drop-down help is also shown
504
 
505
  == Changelog ==
506
 
507
+ = 3.0 =
508
+ * Maintenance: Changed name, updated adverts, removed donation and sponsorship requests
509
+ * Maintenance: Renamed function to match new name and also removed prefix from files, which were not required
510
+ * Maintenance: Checked and updated all help URLs
511
+ * Maintenance: Removed about and instruction pages which were felt were no longer needed
512
+ * Maintenance: Updated icons
513
+ * Enhancement: Updated download links to use code from Vixy. This is now switched on by default
514
+ * Enhancement: Added option to provide an affiliate ID for use with the download bar - blog owners can make 30% from sales generated
515
+ * Enhancement: Simplified the menu access rules which has resulted in resolving a number of existing issues
516
+ * Bug: Fixed PHP error when allowing shortcodes in widgets
517
+
518
  = 2.7 =
519
  * Maintenance: Using new website for video download link
520
  * Maintenance: README updated with new compatibility details and modified FAQs
535
 
536
  = 2.6 =
537
  * 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)
538
+ * Bug: Corrected URLs pointing to help screens
539
  * Bug: Resolved issue where translated IDs were not corrected if included in a URL (thanks to kchayka for reporting that)
540
  * Bug: Fixed problem where video ID is not found in full URL if not specified first (thanks to christopherw for reporting that)
541
  * Bug: Modest branding profile switch wasn't doing anything - the option was hard-coded on. Now corrected
751
  = 1.0 =
752
  * Initial release
753
 
754
+ == Upgrade Notice ==
755
+
756
+ = 3.0 =
757
+ * Update for bug fixes and enhancements including a new video download option with affiliate scheme
758
 
759
  = 2.7 =
760
  * Update to fix some bugs and add minor new features
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
uninstall.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Uninstall the plugin by removing any options from the database
6
  *
7
- * @package Artiss-YouTube-Embed
8
  * @since 2.0
9
  */
10
 
@@ -58,5 +58,5 @@ $path = str_replace( 'http://', '', site_url( '/', 'http' ) );
58
  $pos = strpos( $path, '/' );
59
  $path = substr( $path, $pos ) . 'wp-content/';
60
 
61
- setcookie( 'aye_mce_shortcode', '', time() - 3600, $path );
62
  ?>
4
  *
5
  * Uninstall the plugin by removing any options from the database
6
  *
7
+ * @package YouTube-Embed
8
  * @since 2.0
9
  */
10
 
58
  $pos = strpos( $path, '/' );
59
  $path = substr( $path, $pos ) . 'wp-content/';
60
 
61
+ setcookie( 'vye_mce_shortcode', '', time() - 3600, $path );
62
  ?>
youtube-embed.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
- Plugin Name: Artiss YouTube Embed
4
- Plugin URI: http://www.artiss.co.uk/youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
- Version: 2.7
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
@@ -13,57 +13,51 @@ Author URI: http://www.artiss.co.uk
13
  *
14
  * Main code - include various functions
15
  *
16
- * @package Artiss-YouTube-Embed
17
  * @since 2.0
18
  */
19
 
20
- define( 'youtube_embed_version', '2.7' );
21
 
22
  $functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
23
 
24
  // Include all the various functions
25
 
26
- include_once( $functions_dir . 'aye-add-scripts.php' ); // Add various scripts
27
 
28
- include_once( $functions_dir . 'aye-shared-functions.php' ); // Shared routines
29
 
30
- include_once( $functions_dir . 'aye-set-defaults.php' ); // Set default options
31
 
32
- include_once( $functions_dir . 'aye-add-to-admin-bar.php' ); // Add link to the admin bar
33
 
34
- include_once( $functions_dir . 'aye-function-calls.php' ); // Function calls
35
 
36
- include_once( $functions_dir . 'aye-generate-embed-code.php' ); // Generate YouTube embed code
37
 
38
- include_once( $functions_dir . 'aye-generate-download-code.php' ); // Generate download URLs
39
 
40
- include_once( $functions_dir . 'aye-generate-shorturl-code.php' ); // Generate short URLs
41
 
42
- include_once( $functions_dir . 'aye-generate-thumbnail-code.php' ); // Generate thumbnail code
43
 
44
- include_once( $functions_dir . 'aye-generate-transcript-code.php' ); // Generate transcripts
45
 
46
  if ( is_admin() ) {
47
 
48
- if ( !function_exists( 'artiss_plugin_ads' ) ) {
49
 
50
- include_once( $functions_dir . 'artiss-plugin-ads.php' ); // Option screen ads
51
-
52
- }
53
-
54
- include_once( $functions_dir . 'aye-admin-config.php' ); // Administration configuration
55
-
56
- include_once( $functions_dir . 'aye-add-mce-button.php' ); // Editor button
57
 
58
  } else {
59
 
60
- include_once( $functions_dir . 'aye-update-post-content.php' ); // Process post content
61
 
62
- include_once( $functions_dir . 'aye-shortcodes.php' ); // Shortcodes
63
 
64
- include_once( $functions_dir . 'aye-deprecated.php' ); // Deprecated options
65
  }
66
 
67
- include_once($functions_dir . 'aye-generate-widgets.php'); // Generate widgets
68
 
69
  ?>
1
  <?php
2
  /*
3
+ Plugin Name: Vixy YouTube Embed
4
+ Plugin URI: http://wordpress.org/extend/plugins/youtube-embed/
5
  Description: Embed YouTube Videos in WordPress
6
+ Version: 3.0
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
13
  *
14
  * Main code - include various functions
15
  *
16
+ * @package YouTube-Embed
17
  * @since 2.0
18
  */
19
 
20
+ define( 'youtube_embed_version', '3.0' );
21
 
22
  $functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
23
 
24
  // Include all the various functions
25
 
26
+ include_once( $functions_dir . 'add-scripts.php' ); // Add various scripts
27
 
28
+ include_once( $functions_dir . 'shared-functions.php' ); // Shared routines
29
 
30
+ include_once( $functions_dir . 'set-defaults.php' ); // Set default options
31
 
32
+ include_once( $functions_dir . 'add-to-admin-bar.php' ); // Add link to the admin bar
33
 
34
+ include_once( $functions_dir . 'function-calls.php' ); // Function calls
35
 
36
+ include_once( $functions_dir . 'generate-embed-code.php' ); // Generate YouTube embed code
37
 
38
+ include_once( $functions_dir . 'generate-download-code.php' ); // Generate download URLs
39
 
40
+ include_once( $functions_dir . 'generate-shorturl-code.php' ); // Generate short URLs
41
 
42
+ include_once( $functions_dir . 'generate-thumbnail-code.php' ); // Generate thumbnail code
43
 
44
+ include_once( $functions_dir . 'generate-transcript-code.php' ); // Generate transcripts
45
 
46
  if ( is_admin() ) {
47
 
48
+ include_once( $functions_dir . 'admin-config.php' ); // Administration configuration
49
 
50
+ include_once( $functions_dir . 'add-mce-button.php' ); // Editor button
 
 
 
 
 
 
51
 
52
  } else {
53
 
54
+ include_once( $functions_dir . 'update-post-content.php' ); // Process post content
55
 
56
+ include_once( $functions_dir . 'shortcodes.php' ); // Shortcodes
57
 
58
+ include_once( $functions_dir . 'deprecated.php' ); // Deprecated options
59
  }
60
 
61
+ include_once($functions_dir . 'generate-widgets.php'); // Generate widgets
62
 
63
  ?>