YouTube Embed - Version 5.0.6

Version Description

  • Bug: It would appear that some of the code for the editor button was still lurking in dark corners of the plugin. That's caused those not rocking Gutenberg to see errors or, worst still, the dreaded "white screen of death". Apologies. I've now hoovered out all of the muck
  • Bug: Whilst fixing the above, I noticed the title of one of the settings was wrong, so I've fixed that oo
Download this release

Release Info

Developer dartiss
Plugin Icon 128x128 YouTube Embed
Version 5.0.6
Comparing to
See all releases

Code changes from version 5.0.5 to 5.0.6

css/admin.css CHANGED
@@ -1,19 +1,4 @@
1
 
2
- /* Add extra dashicons for MCE4 editor */
3
-
4
- i.mce-i-icon {
5
- font: 400 20px/1 dashicons;
6
- padding: 0;
7
- vertical-align: top;
8
- speak: none;
9
- -webkit-font-smoothing: antialiased;
10
- -moz-osx-font-smoothing: grayscale;
11
- margin-left: -2px;
12
- padding-right: 2px
13
- }
14
-
15
- /* Video dynamic resizing */
16
-
17
  .ye-container {
18
  position: relative;
19
  padding-bottom: 56.25%;
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .ye-container {
3
  position: relative;
4
  padding-bottom: 56.25%;
css/admin.min.css CHANGED
@@ -1 +1 @@
1
- i.mce-i-icon{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding:0 2px 0 0}.ye-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.ye-container iframe,.ye-container object,.ye-container embed{position:absolute;top:0;left:0;width:100%;height:100%}
1
+ .ye-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.ye-container iframe,.ye-container object,.ye-container embed{position:absolute;top:0;left:0;width:100%;height:100%}
includes/add-scripts.php CHANGED
@@ -84,7 +84,7 @@ add_action( 'wp_enqueue_scripts', 'ye_main_scripts' );
84
 
85
  function ye_admin_css() {
86
 
87
- wp_enqueue_style( 'tinymce_button', plugins_url( 'css/admin.min.css', dirname(__FILE__) ));
88
 
89
  }
90
 
84
 
85
  function ye_admin_css() {
86
 
87
+ wp_enqueue_style( 'dynamic_video', plugins_url( 'css/admin.min.css', dirname(__FILE__) ));
88
 
89
  }
90
 
includes/admin-config.php CHANGED
@@ -343,35 +343,6 @@ function youtube_embed_help( $screen, $tab = 'help' ) {
343
  return $text;
344
  }
345
 
346
- /**
347
- * Set up TinyMCE button
348
- *
349
- * Add filters (assuming user is editing) for TinyMCE
350
- *
351
- * @uses ye_get_general_defaults Set default options
352
- *
353
- * @since 2.0
354
- */
355
-
356
- function youtube_embed_button() {
357
-
358
- // Ensure user is in rich editor and button option is switched on
359
-
360
- if ( get_user_option( 'rich_editing' ) == 'true' ) {
361
-
362
- $options = ye_get_general_defaults();
363
- if ( $options[ 'editor_button' ] != '' ) {
364
-
365
- // Add filters
366
-
367
- add_filter( 'mce_external_plugins', 'add_youtube_embed_mce_plugin' );
368
- add_filter( 'mce_buttons', 'register_youtube_embed_button' );
369
- }
370
- }
371
- }
372
-
373
- add_action( 'admin_init', 'youtube_embed_button' );
374
-
375
  /**
376
  * Show Admin Messages
377
  *
343
  return $text;
344
  }
345
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  /**
347
  * Show Admin Messages
348
  *
includes/options-general.php CHANGED
@@ -30,7 +30,6 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'youtube-embed-general', 'yo
30
 
31
  // Update options
32
 
33
- if ( isset( $_POST[ 'youtube_embed_editor_button' ] ) ) { $options[ 'editor_button' ] = sanitize_text_field( $_POST[ 'youtube_embed_editor_button' ] ); } else { $options[ 'editor_button' ] = ''; }
34
  if ( isset( $_POST[ 'youtube_embed_admin_bar' ] ) ) { $options[ 'admin_bar' ] = sanitize_text_field( $_POST[ 'youtube_embed_admin_bar' ] ); } else { $options[ 'admin_bar' ] = ''; }
35
 
36
  $options[ 'profile_no' ] = sanitize_text_field( $_POST[ 'youtube_embed_profile_no' ] );
@@ -196,18 +195,10 @@ $shortcode = ye_get_shortcode();
196
 
197
  </table><hr><h3 class="title"><?php _e( 'Administration Options', 'youtube-embed' ); ?></h3><table class="form-table">
198
 
199
- <!-- Editor Button -->
200
-
201
- <tr>
202
- <th scope="row"><?php _e( 'Show Editor Button', 'youtube-embed' ); ?></th>
203
- <td><label for="youtube_embed_editor_button"><input type="checkbox" name="youtube_embed_editor_button" value="1" <?php checked( $options[ 'editor_button' ], "1" ); ?>/>
204
- <?php _e( 'Show the YouTube button on the post editor', 'youtube-embed' ); ?></label></td>
205
- </tr>
206
-
207
  <!-- Admin Bar -->
208
 
209
  <tr>
210
- <th scope="row"><?php _e( 'Show Editor Button', 'youtube-embed' ); ?></th>
211
  <td><label for="youtube_embed_admin_bar"><input type="checkbox" name="youtube_embed_admin_bar" value="1" <?php checked( $options[ 'admin_bar' ], "1" ); ?>/>
212
  <?php _e( 'Add link to options screen to Admin Bar', 'youtube-embed' ); ?></label></td>
213
  </tr>
30
 
31
  // Update options
32
 
 
33
  if ( isset( $_POST[ 'youtube_embed_admin_bar' ] ) ) { $options[ 'admin_bar' ] = sanitize_text_field( $_POST[ 'youtube_embed_admin_bar' ] ); } else { $options[ 'admin_bar' ] = ''; }
34
 
35
  $options[ 'profile_no' ] = sanitize_text_field( $_POST[ 'youtube_embed_profile_no' ] );
195
 
196
  </table><hr><h3 class="title"><?php _e( 'Administration Options', 'youtube-embed' ); ?></h3><table class="form-table">
197
 
 
 
 
 
 
 
 
 
198
  <!-- Admin Bar -->
199
 
200
  <tr>
201
+ <th scope="row"><?php _e( 'Show in Admin Bar', 'youtube-embed' ); ?></th>
202
  <td><label for="youtube_embed_admin_bar"><input type="checkbox" name="youtube_embed_admin_bar" value="1" <?php checked( $options[ 'admin_bar' ], "1" ); ?>/>
203
  <?php _e( 'Add link to options screen to Admin Bar', 'youtube-embed' ); ?></label></td>
204
  </tr>
includes/shared-functions.php CHANGED
@@ -255,7 +255,6 @@ function ye_set_general_defaults() {
255
  // Because of upgrading, check each option - if not set, apply default
256
 
257
  $default_array = array(
258
- 'editor_button' => 1,
259
  'admin_bar' => 1,
260
  'profile_no' => 5,
261
  'list_no' => 5,
255
  // Because of upgrading, check each option - if not set, apply default
256
 
257
  $default_array = array(
 
258
  'admin_bar' => 1,
259
  'profile_no' => 5,
260
  'list_no' => 5,
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: embed, insert, video, youtube
4
  Requires at least: 4.6
5
  Tested up to: 5.0.3
6
  Requires PHP: 5.3
7
- Stable tag: 5.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -333,6 +333,10 @@ Before reporting it please bear in mind that this plugin uses the standard YouTu
333
 
334
  [Learn more about my version numbering methodology](https://artiss.blog/2016/09/wordpress-plugin-versioning/ "WordPress Plugin Versioning")
335
 
 
 
 
 
336
  = 5.0.5 =
337
  * Maintenance: The `rel` parameter has changed and the `showinfo` has been deprecated. Have updated the plugin for these changes
338
  * Maintenance: I've removed the editor button. It doesn't work after WP 5.0 and I don't wish to maintain it
@@ -540,5 +544,5 @@ Before reporting it please bear in mind that this plugin uses the standard YouTu
540
 
541
  == Upgrade Notice ==
542
 
543
- = 5.0.5 =
544
- * Maintenance changes
4
  Requires at least: 4.6
5
  Tested up to: 5.0.3
6
  Requires PHP: 5.3
7
+ Stable tag: 5.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
333
 
334
  [Learn more about my version numbering methodology](https://artiss.blog/2016/09/wordpress-plugin-versioning/ "WordPress Plugin Versioning")
335
 
336
+ = 5.0.6 =
337
+ * Bug: It would appear that some of the code for the editor button was still lurking in dark corners of the plugin. That's caused those not rocking Gutenberg to see errors or, worst still, the dreaded "white screen of death". Apologies. I've now hoovered out all of the muck
338
+ * Bug: Whilst fixing the above, I noticed the title of one of the settings was wrong, so I've fixed that oo
339
+
340
  = 5.0.5 =
341
  * Maintenance: The `rel` parameter has changed and the `showinfo` has been deprecated. Have updated the plugin for these changes
342
  * Maintenance: I've removed the editor button. It doesn't work after WP 5.0 and I don't wish to maintain it
544
 
545
  == Upgrade Notice ==
546
 
547
+ = 5.0.6 =
548
+ * Bug fix
youtube-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube Embed
4
  Plugin URI: https://github.com/dartiss/youtube-embed
5
  Description: An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
6
- Version: 5.0.5
7
  Author: dartiss
8
  Author URI: https://artiss.blog
9
  Text Domain: youtube-embed
@@ -18,7 +18,7 @@ Text Domain: youtube-embed
18
  * @since 2.0
19
  */
20
 
21
- define( 'youtube_embed_version', '5.0.5' );
22
 
23
  $functions_dir = plugin_dir_path( __FILE__ ) . 'includes/';
24
 
3
  Plugin Name: YouTube Embed
4
  Plugin URI: https://github.com/dartiss/youtube-embed
5
  Description: An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
6
+ Version: 5.0.6
7
  Author: dartiss
8
  Author URI: https://artiss.blog
9
  Text Domain: youtube-embed
18
  * @since 2.0
19
  */
20
 
21
+ define( 'youtube_embed_version', '5.0.6' );
22
 
23
  $functions_dir = plugin_dir_path( __FILE__ ) . 'includes/';
24