Changeset 2452342
- Timestamp:
- 01/08/2021 07:23:56 AM (5 years ago)
- Location:
- mrw-web-design-simple-tinymce
- Files:
-
- 10 edited
- 1 copied
-
tags/2.4.0 (copied) (copied from mrw-web-design-simple-tinymce/trunk)
-
tags/2.4.0/changelog.txt (modified) (1 diff)
-
tags/2.4.0/inc/block-editor.php (modified) (11 diffs)
-
tags/2.4.0/js/block-editor.js (modified) (2 diffs)
-
tags/2.4.0/mrwweb-simple-tinymce.php (modified) (1 diff)
-
tags/2.4.0/readme.txt (modified) (4 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/inc/block-editor.php (modified) (11 diffs)
-
trunk/js/block-editor.js (modified) (2 diffs)
-
trunk/mrwweb-simple-tinymce.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mrw-web-design-simple-tinymce/tags/2.4.0/changelog.txt
r2354107 r2452342 1 = 2.4.0 (January 7, 2021) = 2 * [Fix] Hide Embeds which were previously hidden. Refactoring of embeds in WordPress 5.6 broke the previous way of hiding them 3 * [Dev] Improve consistency of how filters are applied 4 5 = 2.3.0 (January 3, 2021) = 6 * WordPress 5.6 support confirmed 7 * [New] Hide Jetpack Blocks: Markdown, Star Rating, Repeat Visitor, OpenTable, Revue, Eventbrite Tickets, GIF, Calendly, and WhatsApp Button. Adds `mrw_jetpack_hidden_blocks` filter, allowing developers to easily unhide these blocks while also making it easier to hide other Jetpack blocks! 8 * [Fix] (!!!) Hide Dropcap setting in Editor ([big props](https://github.com/mrwweb/mrw-simplified-editor-wordpress/issues/15) to @xemlock and @joppuyo on Github) 9 * [Fix] Resolve notice from Block Editor Colors plugin when using a theme without a custom color palette. 10 * [Fix] Only add body classes that hide editor settings on the Block Editor screen 11 * [Dev] **Deprecated Filters (Sorry for doing this again, last time I foresee):** Replace "disabled" with "hidden" and "style variations" with "block styles" for improved clarity. 12 * `mrw_disabled_blocks` ➡ `mrw_hidden_blocks` 13 * `mrw_disabled_style_variations` ➡ `mrw_hidden_block_styles` 14 * `mrw_disabled_block_editor_settings` ➡ `mrw_hidden_block_editor_settings` 15 * [Docs] - Moved Filter references and code examples to [GitHub wiki](https://github.com/mrwweb/mrw-simplified-editor-wordpress/wiki/MRW-Simplified-Editor-Documentation) 16 1 17 = 2.2.0 (Aug 5, 2020) = 2 18 * WordPress 5.5 support -
mrw-web-design-simple-tinymce/tags/2.4.0/inc/block-editor.php
r2449625 r2452342 130 130 'core/search', 131 131 'core/tag-cloud', 132 133 // Embeds134 'core-embed/amazon-kindle',135 'core-embed/animoto',136 'core-embed/cloudup',137 'core-embed/collegehumor',138 'core-embed/crowdsignal',139 'core-embed/dailymotion',140 'core-embed/hulu',141 'core-embed/mixcloud',142 'core-embed/polldaddy',143 'core-embed/reverbnation',144 'core-embed/smugmug',145 'core-embed/speaker',146 'core-embed/videopress',147 'core-embed/wordpress-tv',148 132 ); 149 133 … … 174 158 ); 175 159 176 $hidden_blocks = apply_filters( 'mrw_hidden_blocks', $hidden_blocks ); 177 178 return $hidden_blocks; 160 return apply_filters( 'mrw_hidden_blocks', $hidden_blocks ); 161 162 } 163 164 /** 165 * Return list of hidden embeds 166 */ 167 function mrw_hidden_embeds() { 168 169 // Embeds 170 $hidden_embeds = array( 171 'amazon-kindle', 172 'animoto', 173 'cloudup', 174 'collegehumor', 175 'crowdsignal', 176 'dailymotion', 177 'hulu', 178 'mixcloud', 179 'polldaddy', 180 'reverbnation', 181 'smugmug', 182 'speaker', 183 'videopress', 184 'wordpress-tv', 185 ); 186 187 return apply_filters( 'mrw_hidden_embeds', $hidden_embeds ); 179 188 180 189 } … … 187 196 */ 188 197 function mrw_jetpack_hidden_blocks() { 198 189 199 if ( ! class_exists( 'Jetpack_Gutenberg' ) ) { 190 200 return; … … 215 225 ); 216 226 } 227 217 228 } 218 229 … … 250 261 ); 251 262 252 $hidden_styles = apply_filters( 253 'mrw_hidden_block_styles', 254 $hidden_styles 255 ); 256 257 return $hidden_styles; 263 return apply_filters( 'mrw_hidden_block_styles', $hidden_styles ); 258 264 259 265 } … … 295 301 ); 296 302 297 $hidden_block_editor_settings = apply_filters( 298 'mrw_hidden_block_editor_settings', 299 $hidden_block_editor_settings 300 ); 301 302 return $hidden_block_editor_settings; 303 return apply_filters( 'mrw_hidden_block_editor_settings', $hidden_block_editor_settings ); 303 304 304 305 } … … 322 323 323 324 return $editor_settings; 325 324 326 } 325 327 … … 333 335 $js_options = array(); 334 336 335 // Note: us earray_values to ensure this is passed as an array and not an object337 // Note: using array_values to ensure this is passed as an array and not an object 336 338 337 339 /*============================== … … 342 344 343 345 /*======================================== 344 = StyleVariations =346 = Embed Variations = 345 347 ========================================*/ 348 $js_options['hiddenEmbeds'] = array_values( mrw_hidden_embeds() ); 349 350 /*==================================== 351 = Block Styles = 352 ======================================*/ 346 353 $hidden_style_variations = array(); 347 354 foreach ( mrw_hidden_block_styles() as $block => $styles ) { … … 350 357 351 358 $js_options['hiddenStyles'] = $hidden_styles; 352 353 359 354 360 /*================================ … … 356 362 ================================*/ 357 363 $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() ); 358 359 364 360 365 return $js_options; -
mrw-web-design-simple-tinymce/tags/2.4.0/js/block-editor.js
r2449625 r2452342 1 /* 2 * Hide Blocks 3 */ 1 4 wp.hooks.addFilter( 'blocks.registerBlockType', 'hideBlocks', ( blockSettings, blockName ) => { 2 5 … … 12 15 wp.domReady( function() { 13 16 17 /* 18 * Hide Embed Variations 19 */ 20 wp.blocks.getBlockVariations('core/embed').forEach(function (embed) { 21 22 if ( -1 !== mrwEditorOptions.hiddenEmbeds.indexOf(embed.name) ) { 23 wp.blocks.unregisterBlockVariation('core/embed', embed.name ); 24 } 25 26 }); 27 28 /* 29 * Hide Block Styles 30 */ 14 31 Object.keys( mrwEditorOptions.hiddenStyles ).forEach( function( block ) { 32 15 33 mrwEditorOptions.hiddenStyles[block].forEach( function( style ) { 16 34 wp.blocks.unregisterBlockStyle( block, style ); 17 35 }); 36 18 37 }); 19 38 -
mrw-web-design-simple-tinymce/tags/2.4.0/mrwweb-simple-tinymce.php
r2449625 r2452342 4 4 * Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/ 5 5 * Description: Streamlines the Block Editor and Classic Editor with only the critical features for consistent semantic formatting. 6 * Version: 2. 3.06 * Version: 2.4.0 7 7 * Author: Mark Root-Wiley 8 8 * Author URI: https://MRWweb.com -
mrw-web-design-simple-tinymce/tags/2.4.0/readme.txt
r2449627 r2452342 1 1 === MRW Simplified Editor === 2 2 Contributors: mrwweb 3 Tags: Block Editor, Gutenberg, TinyMCE, Editor Styles, Editor3 Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor 4 4 Requires at least: 4.1 5 5 Requires PHP: 5.6.20 6 6 Tested up to: 5.6 7 Stable tag: 2. 3.07 Stable tag: 2.4.0 8 8 Donate link: https://www.paypal.me/rootwiley 9 9 License: GPLv3 or later … … 42 42 Reduce editor to a single row of buttons: "Styleselect" (Headings 2-4 and Blockquote as well as Strikethrough, Subscript, Superscript, Preformatted, and Code), Bold, Italic, Add/Edit Link, Break Link, Horizontal Rule (added 1.2.0), Paste as Plain Text, Remove Styles, Special Characters, Undo, Redo, Help, Distraction Free Mode. 43 43 44 = Note on WordPress version Support = 45 Due to frequent changes to the block editor, features are only guaranteed for the latest version of WordPress. 46 44 47 == Frequently Asked Questions == 45 48 … … 68 71 == Changelog == 69 72 73 = 2.4.0 (January 7, 2021) = 74 * [Fix] Hide Embeds which were previously hidden. Refactoring of embeds in WordPress 5.6 broke the previous way of hiding them 75 * [Dev] Introduce new `mrw_hidden_embeds` filter. Embeds are no long hidden via the `mrw_hidden_blocks`. 76 * [Dev] Improve consistency of how filters are applied 77 70 78 = 2.3.0 (January 3, 2021) = 71 79 * WordPress 5.6 support confirmed … … 80 88 * [Docs] - Moved Filter references and code examples to [GitHub wiki](https://github.com/mrwweb/mrw-simplified-editor-wordpress/wiki/MRW-Simplified-Editor-Documentation) 81 89 82 = 2.2.0 (Aug 5, 2020) =83 * WordPress 5.5 support84 * [NEW] WP 5.5 features disabled:85 * Core Block Patterns86 * Block Directory Installer87 * [NEW] Hide "Default style" select for style variations (the theme's default is the default for a reason!)88 * [Fix] Hide Headings 1, 5, and 6 in all languages, not just English89 * [Fix] Adjust "Save draft" button to show consistently and match new secondary button styles90 * [Fix] Restore more prominent color contrast errors91 * [Fix] Restore ability to edit galleries (props to Mackenzie at WSCADV for reporting this one)92 * [Regression] WordPress 5.5 makes it impossible to hide the Dropcap option93 * [Dev] **Deprecated Filters:** Remove all instances of "blacklist" from the plugin. `mrw_block_blacklist` and `mrw_style_variations_blacklist` are now deprecated in favor of `mrw_disabled_blocks` and `mrw_disabled_style_variations`. Respective object properties in JS are also renamed. Deprecate `mrw_block_editor_disable_settings` and add `mrw_disabled_block_editor_settings` for consistency. *Filters will be removed from the plugin as early as August 2021.*94 * [Dev] Refactor internal functions for managing default options95 96 90 = Full Changelog = 97 91 * [Changelog on Github](https://github.com/mrwweb/mrw-simplified-editor-wordpress/blob/master/changelog.txt) 98 92 99 93 == Upgrade Notice == 100 = 2. 3.0 =101 * Hide infrequently used Jetpack blocks. Restore hiding the Drop Cap setting for the paragraph block. Developers: See readme re: deprecated filter names.94 = 2.4.0 = 95 * Fix hiding of embeds which broke in WordPress 5.6 -
mrw-web-design-simple-tinymce/trunk/changelog.txt
r2354107 r2452342 1 = 2.4.0 (January 7, 2021) = 2 * [Fix] Hide Embeds which were previously hidden. Refactoring of embeds in WordPress 5.6 broke the previous way of hiding them 3 * [Dev] Improve consistency of how filters are applied 4 5 = 2.3.0 (January 3, 2021) = 6 * WordPress 5.6 support confirmed 7 * [New] Hide Jetpack Blocks: Markdown, Star Rating, Repeat Visitor, OpenTable, Revue, Eventbrite Tickets, GIF, Calendly, and WhatsApp Button. Adds `mrw_jetpack_hidden_blocks` filter, allowing developers to easily unhide these blocks while also making it easier to hide other Jetpack blocks! 8 * [Fix] (!!!) Hide Dropcap setting in Editor ([big props](https://github.com/mrwweb/mrw-simplified-editor-wordpress/issues/15) to @xemlock and @joppuyo on Github) 9 * [Fix] Resolve notice from Block Editor Colors plugin when using a theme without a custom color palette. 10 * [Fix] Only add body classes that hide editor settings on the Block Editor screen 11 * [Dev] **Deprecated Filters (Sorry for doing this again, last time I foresee):** Replace "disabled" with "hidden" and "style variations" with "block styles" for improved clarity. 12 * `mrw_disabled_blocks` ➡ `mrw_hidden_blocks` 13 * `mrw_disabled_style_variations` ➡ `mrw_hidden_block_styles` 14 * `mrw_disabled_block_editor_settings` ➡ `mrw_hidden_block_editor_settings` 15 * [Docs] - Moved Filter references and code examples to [GitHub wiki](https://github.com/mrwweb/mrw-simplified-editor-wordpress/wiki/MRW-Simplified-Editor-Documentation) 16 1 17 = 2.2.0 (Aug 5, 2020) = 2 18 * WordPress 5.5 support -
mrw-web-design-simple-tinymce/trunk/inc/block-editor.php
r2449625 r2452342 130 130 'core/search', 131 131 'core/tag-cloud', 132 133 // Embeds134 'core-embed/amazon-kindle',135 'core-embed/animoto',136 'core-embed/cloudup',137 'core-embed/collegehumor',138 'core-embed/crowdsignal',139 'core-embed/dailymotion',140 'core-embed/hulu',141 'core-embed/mixcloud',142 'core-embed/polldaddy',143 'core-embed/reverbnation',144 'core-embed/smugmug',145 'core-embed/speaker',146 'core-embed/videopress',147 'core-embed/wordpress-tv',148 132 ); 149 133 … … 174 158 ); 175 159 176 $hidden_blocks = apply_filters( 'mrw_hidden_blocks', $hidden_blocks ); 177 178 return $hidden_blocks; 160 return apply_filters( 'mrw_hidden_blocks', $hidden_blocks ); 161 162 } 163 164 /** 165 * Return list of hidden embeds 166 */ 167 function mrw_hidden_embeds() { 168 169 // Embeds 170 $hidden_embeds = array( 171 'amazon-kindle', 172 'animoto', 173 'cloudup', 174 'collegehumor', 175 'crowdsignal', 176 'dailymotion', 177 'hulu', 178 'mixcloud', 179 'polldaddy', 180 'reverbnation', 181 'smugmug', 182 'speaker', 183 'videopress', 184 'wordpress-tv', 185 ); 186 187 return apply_filters( 'mrw_hidden_embeds', $hidden_embeds ); 179 188 180 189 } … … 187 196 */ 188 197 function mrw_jetpack_hidden_blocks() { 198 189 199 if ( ! class_exists( 'Jetpack_Gutenberg' ) ) { 190 200 return; … … 215 225 ); 216 226 } 227 217 228 } 218 229 … … 250 261 ); 251 262 252 $hidden_styles = apply_filters( 253 'mrw_hidden_block_styles', 254 $hidden_styles 255 ); 256 257 return $hidden_styles; 263 return apply_filters( 'mrw_hidden_block_styles', $hidden_styles ); 258 264 259 265 } … … 295 301 ); 296 302 297 $hidden_block_editor_settings = apply_filters( 298 'mrw_hidden_block_editor_settings', 299 $hidden_block_editor_settings 300 ); 301 302 return $hidden_block_editor_settings; 303 return apply_filters( 'mrw_hidden_block_editor_settings', $hidden_block_editor_settings ); 303 304 304 305 } … … 322 323 323 324 return $editor_settings; 325 324 326 } 325 327 … … 333 335 $js_options = array(); 334 336 335 // Note: us earray_values to ensure this is passed as an array and not an object337 // Note: using array_values to ensure this is passed as an array and not an object 336 338 337 339 /*============================== … … 342 344 343 345 /*======================================== 344 = StyleVariations =346 = Embed Variations = 345 347 ========================================*/ 348 $js_options['hiddenEmbeds'] = array_values( mrw_hidden_embeds() ); 349 350 /*==================================== 351 = Block Styles = 352 ======================================*/ 346 353 $hidden_style_variations = array(); 347 354 foreach ( mrw_hidden_block_styles() as $block => $styles ) { … … 350 357 351 358 $js_options['hiddenStyles'] = $hidden_styles; 352 353 359 354 360 /*================================ … … 356 362 ================================*/ 357 363 $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() ); 358 359 364 360 365 return $js_options; -
mrw-web-design-simple-tinymce/trunk/js/block-editor.js
r2449625 r2452342 1 /* 2 * Hide Blocks 3 */ 1 4 wp.hooks.addFilter( 'blocks.registerBlockType', 'hideBlocks', ( blockSettings, blockName ) => { 2 5 … … 12 15 wp.domReady( function() { 13 16 17 /* 18 * Hide Embed Variations 19 */ 20 wp.blocks.getBlockVariations('core/embed').forEach(function (embed) { 21 22 if ( -1 !== mrwEditorOptions.hiddenEmbeds.indexOf(embed.name) ) { 23 wp.blocks.unregisterBlockVariation('core/embed', embed.name ); 24 } 25 26 }); 27 28 /* 29 * Hide Block Styles 30 */ 14 31 Object.keys( mrwEditorOptions.hiddenStyles ).forEach( function( block ) { 32 15 33 mrwEditorOptions.hiddenStyles[block].forEach( function( style ) { 16 34 wp.blocks.unregisterBlockStyle( block, style ); 17 35 }); 36 18 37 }); 19 38 -
mrw-web-design-simple-tinymce/trunk/mrwweb-simple-tinymce.php
r2449625 r2452342 4 4 * Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/ 5 5 * Description: Streamlines the Block Editor and Classic Editor with only the critical features for consistent semantic formatting. 6 * Version: 2. 3.06 * Version: 2.4.0 7 7 * Author: Mark Root-Wiley 8 8 * Author URI: https://MRWweb.com -
mrw-web-design-simple-tinymce/trunk/readme.txt
r2449627 r2452342 1 1 === MRW Simplified Editor === 2 2 Contributors: mrwweb 3 Tags: Block Editor, Gutenberg, TinyMCE, Editor Styles, Editor3 Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor 4 4 Requires at least: 4.1 5 5 Requires PHP: 5.6.20 6 6 Tested up to: 5.6 7 Stable tag: 2. 3.07 Stable tag: 2.4.0 8 8 Donate link: https://www.paypal.me/rootwiley 9 9 License: GPLv3 or later … … 42 42 Reduce editor to a single row of buttons: "Styleselect" (Headings 2-4 and Blockquote as well as Strikethrough, Subscript, Superscript, Preformatted, and Code), Bold, Italic, Add/Edit Link, Break Link, Horizontal Rule (added 1.2.0), Paste as Plain Text, Remove Styles, Special Characters, Undo, Redo, Help, Distraction Free Mode. 43 43 44 = Note on WordPress version Support = 45 Due to frequent changes to the block editor, features are only guaranteed for the latest version of WordPress. 46 44 47 == Frequently Asked Questions == 45 48 … … 68 71 == Changelog == 69 72 73 = 2.4.0 (January 7, 2021) = 74 * [Fix] Hide Embeds which were previously hidden. Refactoring of embeds in WordPress 5.6 broke the previous way of hiding them 75 * [Dev] Introduce new `mrw_hidden_embeds` filter. Embeds are no long hidden via the `mrw_hidden_blocks`. 76 * [Dev] Improve consistency of how filters are applied 77 70 78 = 2.3.0 (January 3, 2021) = 71 79 * WordPress 5.6 support confirmed … … 80 88 * [Docs] - Moved Filter references and code examples to [GitHub wiki](https://github.com/mrwweb/mrw-simplified-editor-wordpress/wiki/MRW-Simplified-Editor-Documentation) 81 89 82 = 2.2.0 (Aug 5, 2020) =83 * WordPress 5.5 support84 * [NEW] WP 5.5 features disabled:85 * Core Block Patterns86 * Block Directory Installer87 * [NEW] Hide "Default style" select for style variations (the theme's default is the default for a reason!)88 * [Fix] Hide Headings 1, 5, and 6 in all languages, not just English89 * [Fix] Adjust "Save draft" button to show consistently and match new secondary button styles90 * [Fix] Restore more prominent color contrast errors91 * [Fix] Restore ability to edit galleries (props to Mackenzie at WSCADV for reporting this one)92 * [Regression] WordPress 5.5 makes it impossible to hide the Dropcap option93 * [Dev] **Deprecated Filters:** Remove all instances of "blacklist" from the plugin. `mrw_block_blacklist` and `mrw_style_variations_blacklist` are now deprecated in favor of `mrw_disabled_blocks` and `mrw_disabled_style_variations`. Respective object properties in JS are also renamed. Deprecate `mrw_block_editor_disable_settings` and add `mrw_disabled_block_editor_settings` for consistency. *Filters will be removed from the plugin as early as August 2021.*94 * [Dev] Refactor internal functions for managing default options95 96 90 = Full Changelog = 97 91 * [Changelog on Github](https://github.com/mrwweb/mrw-simplified-editor-wordpress/blob/master/changelog.txt) 98 92 99 93 == Upgrade Notice == 100 = 2. 3.0 =101 * Hide infrequently used Jetpack blocks. Restore hiding the Drop Cap setting for the paragraph block. Developers: See readme re: deprecated filter names.94 = 2.4.0 = 95 * Fix hiding of embeds which broke in WordPress 5.6
Note: See TracChangeset
for help on using the changeset viewer.