Plugin Directory

Changeset 2452342


Ignore:
Timestamp:
01/08/2021 07:23:56 AM (5 years ago)
Author:
mrwweb
Message:

Update to version 2.4.0 from GitHub

Location:
mrw-web-design-simple-tinymce
Files:
10 edited
1 copied

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
    117= 2.2.0 (Aug 5, 2020) =
    218* WordPress 5.5 support
  • mrw-web-design-simple-tinymce/tags/2.4.0/inc/block-editor.php

    r2449625 r2452342  
    130130        'core/search',
    131131        'core/tag-cloud',
    132 
    133         // Embeds
    134         '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',
    148132    );
    149133
     
    174158    );
    175159
    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 */
     167function 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 );
    179188
    180189}
     
    187196 */
    188197function mrw_jetpack_hidden_blocks() {
     198
    189199    if ( ! class_exists( 'Jetpack_Gutenberg' ) ) {
    190200        return;
     
    215225        );
    216226    }
     227
    217228}
    218229
     
    250261    );
    251262
    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 );
    258264
    259265}
     
    295301    );
    296302
    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 );
    303304
    304305}
     
    322323
    323324    return $editor_settings;
     325
    324326}
    325327
     
    333335    $js_options = array();
    334336
    335     // Note: use array_values to ensure this is passed as an array and not an object
     337    // Note: using array_values to ensure this is passed as an array and not an object
    336338
    337339    /*==============================
     
    342344
    343345    /*========================================
    344     =            Style Variations            =
     346    =            Embed Variations            =
    345347    ========================================*/
     348    $js_options['hiddenEmbeds'] = array_values( mrw_hidden_embeds() );
     349
     350    /*====================================
     351    =            Block Styles            =
     352    ======================================*/
    346353    $hidden_style_variations = array();
    347354    foreach ( mrw_hidden_block_styles() as $block => $styles ) {
     
    350357
    351358    $js_options['hiddenStyles'] = $hidden_styles;
    352 
    353359
    354360    /*================================
     
    356362    ================================*/
    357363    $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() );
    358    
    359364
    360365    return $js_options;
  • mrw-web-design-simple-tinymce/tags/2.4.0/js/block-editor.js

    r2449625 r2452342  
     1/*
     2 * Hide Blocks
     3 */
    14wp.hooks.addFilter( 'blocks.registerBlockType', 'hideBlocks', ( blockSettings, blockName ) => {
    25
     
    1215wp.domReady( function() {
    1316
     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     */
    1431    Object.keys( mrwEditorOptions.hiddenStyles ).forEach( function( block ) {
     32
    1533        mrwEditorOptions.hiddenStyles[block].forEach( function( style ) {
    1634            wp.blocks.unregisterBlockStyle( block, style );
    1735        });
     36
    1837    });
    1938
  • mrw-web-design-simple-tinymce/tags/2.4.0/mrwweb-simple-tinymce.php

    r2449625 r2452342  
    44* Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/
    55* Description: Streamlines the Block Editor and Classic Editor with only the critical features for consistent semantic formatting.
    6 * Version: 2.3.0
     6* Version: 2.4.0
    77* Author: Mark Root-Wiley
    88* Author URI: https://MRWweb.com
  • mrw-web-design-simple-tinymce/tags/2.4.0/readme.txt

    r2449627 r2452342  
    11=== MRW Simplified Editor ===
    22Contributors: mrwweb
    3 Tags: Block Editor, Gutenberg, TinyMCE, Editor Styles, Editor
     3Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor
    44Requires at least: 4.1
    55Requires PHP: 5.6.20
    66Tested up to: 5.6
    7 Stable tag: 2.3.0
     7Stable tag: 2.4.0
    88Donate link: https://www.paypal.me/rootwiley
    99License: GPLv3 or later
     
    4242Reduce 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.
    4343
     44= Note on WordPress version Support =
     45Due to frequent changes to the block editor, features are only guaranteed for the latest version of WordPress.
     46
    4447== Frequently Asked Questions ==
    4548
     
    6871== Changelog ==
    6972
     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
    7078= 2.3.0 (January 3, 2021) =
    7179* WordPress 5.6 support confirmed
     
    8088* [Docs] - Moved Filter references and code examples to [GitHub wiki](https://github.com/mrwweb/mrw-simplified-editor-wordpress/wiki/MRW-Simplified-Editor-Documentation)
    8189
    82 = 2.2.0 (Aug 5, 2020) =
    83 * WordPress 5.5 support
    84 * [NEW] WP 5.5 features disabled:
    85     * Core Block Patterns
    86     * Block Directory Installer
    87 * [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 English
    89 * [Fix] Adjust "Save draft" button to show consistently and match new secondary button styles
    90 * [Fix] Restore more prominent color contrast errors
    91 * [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 option
    93 * [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 options
    95 
    9690= Full Changelog =
    9791* [Changelog on Github](https://github.com/mrwweb/mrw-simplified-editor-wordpress/blob/master/changelog.txt)
    9892
    9993== 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
    117= 2.2.0 (Aug 5, 2020) =
    218* WordPress 5.5 support
  • mrw-web-design-simple-tinymce/trunk/inc/block-editor.php

    r2449625 r2452342  
    130130        'core/search',
    131131        'core/tag-cloud',
    132 
    133         // Embeds
    134         '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',
    148132    );
    149133
     
    174158    );
    175159
    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 */
     167function 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 );
    179188
    180189}
     
    187196 */
    188197function mrw_jetpack_hidden_blocks() {
     198
    189199    if ( ! class_exists( 'Jetpack_Gutenberg' ) ) {
    190200        return;
     
    215225        );
    216226    }
     227
    217228}
    218229
     
    250261    );
    251262
    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 );
    258264
    259265}
     
    295301    );
    296302
    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 );
    303304
    304305}
     
    322323
    323324    return $editor_settings;
     325
    324326}
    325327
     
    333335    $js_options = array();
    334336
    335     // Note: use array_values to ensure this is passed as an array and not an object
     337    // Note: using array_values to ensure this is passed as an array and not an object
    336338
    337339    /*==============================
     
    342344
    343345    /*========================================
    344     =            Style Variations            =
     346    =            Embed Variations            =
    345347    ========================================*/
     348    $js_options['hiddenEmbeds'] = array_values( mrw_hidden_embeds() );
     349
     350    /*====================================
     351    =            Block Styles            =
     352    ======================================*/
    346353    $hidden_style_variations = array();
    347354    foreach ( mrw_hidden_block_styles() as $block => $styles ) {
     
    350357
    351358    $js_options['hiddenStyles'] = $hidden_styles;
    352 
    353359
    354360    /*================================
     
    356362    ================================*/
    357363    $js_options['hiddenSettings'] = array_values( mrw_hidden_block_editor_settings() );
    358    
    359364
    360365    return $js_options;
  • mrw-web-design-simple-tinymce/trunk/js/block-editor.js

    r2449625 r2452342  
     1/*
     2 * Hide Blocks
     3 */
    14wp.hooks.addFilter( 'blocks.registerBlockType', 'hideBlocks', ( blockSettings, blockName ) => {
    25
     
    1215wp.domReady( function() {
    1316
     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     */
    1431    Object.keys( mrwEditorOptions.hiddenStyles ).forEach( function( block ) {
     32
    1533        mrwEditorOptions.hiddenStyles[block].forEach( function( style ) {
    1634            wp.blocks.unregisterBlockStyle( block, style );
    1735        });
     36
    1837    });
    1938
  • mrw-web-design-simple-tinymce/trunk/mrwweb-simple-tinymce.php

    r2449625 r2452342  
    44* Plugin URI: https://MRWweb.com/wordpress-plugins/mrw-web-design-simple-tinymce/
    55* Description: Streamlines the Block Editor and Classic Editor with only the critical features for consistent semantic formatting.
    6 * Version: 2.3.0
     6* Version: 2.4.0
    77* Author: Mark Root-Wiley
    88* Author URI: https://MRWweb.com
  • mrw-web-design-simple-tinymce/trunk/readme.txt

    r2449627 r2452342  
    11=== MRW Simplified Editor ===
    22Contributors: mrwweb
    3 Tags: Block Editor, Gutenberg, TinyMCE, Editor Styles, Editor
     3Tags: Block Editor, Blocks, Gutenberg, Editor Styles, Editor
    44Requires at least: 4.1
    55Requires PHP: 5.6.20
    66Tested up to: 5.6
    7 Stable tag: 2.3.0
     7Stable tag: 2.4.0
    88Donate link: https://www.paypal.me/rootwiley
    99License: GPLv3 or later
     
    4242Reduce 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.
    4343
     44= Note on WordPress version Support =
     45Due to frequent changes to the block editor, features are only guaranteed for the latest version of WordPress.
     46
    4447== Frequently Asked Questions ==
    4548
     
    6871== Changelog ==
    6972
     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
    7078= 2.3.0 (January 3, 2021) =
    7179* WordPress 5.6 support confirmed
     
    8088* [Docs] - Moved Filter references and code examples to [GitHub wiki](https://github.com/mrwweb/mrw-simplified-editor-wordpress/wiki/MRW-Simplified-Editor-Documentation)
    8189
    82 = 2.2.0 (Aug 5, 2020) =
    83 * WordPress 5.5 support
    84 * [NEW] WP 5.5 features disabled:
    85     * Core Block Patterns
    86     * Block Directory Installer
    87 * [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 English
    89 * [Fix] Adjust "Save draft" button to show consistently and match new secondary button styles
    90 * [Fix] Restore more prominent color contrast errors
    91 * [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 option
    93 * [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 options
    95 
    9690= Full Changelog =
    9791* [Changelog on Github](https://github.com/mrwweb/mrw-simplified-editor-wordpress/blob/master/changelog.txt)
    9892
    9993== 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.