Disable Embeds - Version 1.5.0

Version Description

Download this release

Release Info

Developer swissspidy
Plugin Icon Disable Embeds
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.0 to 1.5.0

Files changed (5) hide show
  1. build/index.asset.php +1 -0
  2. build/index.js +1 -0
  3. disable-embeds.php +11 -9
  4. js/editor.js +0 -1
  5. readme.txt +10 -3
build/index.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready', 'wp-polyfill'), 'version' => '31e874767ee3032bc02a0262b4ec6fb0');
build/index.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=2)}([function(e,r){e.exports=window.wp.blocks},function(e,r){e.exports=window.wp.domReady},function(e,r,t){"use strict";t.r(r);var n=t(0),o=t(1);t.n(o)()((function(){n.getBlockVariations&&Object(n.getBlockVariations)("core/embed")?Object(n.unregisterBlockVariation)("core/embed","wordpress"):Object(n.getBlockType)("core-embed/wordpress")&&Object(n.unregisterBlockType)("core-embed/wordpress")}))}]);
disable-embeds.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Disable Embeds
4
  * Description: Don't like the enhanced embeds in WordPress 4.4? Easily disable the feature using this plugin.
5
- * Version: 1.4.0
6
  * Author: Pascal Birchler
7
  * Author URI: https://pascalbirchler.com
8
  * License: GPLv2+
@@ -155,15 +155,17 @@ function disable_embeds_filter_oembed_response_data( $data ) {
155
  * This is used to unregister the `core-embed/wordpress` block type.
156
  */
157
  function disable_embeds_enqueue_block_editor_assets() {
 
 
 
 
 
 
158
  wp_enqueue_script(
159
  'disable-embeds',
160
- plugins_url( 'js/editor.js', __FILE__ ),
161
- array(
162
- 'wp-edit-post',
163
- 'wp-editor',
164
- 'wp-dom',
165
- ),
166
- '20181202',
167
  true
168
  );
169
  }
@@ -173,7 +175,7 @@ function disable_embeds_enqueue_block_editor_assets() {
173
  *
174
  * @since 1.4.0
175
  *
176
- * @param \WP_Scripts $scripts WP_Scripts instance, passed by reference.
177
  */
178
  function disable_embeds_remove_script_dependencies( $scripts ) {
179
  if ( ! empty( $scripts->registered['wp-edit-post'] ) ) {
2
  /**
3
  * Plugin Name: Disable Embeds
4
  * Description: Don't like the enhanced embeds in WordPress 4.4? Easily disable the feature using this plugin.
5
+ * Version: 1.5.0
6
  * Author: Pascal Birchler
7
  * Author URI: https://pascalbirchler.com
8
  * License: GPLv2+
155
  * This is used to unregister the `core-embed/wordpress` block type.
156
  */
157
  function disable_embeds_enqueue_block_editor_assets() {
158
+ $asset_file = plugin_dir_path( __FILE__ ) . 'build/index.asset.php';
159
+ $asset = is_readable( $asset_file ) ? require $asset_file : [];
160
+
161
+ $asset['dependencies'] = isset( $asset['dependencies'] ) ? $asset['dependencies'] : [];
162
+ $asset['version'] = isset( $asset['version'] ) ? $asset['version'] : '';
163
+
164
  wp_enqueue_script(
165
  'disable-embeds',
166
+ plugins_url( 'build/index.js', __FILE__ ),
167
+ $asset['dependencies'],
168
+ $asset['version'],
 
 
 
 
169
  true
170
  );
171
  }
175
  *
176
  * @since 1.4.0
177
  *
178
+ * @param WP_Scripts $scripts WP_Scripts instance, passed by reference.
179
  */
180
  function disable_embeds_remove_script_dependencies( $scripts ) {
181
  if ( ! empty( $scripts->registered['wp-edit-post'] ) ) {
js/editor.js DELETED
@@ -1 +0,0 @@
1
- this.DisableEmbeds=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1);n.n(o)()(function(){Object(r.unregisterBlockType)("core-embed/wordpress")})}]);
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: swissspidy
3
  Donate link: https://pascalbirchler.com
4
  Tags: embed, embeds, oembed
5
  Requires at least: 4.4
6
- Tested up to: 5.0
7
- Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -46,6 +46,10 @@ Sorry, there are no screenshots for this plugin! Everything is done behind the s
46
 
47
  ## Changelog ##
48
 
 
 
 
 
49
  ### 1.4.0 ###
50
  * Updated against WordPress 5.0
51
 
@@ -65,13 +69,16 @@ Sorry, there are no screenshots for this plugin! Everything is done behind the s
65
 
66
  ## Upgrade Notice ##
67
 
 
 
 
68
  ### 1.4.0 ###
69
  Adds support for WordPress 5.0 and its new block editor.
70
 
71
  ### 1.3.0 ###
72
  Removes a new embeds filter that was added in WordPress 4.5.3
73
 
74
- ### 1.2.0 ###
75
  Now removes all embeds rewrite rules on plugin activation.
76
 
77
  ### 1.1.0 ###
3
  Donate link: https://pascalbirchler.com
4
  Tags: embed, embeds, oembed
5
  Requires at least: 4.4
6
+ Tested up to: 6.0
7
+ Stable tag: 1.5.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
46
 
47
  ## Changelog ##
48
 
49
+ ### 1.5.0 ###
50
+
51
+ * Updated against WordPress 5.7
52
+
53
  ### 1.4.0 ###
54
  * Updated against WordPress 5.0
55
 
69
 
70
  ## Upgrade Notice ##
71
 
72
+ ### 1.5.0 ###
73
+ Updated against WordPress 5.7 to correctly remove block style variations.
74
+
75
  ### 1.4.0 ###
76
  Adds support for WordPress 5.0 and its new block editor.
77
 
78
  ### 1.3.0 ###
79
  Removes a new embeds filter that was added in WordPress 4.5.3
80
 
81
+ ### 1.2.0 ###
82
  Now removes all embeds rewrite rules on plugin activation.
83
 
84
  ### 1.1.0 ###