Plugin Directory

Changeset 3398351


Ignore:
Timestamp:
11/18/2025 07:49:39 PM (5 months ago)
Author:
mrwweb
Message:

Update to version 2.14.0 from GitHub

Location:
mrw-web-design-simple-tinymce
Files:
2 added
15 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mrw-web-design-simple-tinymce/assets/blueprints/blueprint.json

    r3050062 r3398351  
    55        {
    66            "step": "login",
    7             "username": "admin",
    8             "password": "password"
     7            "username": "admin"
    98        },
    109        {
    1110            "step": "installPlugin",
    12             "pluginZipFile": {
     11            "pluginData": {
    1312                "resource": "wordpress.org\/plugins",
    1413                "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
    118= 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) =
    219- [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  
    2626
    2727/*
     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/*
    2836 Hide Heading Levels 1, 5, and 6
    2937 Filter values: heading-1, heading-5, heading-6
    3038 */
    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+ */
    3539.mrw-block-editor-no-heading-1 .block-library-heading-level-dropdown .components-button:nth-child(1),
    3640.mrw-block-editor-no-heading-5 .block-library-heading-level-dropdown .components-button:nth-child(5),
    3741.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 Sizing
    43  Filter Value: image-dimensions
    44 
    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 {
    4942    display: none;
    5043}
     
    7265    display: none;
    7366}
    74 
    75 /*===================================================
    76 =         Always use Media Library in Flows         =
    77 ===================================================*/
    78 /*
    79  Hide color options in cover placeholder
    80  Current not configurable due to iFramed block editor
    81 */
    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 
    11267
    11368/*===========================================
     
    153108=            Color Contrast Warning            =
    154109==============================================*/
    155 /* WP 6.0 */
    156110.color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper {
    157111    display: flex;
  • mrw-web-design-simple-tinymce/tags/2.14.0/inc/block-editor.php

    r3050062 r3398351  
    11<?php
    2 add_action( 'after_setup_theme', 'mrw_block_editor_theme_support', 11 );
     2add_action( 'after_setup_theme', __NAMESPACE__ . '\block_editor_theme_support', 11 );
    33/**
    44 * Make modifications to editor that can be made using default add_theme_support() calls
    55 */
    6 function mrw_block_editor_theme_support() {
     6function block_editor_theme_support() {
    77
    88    /*
     
    9797}
    9898
    99 add_action( 'plugins_loaded', 'mrw_hide_block_directory' );
     99add_action( 'plugins_loaded', __NAMESPACE__ . '\hide_block_directory' );
    100100/**
    101101 * Hide the block directory
     
    103103 * @see https://github.com/WordPress/gutenberg/issues/23961#issuecomment-666683997
    104104 */
    105 function mrw_hide_block_directory() {
    106 
    107     if( in_array( 'block-directory', mrw_hidden_block_editor_settings() ) ) {
     105function hide_block_directory() {
     106
     107    if( in_array( 'block-directory', hidden_block_editor_settings() ) ) {
    108108        remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
    109109        remove_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' );
     
    119119 * @return array slugs of all hidden core blocks
    120120 */
    121 function mrw_hidden_blocks() {
     121function hidden_blocks() {
    122122
    123123    $current_screen = get_current_screen();
     
    132132     */
    133133    $hidden_core_blocks = apply_filters( 'mrw_hidden_core_blocks', array(
     134        'core/accordion',
    134135        'core/audio',
    135136        'core/code',
     
    137138        'core/footnotes',
    138139        'core/freeform',
     140        'core/latest-posts',
     141        'core/math',
    139142        'core/nextpage',
    140143        'core/preformatted',
     
    177180        'core/query-title',
    178181        'core/post-title',
     182        'core/post-comments-count',
     183        'core/post-comments-link',
    179184        'core/post-content',
    180185        'core/post-date',
     
    185190        'core/post-author-biography',
    186191        'core/read-more',
     192        'core/term-count',
     193        'core/term-name',
    187194        'core/term-description',
     195        'core/terms-query',
     196        'core/post-time-to-read',
    188197    ), $context );
    189198
     
    208217        'core/post-comments-form',
    209218        'core/post-navigation-link',
     219        'core/template-part',
    210220    ), $context );
    211221
     
    235245}
    236246
    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 );
     247add_filter( 'mrw_hidden_site_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 );
     248add_filter( 'mrw_hidden_query_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 );
    239249/**
    240250 * Show all Query- and Post-related blocks in the Site Editor
    241251 */
    242 function mrw_show_blocks_in_site_editor( $blocks, $context ) {
     252function show_blocks_in_site_editor( $blocks, $context ) {
    243253    if( $context === 'site-editor' ) {
    244254        $blocks = array();
     
    251261 * Return list of hidden embeds
    252262 */
    253 function mrw_hidden_embeds() {
     263function hidden_embeds() {
    254264
    255265    $hidden_embeds = array(
     
    282292}
    283293
    284 add_action( 'jetpack_register_gutenberg_extensions', 'mrw_jetpack_hidden_blocks', 99 );
     294/**
     295 * Return list of hidden social links
     296 */
     297function 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
     331add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\jetpack_hidden_blocks', 99 );
    285332/**
    286333 * Hidden Jetpack Blocks
     
    288335 * @see  https://developer.jetpack.com/hooks/jetpack_register_gutenberg_extensions/
    289336 */
    290 function mrw_jetpack_hidden_blocks() {
     337function jetpack_hidden_blocks() {
    291338
    292339    if ( ! class_exists( 'Jetpack_Gutenberg' ) ) {
     
    303350        'eventbrite',
    304351        'gif',
     352        'goodreads',
    305353        'markdown',
     354        'nextdoor',
    306355        'opentable',
    307356        'payments-intro',
     
    339388 * @return array keyed array where keys are a block slug and value is an array containing all block style to remove
    340389 */
    341 function mrw_hidden_block_styles() {
     390function hidden_block_styles() {
    342391
    343392    $hidden_styles = array(
     
    364413 * @return array every option to hide via CSS or JS
    365414 */
    366 function mrw_hidden_block_editor_settings() {
     415function hidden_block_editor_settings() {
    367416
    368417    $hidden_block_editor_settings = array(
     
    375424        'drop-cap',
    376425        'duotone',
     426        'fit-text-heading',
     427        'fit-text-paragraph',
    377428        'font-weight',
    378429        'font-style',
     
    412463}
    413464
    414 add_filter( 'block_editor_settings_all', 'mrw_block_editor_settings', 99, 2 );
     465add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\block_editor_settings', 99, 2 );
    415466/**
    416467 * Make changes to editor settings, accounting for plugin filters, via the core block_editor_settings filter
     
    421472 * @see https://github.com/joppuyo/remove-drop-cap/blob/v1.1.0/remove-drop-cap.php#L22
    422473 */
    423 function mrw_block_editor_settings( $editor_settings, $context ) {
    424 
    425     $hidden_settings = mrw_hidden_block_editor_settings();
     474function block_editor_settings( $editor_settings, $context ) {
     475
     476    $hidden_settings = hidden_block_editor_settings();
    426477
    427478    /* Border */
     
    535586 * @return array all hidden blocks, block styles, and block editor settings
    536587 */
    537 function mrw_block_editor_js_config() {
     588function block_editor_js_config() {
    538589
    539590    $js_options = array();
     
    544595    =            Blocks            =
    545596    ==============================*/
    546     $js_options['hiddenBlocks'] = array_values( mrw_hidden_blocks() );
    547 
     597    $js_options['hiddenBlocks'] = array_values( hidden_blocks() );
    548598
    549599    /*========================================
    550600    =            Embed Variations            =
    551601    ========================================*/
    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() );
    553608
    554609    /*====================================
    555610    =            Block Styles            =
    556611    ======================================*/
    557     $hidden_style_variations = array();
    558     foreach ( mrw_hidden_block_styles() as $block => $styles ) {
     612    foreach ( hidden_block_styles() as $block => $styles ) {
    559613        $hidden_styles[$block] = array_values( $styles );
    560614    }
     
    565619    =            Features            =
    566620    ================================*/
    567     $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() );
     621    $js_options['hiddenSettings'] = array_values( hidden_block_editor_settings() );
    568622
    569623    return $js_options;
     
    571625}
    572626
    573 add_action( 'enqueue_block_editor_assets', 'mrw_block_editor_assets' );
     627add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\block_editor_assets' );
    574628/**
    575629 * Enqueue CSS and JS files that modify/hide block editor settings in the admin
    576630 */
    577 function mrw_block_editor_assets() {
     631function block_editor_assets() {
    578632
    579633    /**
     
    605659        plugins_url( 'css/block-editor.css', dirname(__FILE__) ),
    606660        array(),
    607         '2.0.0'
     661        MRW_SIMPLIFIED_EDITOR_VERSION
    608662    );
    609663
     
    612666        plugins_url( 'js/block-editor.js', dirname(__FILE__) ),
    613667        $script_dependencies,
    614         '2.0.0'
     668        MRW_SIMPLIFIED_EDITOR_VERSION,
     669        array( 'in_footer' => true )
    615670    );
    616671
     
    618673        'mrw-block-editor-js',
    619674        'mrwEditorOptions',
    620         mrw_block_editor_js_config()
     675        block_editor_js_config()
    621676    );
    622677
     
    625680}
    626681
    627 add_action( 'admin_body_class', 'mrw_block_editor_settings_admin_classes' );
     682add_action( 'enqueue_block_assets', __NAMESPACE__ . '\block_styles' );
     683function 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
     694add_action( 'admin_body_class', __NAMESPACE__ . '\block_editor_settings_admin_classes' );
    628695/**
    629696 * Apply body classes to admin for each features that are hidden via CSS
     
    632699 * @return array
    633700 */
    634 function mrw_block_editor_settings_admin_classes( $classes ) {
     701function block_editor_settings_admin_classes( $classes ) {
    635702
    636703    $current_screen = get_current_screen();
    637704
    638705    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 
    642706        $prefix = ' mrw-block-editor-no-';
     707        $hidden_block_editor_settings = hidden_block_editor_settings();
     708        $hidden_blocks = hidden_blocks();
     709       
    643710        foreach( $hidden_block_editor_settings as $setting ) {
    644711            $classes .= $prefix . sanitize_title_with_dashes( $setting );
    645712        }
    646713
    647     }
     714        if( in_array( 'core/cover', $hidden_blocks ) ) {
     715            $classes .= $prefix . 'cover-block';
     716        }
     717
     718    }
     719
     720
    648721
    649722    return $classes;
  • mrw-web-design-simple-tinymce/tags/2.14.0/inc/classic-editor.php

    r2628886 r3398351  
    11<?php
    2 add_filter( 'mce_buttons', 'mrw_mce_buttons_1', 0 );
     2namespace MRW\SimplifiedEditor;
     3
     4add_filter( 'mce_buttons', __NAMESPACE__ . '\mce_buttons_1', 0 );
    35/**
    46 * Remove formatting buttons that cause more trouble than they're worth.
     
    1113 * @see    http://codex.wordpress.org/TinyMCE_Custom_Buttons
    1214 */
    13 function mrw_mce_buttons_1( $buttons ) {
     15function mce_buttons_1( $buttons ) {
    1416
    1517    $buttons = array(
     
    4648add_filter( 'mce_buttons_2', '__return_empty_array', 0 );
    4749
    48 add_filter( 'tiny_mce_before_init', 'mrw_mce_init', 0 );
     50add_filter( 'tiny_mce_before_init', __NAMESPACE__ . '\mce_init', 0 );
    4951/**
    5052 * Customize the WordPress TinyMCE editor.
     
    6062 * @see    http://wordpress.stackexchange.com/a/128950/9844
    6163 */
    62 function mrw_mce_init( $args ) {
     64function mce_init( $args ) {
    6365    $style_formats = array(
    6466        array(
     
    7577        ),
    7678        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' ),
    7880            'format' => 'h4',
    7981        ),
     
    132134    }
    133135
    134     $args['style_formats'] = json_encode( $style_formats );
     136    $args['style_formats'] = wp_json_encode( $style_formats );
    135137
    136138    return $args;
  • mrw-web-design-simple-tinymce/tags/2.14.0/js/block-editor.js

    r3003951 r3398351  
    2020     * Hide Embed Variations
    2121     */
    22     wp.blocks.getBlockVariations('core/embed').forEach(function (embed) {
     22    mrwEditorOptions.hiddenEmbeds.forEach((embed) => {
     23        wp.blocks.unregisterBlockVariation('core/embed', embed);
     24    });
    2325
    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);
    2831    });
    2932
     
    3841
    3942    });
     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    }
    4051
    4152    /* 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  
    44* Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/
    55* Description: Streamlines the WordPress editor to focus users on consistent formatting and semantic content.
    6 * Version: 2.13.0
     6* Version: 2.14.0
    77* Author: Mark Root-Wiley
    88* Author URI: https://MRWweb.com
    99* Text Domain: mrw-web-design-simple-tinymce
    1010* License: GPLv2 or later
     11* GitHub Plugin URI: mrwweb/mrw-simplified-editor-wordpress
     12* Primary Branch: release
    1113*/
     14
     15DEFINE( 'MRW_SIMPLIFIED_EDITOR_VERSION', '2.14.0' );
    1216
    1317include_once( 'inc/classic-editor.php' );
  • mrw-web-design-simple-tinymce/tags/2.14.0/readme.txt

    r3050062 r3398351  
    22Contributors: mrwweb
    33Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor
    4 Requires at least: 6.0
     4Requires at least: 6.5
    55Requires PHP: 5.6.20
    6 Tested up to: 6.5
    7 Stable tag: 2.13.0
     6Tested up to: 6.9
     7Stable tag: 2.14.0
    88Donate link: https://www.paypal.me/rootwiley
    9 License: GPLv3 or later
     9License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1111
     
    7878
    7979== 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
    8097= 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) =
    8198- [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.
     
    112129
    113130== Upgrade Notice ==
    114 = 2.12.1 =
    115 * v2.12.0 - WP 6.4 Compatibility + hide various inline formats and placeholder options
     131= 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
    118= 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) =
    219- [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  
    2626
    2727/*
     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/*
    2836 Hide Heading Levels 1, 5, and 6
    2937 Filter values: heading-1, heading-5, heading-6
    3038 */
    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+ */
    3539.mrw-block-editor-no-heading-1 .block-library-heading-level-dropdown .components-button:nth-child(1),
    3640.mrw-block-editor-no-heading-5 .block-library-heading-level-dropdown .components-button:nth-child(5),
    3741.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 Sizing
    43  Filter Value: image-dimensions
    44 
    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 {
    4942    display: none;
    5043}
     
    7265    display: none;
    7366}
    74 
    75 /*===================================================
    76 =         Always use Media Library in Flows         =
    77 ===================================================*/
    78 /*
    79  Hide color options in cover placeholder
    80  Current not configurable due to iFramed block editor
    81 */
    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 
    11267
    11368/*===========================================
     
    153108=            Color Contrast Warning            =
    154109==============================================*/
    155 /* WP 6.0 */
    156110.color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper.color-block-support-panel__inner-wrapper {
    157111    display: flex;
  • mrw-web-design-simple-tinymce/trunk/inc/block-editor.php

    r3050062 r3398351  
    11<?php
    2 add_action( 'after_setup_theme', 'mrw_block_editor_theme_support', 11 );
     2add_action( 'after_setup_theme', __NAMESPACE__ . '\block_editor_theme_support', 11 );
    33/**
    44 * Make modifications to editor that can be made using default add_theme_support() calls
    55 */
    6 function mrw_block_editor_theme_support() {
     6function block_editor_theme_support() {
    77
    88    /*
     
    9797}
    9898
    99 add_action( 'plugins_loaded', 'mrw_hide_block_directory' );
     99add_action( 'plugins_loaded', __NAMESPACE__ . '\hide_block_directory' );
    100100/**
    101101 * Hide the block directory
     
    103103 * @see https://github.com/WordPress/gutenberg/issues/23961#issuecomment-666683997
    104104 */
    105 function mrw_hide_block_directory() {
    106 
    107     if( in_array( 'block-directory', mrw_hidden_block_editor_settings() ) ) {
     105function hide_block_directory() {
     106
     107    if( in_array( 'block-directory', hidden_block_editor_settings() ) ) {
    108108        remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
    109109        remove_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' );
     
    119119 * @return array slugs of all hidden core blocks
    120120 */
    121 function mrw_hidden_blocks() {
     121function hidden_blocks() {
    122122
    123123    $current_screen = get_current_screen();
     
    132132     */
    133133    $hidden_core_blocks = apply_filters( 'mrw_hidden_core_blocks', array(
     134        'core/accordion',
    134135        'core/audio',
    135136        'core/code',
     
    137138        'core/footnotes',
    138139        'core/freeform',
     140        'core/latest-posts',
     141        'core/math',
    139142        'core/nextpage',
    140143        'core/preformatted',
     
    177180        'core/query-title',
    178181        'core/post-title',
     182        'core/post-comments-count',
     183        'core/post-comments-link',
    179184        'core/post-content',
    180185        'core/post-date',
     
    185190        'core/post-author-biography',
    186191        'core/read-more',
     192        'core/term-count',
     193        'core/term-name',
    187194        'core/term-description',
     195        'core/terms-query',
     196        'core/post-time-to-read',
    188197    ), $context );
    189198
     
    208217        'core/post-comments-form',
    209218        'core/post-navigation-link',
     219        'core/template-part',
    210220    ), $context );
    211221
     
    235245}
    236246
    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 );
     247add_filter( 'mrw_hidden_site_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 );
     248add_filter( 'mrw_hidden_query_blocks', __NAMESPACE__ . '\show_blocks_in_site_editor', 0, 2 );
    239249/**
    240250 * Show all Query- and Post-related blocks in the Site Editor
    241251 */
    242 function mrw_show_blocks_in_site_editor( $blocks, $context ) {
     252function show_blocks_in_site_editor( $blocks, $context ) {
    243253    if( $context === 'site-editor' ) {
    244254        $blocks = array();
     
    251261 * Return list of hidden embeds
    252262 */
    253 function mrw_hidden_embeds() {
     263function hidden_embeds() {
    254264
    255265    $hidden_embeds = array(
     
    282292}
    283293
    284 add_action( 'jetpack_register_gutenberg_extensions', 'mrw_jetpack_hidden_blocks', 99 );
     294/**
     295 * Return list of hidden social links
     296 */
     297function 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
     331add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\jetpack_hidden_blocks', 99 );
    285332/**
    286333 * Hidden Jetpack Blocks
     
    288335 * @see  https://developer.jetpack.com/hooks/jetpack_register_gutenberg_extensions/
    289336 */
    290 function mrw_jetpack_hidden_blocks() {
     337function jetpack_hidden_blocks() {
    291338
    292339    if ( ! class_exists( 'Jetpack_Gutenberg' ) ) {
     
    303350        'eventbrite',
    304351        'gif',
     352        'goodreads',
    305353        'markdown',
     354        'nextdoor',
    306355        'opentable',
    307356        'payments-intro',
     
    339388 * @return array keyed array where keys are a block slug and value is an array containing all block style to remove
    340389 */
    341 function mrw_hidden_block_styles() {
     390function hidden_block_styles() {
    342391
    343392    $hidden_styles = array(
     
    364413 * @return array every option to hide via CSS or JS
    365414 */
    366 function mrw_hidden_block_editor_settings() {
     415function hidden_block_editor_settings() {
    367416
    368417    $hidden_block_editor_settings = array(
     
    375424        'drop-cap',
    376425        'duotone',
     426        'fit-text-heading',
     427        'fit-text-paragraph',
    377428        'font-weight',
    378429        'font-style',
     
    412463}
    413464
    414 add_filter( 'block_editor_settings_all', 'mrw_block_editor_settings', 99, 2 );
     465add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\block_editor_settings', 99, 2 );
    415466/**
    416467 * Make changes to editor settings, accounting for plugin filters, via the core block_editor_settings filter
     
    421472 * @see https://github.com/joppuyo/remove-drop-cap/blob/v1.1.0/remove-drop-cap.php#L22
    422473 */
    423 function mrw_block_editor_settings( $editor_settings, $context ) {
    424 
    425     $hidden_settings = mrw_hidden_block_editor_settings();
     474function block_editor_settings( $editor_settings, $context ) {
     475
     476    $hidden_settings = hidden_block_editor_settings();
    426477
    427478    /* Border */
     
    535586 * @return array all hidden blocks, block styles, and block editor settings
    536587 */
    537 function mrw_block_editor_js_config() {
     588function block_editor_js_config() {
    538589
    539590    $js_options = array();
     
    544595    =            Blocks            =
    545596    ==============================*/
    546     $js_options['hiddenBlocks'] = array_values( mrw_hidden_blocks() );
    547 
     597    $js_options['hiddenBlocks'] = array_values( hidden_blocks() );
    548598
    549599    /*========================================
    550600    =            Embed Variations            =
    551601    ========================================*/
    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() );
    553608
    554609    /*====================================
    555610    =            Block Styles            =
    556611    ======================================*/
    557     $hidden_style_variations = array();
    558     foreach ( mrw_hidden_block_styles() as $block => $styles ) {
     612    foreach ( hidden_block_styles() as $block => $styles ) {
    559613        $hidden_styles[$block] = array_values( $styles );
    560614    }
     
    565619    =            Features            =
    566620    ================================*/
    567     $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() );
     621    $js_options['hiddenSettings'] = array_values( hidden_block_editor_settings() );
    568622
    569623    return $js_options;
     
    571625}
    572626
    573 add_action( 'enqueue_block_editor_assets', 'mrw_block_editor_assets' );
     627add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\block_editor_assets' );
    574628/**
    575629 * Enqueue CSS and JS files that modify/hide block editor settings in the admin
    576630 */
    577 function mrw_block_editor_assets() {
     631function block_editor_assets() {
    578632
    579633    /**
     
    605659        plugins_url( 'css/block-editor.css', dirname(__FILE__) ),
    606660        array(),
    607         '2.0.0'
     661        MRW_SIMPLIFIED_EDITOR_VERSION
    608662    );
    609663
     
    612666        plugins_url( 'js/block-editor.js', dirname(__FILE__) ),
    613667        $script_dependencies,
    614         '2.0.0'
     668        MRW_SIMPLIFIED_EDITOR_VERSION,
     669        array( 'in_footer' => true )
    615670    );
    616671
     
    618673        'mrw-block-editor-js',
    619674        'mrwEditorOptions',
    620         mrw_block_editor_js_config()
     675        block_editor_js_config()
    621676    );
    622677
     
    625680}
    626681
    627 add_action( 'admin_body_class', 'mrw_block_editor_settings_admin_classes' );
     682add_action( 'enqueue_block_assets', __NAMESPACE__ . '\block_styles' );
     683function 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
     694add_action( 'admin_body_class', __NAMESPACE__ . '\block_editor_settings_admin_classes' );
    628695/**
    629696 * Apply body classes to admin for each features that are hidden via CSS
     
    632699 * @return array
    633700 */
    634 function mrw_block_editor_settings_admin_classes( $classes ) {
     701function block_editor_settings_admin_classes( $classes ) {
    635702
    636703    $current_screen = get_current_screen();
    637704
    638705    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 
    642706        $prefix = ' mrw-block-editor-no-';
     707        $hidden_block_editor_settings = hidden_block_editor_settings();
     708        $hidden_blocks = hidden_blocks();
     709       
    643710        foreach( $hidden_block_editor_settings as $setting ) {
    644711            $classes .= $prefix . sanitize_title_with_dashes( $setting );
    645712        }
    646713
    647     }
     714        if( in_array( 'core/cover', $hidden_blocks ) ) {
     715            $classes .= $prefix . 'cover-block';
     716        }
     717
     718    }
     719
     720
    648721
    649722    return $classes;
  • mrw-web-design-simple-tinymce/trunk/inc/classic-editor.php

    r2628886 r3398351  
    11<?php
    2 add_filter( 'mce_buttons', 'mrw_mce_buttons_1', 0 );
     2namespace MRW\SimplifiedEditor;
     3
     4add_filter( 'mce_buttons', __NAMESPACE__ . '\mce_buttons_1', 0 );
    35/**
    46 * Remove formatting buttons that cause more trouble than they're worth.
     
    1113 * @see    http://codex.wordpress.org/TinyMCE_Custom_Buttons
    1214 */
    13 function mrw_mce_buttons_1( $buttons ) {
     15function mce_buttons_1( $buttons ) {
    1416
    1517    $buttons = array(
     
    4648add_filter( 'mce_buttons_2', '__return_empty_array', 0 );
    4749
    48 add_filter( 'tiny_mce_before_init', 'mrw_mce_init', 0 );
     50add_filter( 'tiny_mce_before_init', __NAMESPACE__ . '\mce_init', 0 );
    4951/**
    5052 * Customize the WordPress TinyMCE editor.
     
    6062 * @see    http://wordpress.stackexchange.com/a/128950/9844
    6163 */
    62 function mrw_mce_init( $args ) {
     64function mce_init( $args ) {
    6365    $style_formats = array(
    6466        array(
     
    7577        ),
    7678        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' ),
    7880            'format' => 'h4',
    7981        ),
     
    132134    }
    133135
    134     $args['style_formats'] = json_encode( $style_formats );
     136    $args['style_formats'] = wp_json_encode( $style_formats );
    135137
    136138    return $args;
  • mrw-web-design-simple-tinymce/trunk/js/block-editor.js

    r3003951 r3398351  
    2020     * Hide Embed Variations
    2121     */
    22     wp.blocks.getBlockVariations('core/embed').forEach(function (embed) {
     22    mrwEditorOptions.hiddenEmbeds.forEach((embed) => {
     23        wp.blocks.unregisterBlockVariation('core/embed', embed);
     24    });
    2325
    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);
    2831    });
    2932
     
    3841
    3942    });
     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    }
    4051
    4152    /* 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  
    44* Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/
    55* Description: Streamlines the WordPress editor to focus users on consistent formatting and semantic content.
    6 * Version: 2.13.0
     6* Version: 2.14.0
    77* Author: Mark Root-Wiley
    88* Author URI: https://MRWweb.com
    99* Text Domain: mrw-web-design-simple-tinymce
    1010* License: GPLv2 or later
     11* GitHub Plugin URI: mrwweb/mrw-simplified-editor-wordpress
     12* Primary Branch: release
    1113*/
     14
     15DEFINE( 'MRW_SIMPLIFIED_EDITOR_VERSION', '2.14.0' );
    1216
    1317include_once( 'inc/classic-editor.php' );
  • mrw-web-design-simple-tinymce/trunk/readme.txt

    r3050062 r3398351  
    22Contributors: mrwweb
    33Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor
    4 Requires at least: 6.0
     4Requires at least: 6.5
    55Requires PHP: 5.6.20
    6 Tested up to: 6.5
    7 Stable tag: 2.13.0
     6Tested up to: 6.9
     7Stable tag: 2.14.0
    88Donate link: https://www.paypal.me/rootwiley
    9 License: GPLv3 or later
     9License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1111
     
    7878
    7979== 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
    8097= 2.13.0 (March 12, 2024, Released on a train somewhere between Seattle and Portland 🚆) =
    8198- [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.
     
    112129
    113130== Upgrade Notice ==
    114 = 2.12.1 =
    115 * v2.12.0 - WP 6.4 Compatibility + hide various inline formats and placeholder options
     131= 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.