Changeset 3398351
- Timestamp:
- 11/18/2025 07:49:39 PM (5 months ago)
- Location:
- mrw-web-design-simple-tinymce
- Files:
-
- 2 added
- 15 edited
- 1 copied
-
assets/blueprints/blueprint.json (modified) (1 diff)
-
tags/2.14.0 (copied) (copied from mrw-web-design-simple-tinymce/trunk)
-
tags/2.14.0/changelog.txt (modified) (1 diff)
-
tags/2.14.0/css/block-editor.css (modified) (3 diffs)
-
tags/2.14.0/css/blocks.css (added)
-
tags/2.14.0/inc/block-editor.php (modified) (28 diffs)
-
tags/2.14.0/inc/classic-editor.php (modified) (6 diffs)
-
tags/2.14.0/js/block-editor.js (modified) (2 diffs)
-
tags/2.14.0/mrwweb-simple-tinymce.php (modified) (1 diff)
-
tags/2.14.0/readme.txt (modified) (3 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/css/block-editor.css (modified) (3 diffs)
-
trunk/css/blocks.css (added)
-
trunk/inc/block-editor.php (modified) (28 diffs)
-
trunk/inc/classic-editor.php (modified) (6 diffs)
-
trunk/js/block-editor.js (modified) (2 diffs)
-
trunk/mrwweb-simple-tinymce.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mrw-web-design-simple-tinymce/assets/blueprints/blueprint.json
r3050062 r3398351 5 5 { 6 6 "step": "login", 7 "username": "admin", 8 "password": "password" 7 "username": "admin" 9 8 }, 10 9 { 11 10 "step": "installPlugin", 12 "plugin ZipFile": {11 "pluginData": { 13 12 "resource": "wordpress.org\/plugins", 14 13 "slug": "mrw-web-design-simple-tinymce" -
mrw-web-design-simple-tinymce/tags/2.14.0/changelog.txt
r3050062 r3398351 1 = 2.14.0 (November 18, 2025) 2 3 - New minimum supported version: WordPress 6.5 4 - [WordPress 6.9] Hide new blocks: Accordion, Math, Term Query, Time to Read, Word Count. Use `mrw_hidden_blocks` to show. 5 - [WordPress 6.9] Hide "Fit Text" block variations in WordPres 6.9: Use `mrw_hidden_block_editor_settings` filter to show. 6 - Hide lesser-used social links like 500px, Amazon, last.fm, Pocket (RIP), etc. Use `mrw_hidden_social_links` to show hidden links or hide additional ones. 7 - Hide Template Part embeds in the post editor context since they literally can't be embedded. Hopefully this gets [solved in WordPress](https://github.com/WordPress/gutenberg/issues/67797) eventually. 8 - Update hidden buttons in image placeholders to show "Use Featured Image" option for Media & Text block and display Media Library in the primary button style. 9 - Hide Goodreads and Nextdoor blocks in Jetpack 10 - Resolve warning about correctly loading block styles in editor to prepare for iframed editor in WP 7.0. 11 - Dev: Resolve Plugin Check warnings. 12 - Dev: Introduce namespaces to reduce risk of naming collisions. 13 - Dev: Improve how block variations are unregistered. 14 - Dev: Update deprecated properties in `blueprint.json` 15 - Dev: Miscellaneous code cleanup 16 - Fix incorrect license listed in `readme.txt` to match link and plugin header (GPL2 and above) 17 1 18 = 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) = 2 19 - [New] Hide new default box-shadows design feature. Should not interfere with theme-defined shadows. Enable default shadows via `mrw_hidden_block_editor_settings` filter. -
mrw-web-design-simple-tinymce/tags/2.14.0/css/block-editor.css
r3050062 r3398351 26 26 27 27 /* 28 Hide the "Text over image" toolbar button when the Cover block is not in the inserter 29 Only works for English sites :'( 30 */ 31 .mrw-block-editor-no-cover-block .block-editor-block-toolbar .components-button[aria-label="Add text over image"] { 32 display: none; 33 } 34 35 /* 28 36 Hide Heading Levels 1, 5, and 6 29 37 Filter values: heading-1, heading-5, heading-6 30 38 */ 31 .mrw-block-editor-no-heading-1 .components-button[aria-label="Heading 1"],32 .mrw-block-editor-no-heading-5 .components-button[aria-label="Heading 5"],33 .mrw-block-editor-no-heading-6 .components-button[aria-label="Heading 6"],34 /* WP6.5+ */35 39 .mrw-block-editor-no-heading-1 .block-library-heading-level-dropdown .components-button:nth-child(1), 36 40 .mrw-block-editor-no-heading-5 .block-library-heading-level-dropdown .components-button:nth-child(5), 37 41 .mrw-block-editor-no-heading-6 .block-library-heading-level-dropdown .components-button:nth-child(6) { 38 display: none;39 }40 41 /*42 Image Pixel & Percentage Sizing43 Filter Value: image-dimensions44 45 Not working in WordPress 6.3+46 */47 .mrw-block-editor-no-image-dimensions .block-library-image__dimensions,48 .mrw-block-editor-no-image-dimensions .block-editor-image-size-control {49 42 display: none; 50 43 } … … 72 65 display: none; 73 66 } 74 75 /*===================================================76 = Always use Media Library in Flows =77 ===================================================*/78 /*79 Hide color options in cover placeholder80 Current not configurable due to iFramed block editor81 */82 .wp-block-cover__placeholder-background-options {83 display: none;84 }85 86 87 /* always style the Media Library item as a primary button */88 .block-editor-media-placeholder .components-button.is-tertiary {89 background: var(--wp-admin-theme-color);90 color: #fff;91 padding: 6px 12px;92 }93 94 .block-editor-media-placeholder .components-button.is-tertiary:hover:not(:disabled) {95 background: var(--wp-admin-theme-color-darker-10);96 color: #fff;97 }98 99 /* handle gallery exception */100 .mrw-block-editor-no-image-url .wp-block-gallery .components-form-file-upload,101 .mrw-block-editor-no-image-upload .wp-block-gallery .components-form-file-upload {102 display: block;103 }104 105 /* Never show "upload" and "from URL" options in WordPress 6.3+ when editor is in iframe */106 .block-editor-media-placeholder__upload-button,107 .block-editor-media-placeholder__url-input-container,108 .block-editor-media-replace-flow__media-upload-menu .components-form-file-upload {109 display: none;110 }111 112 67 113 68 /*=========================================== … … 153 108 = Color Contrast Warning = 154 109 ==============================================*/ 155 /* WP 6.0 */156 110 .color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper { 157 111 display: flex; -
mrw-web-design-simple-tinymce/tags/2.14.0/inc/block-editor.php
r3050062 r3398351 1 1 <?php 2 add_action( 'after_setup_theme', 'mrw_block_editor_theme_support', 11 );2 add_action( 'after_setup_theme', __NAMESPACE__ . '\block_editor_theme_support', 11 ); 3 3 /** 4 4 * Make modifications to editor that can be made using default add_theme_support() calls 5 5 */ 6 function mrw_block_editor_theme_support() {6 function block_editor_theme_support() { 7 7 8 8 /* … … 97 97 } 98 98 99 add_action( 'plugins_loaded', 'mrw_hide_block_directory' );99 add_action( 'plugins_loaded', __NAMESPACE__ . '\hide_block_directory' ); 100 100 /** 101 101 * Hide the block directory … … 103 103 * @see https://github.com/WordPress/gutenberg/issues/23961#issuecomment-666683997 104 104 */ 105 function mrw_hide_block_directory() {106 107 if( in_array( 'block-directory', mrw_hidden_block_editor_settings() ) ) {105 function hide_block_directory() { 106 107 if( in_array( 'block-directory', hidden_block_editor_settings() ) ) { 108 108 remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); 109 109 remove_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' ); … … 119 119 * @return array slugs of all hidden core blocks 120 120 */ 121 function mrw_hidden_blocks() {121 function hidden_blocks() { 122 122 123 123 $current_screen = get_current_screen(); … … 132 132 */ 133 133 $hidden_core_blocks = apply_filters( 'mrw_hidden_core_blocks', array( 134 'core/accordion', 134 135 'core/audio', 135 136 'core/code', … … 137 138 'core/footnotes', 138 139 'core/freeform', 140 'core/latest-posts', 141 'core/math', 139 142 'core/nextpage', 140 143 'core/preformatted', … … 177 180 'core/query-title', 178 181 'core/post-title', 182 'core/post-comments-count', 183 'core/post-comments-link', 179 184 'core/post-content', 180 185 'core/post-date', … … 185 190 'core/post-author-biography', 186 191 'core/read-more', 192 'core/term-count', 193 'core/term-name', 187 194 'core/term-description', 195 'core/terms-query', 196 'core/post-time-to-read', 188 197 ), $context ); 189 198 … … 208 217 'core/post-comments-form', 209 218 'core/post-navigation-link', 219 'core/template-part', 210 220 ), $context ); 211 221 … … 235 245 } 236 246 237 add_filter( 'mrw_hidden_site_blocks', 'mrw_show_blocks_in_site_editor', 0, 2 );238 add_filter( 'mrw_hidden_query_blocks', 'mrw_show_blocks_in_site_editor', 0, 2 );247 add_filter( 'mrw_hidden_site_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 ); 248 add_filter( 'mrw_hidden_query_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 ); 239 249 /** 240 250 * Show all Query- and Post-related blocks in the Site Editor 241 251 */ 242 function mrw_show_blocks_in_site_editor( $blocks, $context ) {252 function show_blocks_in_site_editor( $blocks, $context ) { 243 253 if( $context === 'site-editor' ) { 244 254 $blocks = array(); … … 251 261 * Return list of hidden embeds 252 262 */ 253 function mrw_hidden_embeds() {263 function hidden_embeds() { 254 264 255 265 $hidden_embeds = array( … … 282 292 } 283 293 284 add_action( 'jetpack_register_gutenberg_extensions', 'mrw_jetpack_hidden_blocks', 99 ); 294 /** 295 * Return list of hidden social links 296 */ 297 function hidden_social_links() { 298 299 $hidden_social_links = array( 300 'amazon', 301 'bandcamp', 302 'behance', 303 'behance', 304 'codepen', 305 'deviantart', 306 'discord', 307 'dribbble', 308 'dropbox', 309 'etsy', 310 'fivehundredpx', 311 'foursquare', 312 'goodreads', 313 'gravatar', 314 'lastfm', 315 'medium', 316 'meetup', 317 'pocket', 318 'twitch', 319 'vk', 320 'yelp', 321 ); 322 323 /** 324 * mrw_hidden_social_links filter 325 * @since 2.14.0 326 */ 327 return apply_filters( 'mrw_hidden_social_links', $hidden_social_links ); 328 329 } 330 331 add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\jetpack_hidden_blocks', 99 ); 285 332 /** 286 333 * Hidden Jetpack Blocks … … 288 335 * @see https://developer.jetpack.com/hooks/jetpack_register_gutenberg_extensions/ 289 336 */ 290 function mrw_jetpack_hidden_blocks() {337 function jetpack_hidden_blocks() { 291 338 292 339 if ( ! class_exists( 'Jetpack_Gutenberg' ) ) { … … 303 350 'eventbrite', 304 351 'gif', 352 'goodreads', 305 353 'markdown', 354 'nextdoor', 306 355 'opentable', 307 356 'payments-intro', … … 339 388 * @return array keyed array where keys are a block slug and value is an array containing all block style to remove 340 389 */ 341 function mrw_hidden_block_styles() {390 function hidden_block_styles() { 342 391 343 392 $hidden_styles = array( … … 364 413 * @return array every option to hide via CSS or JS 365 414 */ 366 function mrw_hidden_block_editor_settings() {415 function hidden_block_editor_settings() { 367 416 368 417 $hidden_block_editor_settings = array( … … 375 424 'drop-cap', 376 425 'duotone', 426 'fit-text-heading', 427 'fit-text-paragraph', 377 428 'font-weight', 378 429 'font-style', … … 412 463 } 413 464 414 add_filter( 'block_editor_settings_all', 'mrw_block_editor_settings', 99, 2 );465 add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\block_editor_settings', 99, 2 ); 415 466 /** 416 467 * Make changes to editor settings, accounting for plugin filters, via the core block_editor_settings filter … … 421 472 * @see https://github.com/joppuyo/remove-drop-cap/blob/v1.1.0/remove-drop-cap.php#L22 422 473 */ 423 function mrw_block_editor_settings( $editor_settings, $context ) {424 425 $hidden_settings = mrw_hidden_block_editor_settings();474 function block_editor_settings( $editor_settings, $context ) { 475 476 $hidden_settings = hidden_block_editor_settings(); 426 477 427 478 /* Border */ … … 535 586 * @return array all hidden blocks, block styles, and block editor settings 536 587 */ 537 function mrw_block_editor_js_config() {588 function block_editor_js_config() { 538 589 539 590 $js_options = array(); … … 544 595 = Blocks = 545 596 ==============================*/ 546 $js_options['hiddenBlocks'] = array_values( mrw_hidden_blocks() ); 547 597 $js_options['hiddenBlocks'] = array_values( hidden_blocks() ); 548 598 549 599 /*======================================== 550 600 = Embed Variations = 551 601 ========================================*/ 552 $js_options['hiddenEmbeds'] = array_values( mrw_hidden_embeds() ); 602 $js_options['hiddenEmbeds'] = array_values( hidden_embeds() ); 603 604 /*======================================== 605 = Social Links = 606 ========================================*/ 607 $js_options['hiddenSocialLinks'] = array_values( hidden_social_links() ); 553 608 554 609 /*==================================== 555 610 = Block Styles = 556 611 ======================================*/ 557 $hidden_style_variations = array(); 558 foreach ( mrw_hidden_block_styles() as $block => $styles ) { 612 foreach ( hidden_block_styles() as $block => $styles ) { 559 613 $hidden_styles[$block] = array_values( $styles ); 560 614 } … … 565 619 = Features = 566 620 ================================*/ 567 $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() );621 $js_options['hiddenSettings'] = array_values( hidden_block_editor_settings() ); 568 622 569 623 return $js_options; … … 571 625 } 572 626 573 add_action( 'enqueue_block_editor_assets', 'mrw_block_editor_assets' );627 add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\block_editor_assets' ); 574 628 /** 575 629 * Enqueue CSS and JS files that modify/hide block editor settings in the admin 576 630 */ 577 function mrw_block_editor_assets() {631 function block_editor_assets() { 578 632 579 633 /** … … 605 659 plugins_url( 'css/block-editor.css', dirname(__FILE__) ), 606 660 array(), 607 '2.0.0'661 MRW_SIMPLIFIED_EDITOR_VERSION 608 662 ); 609 663 … … 612 666 plugins_url( 'js/block-editor.js', dirname(__FILE__) ), 613 667 $script_dependencies, 614 '2.0.0' 668 MRW_SIMPLIFIED_EDITOR_VERSION, 669 array( 'in_footer' => true ) 615 670 ); 616 671 … … 618 673 'mrw-block-editor-js', 619 674 'mrwEditorOptions', 620 mrw_block_editor_js_config()675 block_editor_js_config() 621 676 ); 622 677 … … 625 680 } 626 681 627 add_action( 'admin_body_class', 'mrw_block_editor_settings_admin_classes' ); 682 add_action( 'enqueue_block_assets', __NAMESPACE__ . '\block_styles' ); 683 function block_styles() { 684 if( is_admin() ) { 685 wp_enqueue_style( 686 'mrw-blocks-css', 687 plugins_url( 'css/blocks.css', dirname(__FILE__) ), 688 array(), 689 MRW_SIMPLIFIED_EDITOR_VERSION 690 ); 691 } 692 } 693 694 add_action( 'admin_body_class', __NAMESPACE__ . '\block_editor_settings_admin_classes' ); 628 695 /** 629 696 * Apply body classes to admin for each features that are hidden via CSS … … 632 699 * @return array 633 700 */ 634 function mrw_block_editor_settings_admin_classes( $classes ) {701 function block_editor_settings_admin_classes( $classes ) { 635 702 636 703 $current_screen = get_current_screen(); 637 704 638 705 if( isset( $current_screen->is_block_editor ) && (bool) $current_screen->is_block_editor ) { 639 640 $hidden_block_editor_settings = mrw_hidden_block_editor_settings();641 642 706 $prefix = ' mrw-block-editor-no-'; 707 $hidden_block_editor_settings = hidden_block_editor_settings(); 708 $hidden_blocks = hidden_blocks(); 709 643 710 foreach( $hidden_block_editor_settings as $setting ) { 644 711 $classes .= $prefix . sanitize_title_with_dashes( $setting ); 645 712 } 646 713 647 } 714 if( in_array( 'core/cover', $hidden_blocks ) ) { 715 $classes .= $prefix . 'cover-block'; 716 } 717 718 } 719 720 648 721 649 722 return $classes; -
mrw-web-design-simple-tinymce/tags/2.14.0/inc/classic-editor.php
r2628886 r3398351 1 1 <?php 2 add_filter( 'mce_buttons', 'mrw_mce_buttons_1', 0 ); 2 namespace MRW\SimplifiedEditor; 3 4 add_filter( 'mce_buttons', __NAMESPACE__ . '\mce_buttons_1', 0 ); 3 5 /** 4 6 * Remove formatting buttons that cause more trouble than they're worth. … … 11 13 * @see http://codex.wordpress.org/TinyMCE_Custom_Buttons 12 14 */ 13 function m rw_mce_buttons_1( $buttons ) {15 function mce_buttons_1( $buttons ) { 14 16 15 17 $buttons = array( … … 46 48 add_filter( 'mce_buttons_2', '__return_empty_array', 0 ); 47 49 48 add_filter( 'tiny_mce_before_init', 'mrw_mce_init', 0 );50 add_filter( 'tiny_mce_before_init', __NAMESPACE__ . '\mce_init', 0 ); 49 51 /** 50 52 * Customize the WordPress TinyMCE editor. … … 60 62 * @see http://wordpress.stackexchange.com/a/128950/9844 61 63 */ 62 function m rw_mce_init( $args ) {64 function mce_init( $args ) { 63 65 $style_formats = array( 64 66 array( … … 75 77 ), 76 78 array( 77 'title' => esc_attr_ _( '–– Heading 4', 'En dash used to imply heading hierarchy', 'mrw-web-design-simple-tinymce' ),79 'title' => esc_attr_x( '–– Heading 4', 'En dash used to imply heading hierarchy', 'mrw-web-design-simple-tinymce' ), 78 80 'format' => 'h4', 79 81 ), … … 132 134 } 133 135 134 $args['style_formats'] = json_encode( $style_formats );136 $args['style_formats'] = wp_json_encode( $style_formats ); 135 137 136 138 return $args; -
mrw-web-design-simple-tinymce/tags/2.14.0/js/block-editor.js
r3003951 r3398351 20 20 * Hide Embed Variations 21 21 */ 22 wp.blocks.getBlockVariations('core/embed').forEach(function (embed) { 22 mrwEditorOptions.hiddenEmbeds.forEach((embed) => { 23 wp.blocks.unregisterBlockVariation('core/embed', embed); 24 }); 23 25 24 if ( -1 < mrwEditorOptions.hiddenEmbeds.indexOf(embed.name) ) { 25 wp.blocks.unregisterBlockVariation('core/embed', embed.name ); 26 } 27 26 /* 27 * Hide Social Links 28 */ 29 mrwEditorOptions.hiddenSocialLinks.forEach((link) => { 30 wp.blocks.unregisterBlockVariation('core/social-link', link); 28 31 }); 29 32 … … 38 41 39 42 }); 43 44 /* Hide Fit Text Blocks */ 45 if( -1 < mrwEditorOptions.hiddenSettings.indexOf( 'fit-text-paragraph' ) ) { 46 wp.blocks.unregisterBlockVariation( 'core/paragraph', 'stretchy-paragraph' ); 47 } 48 if( -1 < mrwEditorOptions.hiddenSettings.indexOf( 'fit-text-heading' ) ) { 49 wp.blocks.unregisterBlockVariation( 'core/heading', 'stretchy-heading' ); 50 } 40 51 41 52 /* Remove Inline Footnote insert button in block toolbar if Footnote block is hidden */ -
mrw-web-design-simple-tinymce/tags/2.14.0/mrwweb-simple-tinymce.php
r3050062 r3398351 4 4 * Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/ 5 5 * Description: Streamlines the WordPress editor to focus users on consistent formatting and semantic content. 6 * Version: 2.1 3.06 * Version: 2.14.0 7 7 * Author: Mark Root-Wiley 8 8 * Author URI: https://MRWweb.com 9 9 * Text Domain: mrw-web-design-simple-tinymce 10 10 * License: GPLv2 or later 11 * GitHub Plugin URI: mrwweb/mrw-simplified-editor-wordpress 12 * Primary Branch: release 11 13 */ 14 15 DEFINE( 'MRW_SIMPLIFIED_EDITOR_VERSION', '2.14.0' ); 12 16 13 17 include_once( 'inc/classic-editor.php' ); -
mrw-web-design-simple-tinymce/tags/2.14.0/readme.txt
r3050062 r3398351 2 2 Contributors: mrwweb 3 3 Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor 4 Requires at least: 6. 04 Requires at least: 6.5 5 5 Requires PHP: 5.6.20 6 Tested up to: 6. 57 Stable tag: 2.1 3.06 Tested up to: 6.9 7 Stable tag: 2.14.0 8 8 Donate link: https://www.paypal.me/rootwiley 9 License: GPLv 3or later9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 … … 78 78 79 79 == Changelog == 80 = 2.14.0 (November 18, 2025) 81 82 - New minimum supported version: WordPress 6.5 83 - [WordPress 6.9] Hide new blocks: Accordion, Math, Term Query, Time to Read, Word Count. Use `mrw_hidden_blocks` to show. 84 - [WordPress 6.9] Hide "Fit Text" block variations in WordPres 6.9: Use `mrw_hidden_block_editor_settings` filter to show. 85 - Hide lesser-used social links like 500px, Amazon, last.fm, Pocket (RIP), etc. Use `mrw_hidden_social_links` to show hidden links or hide additional ones. 86 - Hide Template Part embeds in the post editor context since they literally can't be embedded. Hopefully this gets [solved in WordPress](https://github.com/WordPress/gutenberg/issues/67797) eventually. 87 - Update hidden buttons in image placeholders to show "Use Featured Image" option for Media & Text block and display Media Library in the primary button style. 88 - Hide Goodreads and Nextdoor blocks in Jetpack 89 - Resolve warning about correctly loading block styles in editor to prepare for iframed editor in WP 7.0. 90 - Dev: Resolve Plugin Check warnings. 91 - Dev: Introduce namespaces to reduce risk of naming collisions. 92 - Dev: Improve how block variations are unregistered. 93 - Dev: Update deprecated properties in `blueprint.json` 94 - Dev: Miscellaneous code cleanup 95 - Fix incorrect license listed in `readme.txt` to match link and plugin header (GPL2 and above) 96 80 97 = 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) = 81 98 - [New] Hide new default box-shadows design feature. Should not interfere with theme-defined shadows. Enable default shadows via `mrw_hidden_block_editor_settings` filter. … … 112 129 113 130 == Upgrade Notice == 114 = 2.1 2.1=115 * v2.12.0 - WP 6.4 Compatibility + hide various inline formats and placeholder options131 = 2.14.0 = 132 * WordPress 6.9 compatiblity: Hide new blocks. Hide less-used social links. -
mrw-web-design-simple-tinymce/trunk/changelog.txt
r3050062 r3398351 1 = 2.14.0 (November 18, 2025) 2 3 - New minimum supported version: WordPress 6.5 4 - [WordPress 6.9] Hide new blocks: Accordion, Math, Term Query, Time to Read, Word Count. Use `mrw_hidden_blocks` to show. 5 - [WordPress 6.9] Hide "Fit Text" block variations in WordPres 6.9: Use `mrw_hidden_block_editor_settings` filter to show. 6 - Hide lesser-used social links like 500px, Amazon, last.fm, Pocket (RIP), etc. Use `mrw_hidden_social_links` to show hidden links or hide additional ones. 7 - Hide Template Part embeds in the post editor context since they literally can't be embedded. Hopefully this gets [solved in WordPress](https://github.com/WordPress/gutenberg/issues/67797) eventually. 8 - Update hidden buttons in image placeholders to show "Use Featured Image" option for Media & Text block and display Media Library in the primary button style. 9 - Hide Goodreads and Nextdoor blocks in Jetpack 10 - Resolve warning about correctly loading block styles in editor to prepare for iframed editor in WP 7.0. 11 - Dev: Resolve Plugin Check warnings. 12 - Dev: Introduce namespaces to reduce risk of naming collisions. 13 - Dev: Improve how block variations are unregistered. 14 - Dev: Update deprecated properties in `blueprint.json` 15 - Dev: Miscellaneous code cleanup 16 - Fix incorrect license listed in `readme.txt` to match link and plugin header (GPL2 and above) 17 1 18 = 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) = 2 19 - [New] Hide new default box-shadows design feature. Should not interfere with theme-defined shadows. Enable default shadows via `mrw_hidden_block_editor_settings` filter. -
mrw-web-design-simple-tinymce/trunk/css/block-editor.css
r3050062 r3398351 26 26 27 27 /* 28 Hide the "Text over image" toolbar button when the Cover block is not in the inserter 29 Only works for English sites :'( 30 */ 31 .mrw-block-editor-no-cover-block .block-editor-block-toolbar .components-button[aria-label="Add text over image"] { 32 display: none; 33 } 34 35 /* 28 36 Hide Heading Levels 1, 5, and 6 29 37 Filter values: heading-1, heading-5, heading-6 30 38 */ 31 .mrw-block-editor-no-heading-1 .components-button[aria-label="Heading 1"],32 .mrw-block-editor-no-heading-5 .components-button[aria-label="Heading 5"],33 .mrw-block-editor-no-heading-6 .components-button[aria-label="Heading 6"],34 /* WP6.5+ */35 39 .mrw-block-editor-no-heading-1 .block-library-heading-level-dropdown .components-button:nth-child(1), 36 40 .mrw-block-editor-no-heading-5 .block-library-heading-level-dropdown .components-button:nth-child(5), 37 41 .mrw-block-editor-no-heading-6 .block-library-heading-level-dropdown .components-button:nth-child(6) { 38 display: none;39 }40 41 /*42 Image Pixel & Percentage Sizing43 Filter Value: image-dimensions44 45 Not working in WordPress 6.3+46 */47 .mrw-block-editor-no-image-dimensions .block-library-image__dimensions,48 .mrw-block-editor-no-image-dimensions .block-editor-image-size-control {49 42 display: none; 50 43 } … … 72 65 display: none; 73 66 } 74 75 /*===================================================76 = Always use Media Library in Flows =77 ===================================================*/78 /*79 Hide color options in cover placeholder80 Current not configurable due to iFramed block editor81 */82 .wp-block-cover__placeholder-background-options {83 display: none;84 }85 86 87 /* always style the Media Library item as a primary button */88 .block-editor-media-placeholder .components-button.is-tertiary {89 background: var(--wp-admin-theme-color);90 color: #fff;91 padding: 6px 12px;92 }93 94 .block-editor-media-placeholder .components-button.is-tertiary:hover:not(:disabled) {95 background: var(--wp-admin-theme-color-darker-10);96 color: #fff;97 }98 99 /* handle gallery exception */100 .mrw-block-editor-no-image-url .wp-block-gallery .components-form-file-upload,101 .mrw-block-editor-no-image-upload .wp-block-gallery .components-form-file-upload {102 display: block;103 }104 105 /* Never show "upload" and "from URL" options in WordPress 6.3+ when editor is in iframe */106 .block-editor-media-placeholder__upload-button,107 .block-editor-media-placeholder__url-input-container,108 .block-editor-media-replace-flow__media-upload-menu .components-form-file-upload {109 display: none;110 }111 112 67 113 68 /*=========================================== … … 153 108 = Color Contrast Warning = 154 109 ==============================================*/ 155 /* WP 6.0 */156 110 .color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper { 157 111 display: flex; -
mrw-web-design-simple-tinymce/trunk/inc/block-editor.php
r3050062 r3398351 1 1 <?php 2 add_action( 'after_setup_theme', 'mrw_block_editor_theme_support', 11 );2 add_action( 'after_setup_theme', __NAMESPACE__ . '\block_editor_theme_support', 11 ); 3 3 /** 4 4 * Make modifications to editor that can be made using default add_theme_support() calls 5 5 */ 6 function mrw_block_editor_theme_support() {6 function block_editor_theme_support() { 7 7 8 8 /* … … 97 97 } 98 98 99 add_action( 'plugins_loaded', 'mrw_hide_block_directory' );99 add_action( 'plugins_loaded', __NAMESPACE__ . '\hide_block_directory' ); 100 100 /** 101 101 * Hide the block directory … … 103 103 * @see https://github.com/WordPress/gutenberg/issues/23961#issuecomment-666683997 104 104 */ 105 function mrw_hide_block_directory() {106 107 if( in_array( 'block-directory', mrw_hidden_block_editor_settings() ) ) {105 function hide_block_directory() { 106 107 if( in_array( 'block-directory', hidden_block_editor_settings() ) ) { 108 108 remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); 109 109 remove_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' ); … … 119 119 * @return array slugs of all hidden core blocks 120 120 */ 121 function mrw_hidden_blocks() {121 function hidden_blocks() { 122 122 123 123 $current_screen = get_current_screen(); … … 132 132 */ 133 133 $hidden_core_blocks = apply_filters( 'mrw_hidden_core_blocks', array( 134 'core/accordion', 134 135 'core/audio', 135 136 'core/code', … … 137 138 'core/footnotes', 138 139 'core/freeform', 140 'core/latest-posts', 141 'core/math', 139 142 'core/nextpage', 140 143 'core/preformatted', … … 177 180 'core/query-title', 178 181 'core/post-title', 182 'core/post-comments-count', 183 'core/post-comments-link', 179 184 'core/post-content', 180 185 'core/post-date', … … 185 190 'core/post-author-biography', 186 191 'core/read-more', 192 'core/term-count', 193 'core/term-name', 187 194 'core/term-description', 195 'core/terms-query', 196 'core/post-time-to-read', 188 197 ), $context ); 189 198 … … 208 217 'core/post-comments-form', 209 218 'core/post-navigation-link', 219 'core/template-part', 210 220 ), $context ); 211 221 … … 235 245 } 236 246 237 add_filter( 'mrw_hidden_site_blocks', 'mrw_show_blocks_in_site_editor', 0, 2 );238 add_filter( 'mrw_hidden_query_blocks', 'mrw_show_blocks_in_site_editor', 0, 2 );247 add_filter( 'mrw_hidden_site_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 ); 248 add_filter( 'mrw_hidden_query_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 ); 239 249 /** 240 250 * Show all Query- and Post-related blocks in the Site Editor 241 251 */ 242 function mrw_show_blocks_in_site_editor( $blocks, $context ) {252 function show_blocks_in_site_editor( $blocks, $context ) { 243 253 if( $context === 'site-editor' ) { 244 254 $blocks = array(); … … 251 261 * Return list of hidden embeds 252 262 */ 253 function mrw_hidden_embeds() {263 function hidden_embeds() { 254 264 255 265 $hidden_embeds = array( … … 282 292 } 283 293 284 add_action( 'jetpack_register_gutenberg_extensions', 'mrw_jetpack_hidden_blocks', 99 ); 294 /** 295 * Return list of hidden social links 296 */ 297 function hidden_social_links() { 298 299 $hidden_social_links = array( 300 'amazon', 301 'bandcamp', 302 'behance', 303 'behance', 304 'codepen', 305 'deviantart', 306 'discord', 307 'dribbble', 308 'dropbox', 309 'etsy', 310 'fivehundredpx', 311 'foursquare', 312 'goodreads', 313 'gravatar', 314 'lastfm', 315 'medium', 316 'meetup', 317 'pocket', 318 'twitch', 319 'vk', 320 'yelp', 321 ); 322 323 /** 324 * mrw_hidden_social_links filter 325 * @since 2.14.0 326 */ 327 return apply_filters( 'mrw_hidden_social_links', $hidden_social_links ); 328 329 } 330 331 add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\jetpack_hidden_blocks', 99 ); 285 332 /** 286 333 * Hidden Jetpack Blocks … … 288 335 * @see https://developer.jetpack.com/hooks/jetpack_register_gutenberg_extensions/ 289 336 */ 290 function mrw_jetpack_hidden_blocks() {337 function jetpack_hidden_blocks() { 291 338 292 339 if ( ! class_exists( 'Jetpack_Gutenberg' ) ) { … … 303 350 'eventbrite', 304 351 'gif', 352 'goodreads', 305 353 'markdown', 354 'nextdoor', 306 355 'opentable', 307 356 'payments-intro', … … 339 388 * @return array keyed array where keys are a block slug and value is an array containing all block style to remove 340 389 */ 341 function mrw_hidden_block_styles() {390 function hidden_block_styles() { 342 391 343 392 $hidden_styles = array( … … 364 413 * @return array every option to hide via CSS or JS 365 414 */ 366 function mrw_hidden_block_editor_settings() {415 function hidden_block_editor_settings() { 367 416 368 417 $hidden_block_editor_settings = array( … … 375 424 'drop-cap', 376 425 'duotone', 426 'fit-text-heading', 427 'fit-text-paragraph', 377 428 'font-weight', 378 429 'font-style', … … 412 463 } 413 464 414 add_filter( 'block_editor_settings_all', 'mrw_block_editor_settings', 99, 2 );465 add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\block_editor_settings', 99, 2 ); 415 466 /** 416 467 * Make changes to editor settings, accounting for plugin filters, via the core block_editor_settings filter … … 421 472 * @see https://github.com/joppuyo/remove-drop-cap/blob/v1.1.0/remove-drop-cap.php#L22 422 473 */ 423 function mrw_block_editor_settings( $editor_settings, $context ) {424 425 $hidden_settings = mrw_hidden_block_editor_settings();474 function block_editor_settings( $editor_settings, $context ) { 475 476 $hidden_settings = hidden_block_editor_settings(); 426 477 427 478 /* Border */ … … 535 586 * @return array all hidden blocks, block styles, and block editor settings 536 587 */ 537 function mrw_block_editor_js_config() {588 function block_editor_js_config() { 538 589 539 590 $js_options = array(); … … 544 595 = Blocks = 545 596 ==============================*/ 546 $js_options['hiddenBlocks'] = array_values( mrw_hidden_blocks() ); 547 597 $js_options['hiddenBlocks'] = array_values( hidden_blocks() ); 548 598 549 599 /*======================================== 550 600 = Embed Variations = 551 601 ========================================*/ 552 $js_options['hiddenEmbeds'] = array_values( mrw_hidden_embeds() ); 602 $js_options['hiddenEmbeds'] = array_values( hidden_embeds() ); 603 604 /*======================================== 605 = Social Links = 606 ========================================*/ 607 $js_options['hiddenSocialLinks'] = array_values( hidden_social_links() ); 553 608 554 609 /*==================================== 555 610 = Block Styles = 556 611 ======================================*/ 557 $hidden_style_variations = array(); 558 foreach ( mrw_hidden_block_styles() as $block => $styles ) { 612 foreach ( hidden_block_styles() as $block => $styles ) { 559 613 $hidden_styles[$block] = array_values( $styles ); 560 614 } … … 565 619 = Features = 566 620 ================================*/ 567 $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() );621 $js_options['hiddenSettings'] = array_values( hidden_block_editor_settings() ); 568 622 569 623 return $js_options; … … 571 625 } 572 626 573 add_action( 'enqueue_block_editor_assets', 'mrw_block_editor_assets' );627 add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\block_editor_assets' ); 574 628 /** 575 629 * Enqueue CSS and JS files that modify/hide block editor settings in the admin 576 630 */ 577 function mrw_block_editor_assets() {631 function block_editor_assets() { 578 632 579 633 /** … … 605 659 plugins_url( 'css/block-editor.css', dirname(__FILE__) ), 606 660 array(), 607 '2.0.0'661 MRW_SIMPLIFIED_EDITOR_VERSION 608 662 ); 609 663 … … 612 666 plugins_url( 'js/block-editor.js', dirname(__FILE__) ), 613 667 $script_dependencies, 614 '2.0.0' 668 MRW_SIMPLIFIED_EDITOR_VERSION, 669 array( 'in_footer' => true ) 615 670 ); 616 671 … … 618 673 'mrw-block-editor-js', 619 674 'mrwEditorOptions', 620 mrw_block_editor_js_config()675 block_editor_js_config() 621 676 ); 622 677 … … 625 680 } 626 681 627 add_action( 'admin_body_class', 'mrw_block_editor_settings_admin_classes' ); 682 add_action( 'enqueue_block_assets', __NAMESPACE__ . '\block_styles' ); 683 function block_styles() { 684 if( is_admin() ) { 685 wp_enqueue_style( 686 'mrw-blocks-css', 687 plugins_url( 'css/blocks.css', dirname(__FILE__) ), 688 array(), 689 MRW_SIMPLIFIED_EDITOR_VERSION 690 ); 691 } 692 } 693 694 add_action( 'admin_body_class', __NAMESPACE__ . '\block_editor_settings_admin_classes' ); 628 695 /** 629 696 * Apply body classes to admin for each features that are hidden via CSS … … 632 699 * @return array 633 700 */ 634 function mrw_block_editor_settings_admin_classes( $classes ) {701 function block_editor_settings_admin_classes( $classes ) { 635 702 636 703 $current_screen = get_current_screen(); 637 704 638 705 if( isset( $current_screen->is_block_editor ) && (bool) $current_screen->is_block_editor ) { 639 640 $hidden_block_editor_settings = mrw_hidden_block_editor_settings();641 642 706 $prefix = ' mrw-block-editor-no-'; 707 $hidden_block_editor_settings = hidden_block_editor_settings(); 708 $hidden_blocks = hidden_blocks(); 709 643 710 foreach( $hidden_block_editor_settings as $setting ) { 644 711 $classes .= $prefix . sanitize_title_with_dashes( $setting ); 645 712 } 646 713 647 } 714 if( in_array( 'core/cover', $hidden_blocks ) ) { 715 $classes .= $prefix . 'cover-block'; 716 } 717 718 } 719 720 648 721 649 722 return $classes; -
mrw-web-design-simple-tinymce/trunk/inc/classic-editor.php
r2628886 r3398351 1 1 <?php 2 add_filter( 'mce_buttons', 'mrw_mce_buttons_1', 0 ); 2 namespace MRW\SimplifiedEditor; 3 4 add_filter( 'mce_buttons', __NAMESPACE__ . '\mce_buttons_1', 0 ); 3 5 /** 4 6 * Remove formatting buttons that cause more trouble than they're worth. … … 11 13 * @see http://codex.wordpress.org/TinyMCE_Custom_Buttons 12 14 */ 13 function m rw_mce_buttons_1( $buttons ) {15 function mce_buttons_1( $buttons ) { 14 16 15 17 $buttons = array( … … 46 48 add_filter( 'mce_buttons_2', '__return_empty_array', 0 ); 47 49 48 add_filter( 'tiny_mce_before_init', 'mrw_mce_init', 0 );50 add_filter( 'tiny_mce_before_init', __NAMESPACE__ . '\mce_init', 0 ); 49 51 /** 50 52 * Customize the WordPress TinyMCE editor. … … 60 62 * @see http://wordpress.stackexchange.com/a/128950/9844 61 63 */ 62 function m rw_mce_init( $args ) {64 function mce_init( $args ) { 63 65 $style_formats = array( 64 66 array( … … 75 77 ), 76 78 array( 77 'title' => esc_attr_ _( '–– Heading 4', 'En dash used to imply heading hierarchy', 'mrw-web-design-simple-tinymce' ),79 'title' => esc_attr_x( '–– Heading 4', 'En dash used to imply heading hierarchy', 'mrw-web-design-simple-tinymce' ), 78 80 'format' => 'h4', 79 81 ), … … 132 134 } 133 135 134 $args['style_formats'] = json_encode( $style_formats );136 $args['style_formats'] = wp_json_encode( $style_formats ); 135 137 136 138 return $args; -
mrw-web-design-simple-tinymce/trunk/js/block-editor.js
r3003951 r3398351 20 20 * Hide Embed Variations 21 21 */ 22 wp.blocks.getBlockVariations('core/embed').forEach(function (embed) { 22 mrwEditorOptions.hiddenEmbeds.forEach((embed) => { 23 wp.blocks.unregisterBlockVariation('core/embed', embed); 24 }); 23 25 24 if ( -1 < mrwEditorOptions.hiddenEmbeds.indexOf(embed.name) ) { 25 wp.blocks.unregisterBlockVariation('core/embed', embed.name ); 26 } 27 26 /* 27 * Hide Social Links 28 */ 29 mrwEditorOptions.hiddenSocialLinks.forEach((link) => { 30 wp.blocks.unregisterBlockVariation('core/social-link', link); 28 31 }); 29 32 … … 38 41 39 42 }); 43 44 /* Hide Fit Text Blocks */ 45 if( -1 < mrwEditorOptions.hiddenSettings.indexOf( 'fit-text-paragraph' ) ) { 46 wp.blocks.unregisterBlockVariation( 'core/paragraph', 'stretchy-paragraph' ); 47 } 48 if( -1 < mrwEditorOptions.hiddenSettings.indexOf( 'fit-text-heading' ) ) { 49 wp.blocks.unregisterBlockVariation( 'core/heading', 'stretchy-heading' ); 50 } 40 51 41 52 /* Remove Inline Footnote insert button in block toolbar if Footnote block is hidden */ -
mrw-web-design-simple-tinymce/trunk/mrwweb-simple-tinymce.php
r3050062 r3398351 4 4 * Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/ 5 5 * Description: Streamlines the WordPress editor to focus users on consistent formatting and semantic content. 6 * Version: 2.1 3.06 * Version: 2.14.0 7 7 * Author: Mark Root-Wiley 8 8 * Author URI: https://MRWweb.com 9 9 * Text Domain: mrw-web-design-simple-tinymce 10 10 * License: GPLv2 or later 11 * GitHub Plugin URI: mrwweb/mrw-simplified-editor-wordpress 12 * Primary Branch: release 11 13 */ 14 15 DEFINE( 'MRW_SIMPLIFIED_EDITOR_VERSION', '2.14.0' ); 12 16 13 17 include_once( 'inc/classic-editor.php' ); -
mrw-web-design-simple-tinymce/trunk/readme.txt
r3050062 r3398351 2 2 Contributors: mrwweb 3 3 Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor 4 Requires at least: 6. 04 Requires at least: 6.5 5 5 Requires PHP: 5.6.20 6 Tested up to: 6. 57 Stable tag: 2.1 3.06 Tested up to: 6.9 7 Stable tag: 2.14.0 8 8 Donate link: https://www.paypal.me/rootwiley 9 License: GPLv 3or later9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 … … 78 78 79 79 == Changelog == 80 = 2.14.0 (November 18, 2025) 81 82 - New minimum supported version: WordPress 6.5 83 - [WordPress 6.9] Hide new blocks: Accordion, Math, Term Query, Time to Read, Word Count. Use `mrw_hidden_blocks` to show. 84 - [WordPress 6.9] Hide "Fit Text" block variations in WordPres 6.9: Use `mrw_hidden_block_editor_settings` filter to show. 85 - Hide lesser-used social links like 500px, Amazon, last.fm, Pocket (RIP), etc. Use `mrw_hidden_social_links` to show hidden links or hide additional ones. 86 - Hide Template Part embeds in the post editor context since they literally can't be embedded. Hopefully this gets [solved in WordPress](https://github.com/WordPress/gutenberg/issues/67797) eventually. 87 - Update hidden buttons in image placeholders to show "Use Featured Image" option for Media & Text block and display Media Library in the primary button style. 88 - Hide Goodreads and Nextdoor blocks in Jetpack 89 - Resolve warning about correctly loading block styles in editor to prepare for iframed editor in WP 7.0. 90 - Dev: Resolve Plugin Check warnings. 91 - Dev: Introduce namespaces to reduce risk of naming collisions. 92 - Dev: Improve how block variations are unregistered. 93 - Dev: Update deprecated properties in `blueprint.json` 94 - Dev: Miscellaneous code cleanup 95 - Fix incorrect license listed in `readme.txt` to match link and plugin header (GPL2 and above) 96 80 97 = 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) = 81 98 - [New] Hide new default box-shadows design feature. Should not interfere with theme-defined shadows. Enable default shadows via `mrw_hidden_block_editor_settings` filter. … … 112 129 113 130 == Upgrade Notice == 114 = 2.1 2.1=115 * v2.12.0 - WP 6.4 Compatibility + hide various inline formats and placeholder options131 = 2.14.0 = 132 * WordPress 6.9 compatiblity: Hide new blocks. Hide less-used social links.
Note: See TracChangeset
for help on using the changeset viewer.