Changeset 2441357
- Timestamp:
- 12/17/2020 10:06:50 AM (5 years ago)
- Location:
- safe-block-editor
- Files:
-
- 9 added
- 2 edited
-
tags/1.1 (added)
-
tags/1.1/css (added)
-
tags/1.1/css/block-editor.css (added)
-
tags/1.1/index.php (added)
-
tags/1.1/js (added)
-
tags/1.1/js/block-editor.js (added)
-
tags/1.1/licence.txt (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/safe-block-editor.php (added)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/safe-block-editor.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
safe-block-editor/trunk/readme.txt
r2318912 r2441357 4 4 Tags: editor, blocks, block editor 5 5 Requires at least: 5.0 6 Tested up to: 5. 4.17 Stable tag: 1. 06 Tested up to: 5.5.3 7 Stable tag: 1.1 8 8 Requires PHP: 5.6 9 9 License: GPL v3 or later … … 19 19 20 20 * Font size picker and custom font size 21 * Custom padding and units 21 22 * Color palette, and color picker 22 23 * Gradients 23 24 * Wide and full alignments 25 * Block patterns 24 26 25 27 Blocs removed : … … 49 51 50 52 * Anchor 53 * DropCap 54 * Image editing in image block 51 55 * HTML view 52 56 * Reusable block … … 63 67 1. Activate the plugin through the 'Plugins' screen in WordPress 64 68 65 == Frequently Asked Questions ==66 67 = What about Drop Cap setting ? =68 69 At the moment there is no easy, clean or future-proof way of removing the drop cap setting. We'll leave it for now.70 71 69 == Screenshots == 72 70 … … 75 73 == Changelog == 76 74 75 = 1.1 = 76 * Remove custom units, custom paddings, dropcap image editing, and block patterns 77 77 78 = 1.0 = 78 79 * Initial release … … 80 81 == Upgrade Notice == 81 82 83 = 1.1 = 84 * Remove custom units, custom paddings, dropcap image editing, and block patterns 85 82 86 = 1.0 = 83 87 Initial release -
safe-block-editor/trunk/safe-block-editor.php
r2317115 r2441357 3 3 * Plugin Name: Safe Block Editor by WPMarmite 4 4 * Description: Simplifies your authoring experience by removing distracting options in the WordPress editor. 5 * Version: 1. 05 * Version: 1.1 6 6 * Author: Modern Plugins 7 7 * Author URI: https://modernplugins.com/ … … 12 12 * Domain Path: languages/ 13 13 * Requires at least: 5.0 14 * Tested up to: 5. 4.114 * Tested up to: 5.5.3 15 15 */ 16 16 … … 72 72 add_theme_support( '__experimental-disable-custom-gradients' ); 73 73 74 // Disable support for wide and full alignment74 // Disable unneeded functionnality 75 75 if( get_theme_support( 'align-wide' ) ){ 76 76 remove_theme_support( 'align-wide' ); 77 77 } 78 if( get_theme_support( 'custom-line-height' ) ){ 79 remove_theme_support( 'custom-line-height' ); 80 } 81 if( get_theme_support( 'custom-units' ) ){ 82 add_theme_support( 'custom-units', array() ); 83 } 84 if( get_theme_support( 'custom-spacing' ) ){ 85 remove_theme_support('custom-spacing'); 86 } 87 if( get_theme_support( 'core-block-patterns' ) ){ 88 remove_theme_support( 'core-block-patterns' ); 89 } 90 } 91 92 93 add_filter( 'block_editor_settings', 'safe_block_editor_editor_settings', 10, 2 ); 94 /** 95 * Disables image editing 96 * 97 * @param array $settings Settings of the editor. 98 * @param WP_Post $post Current post 99 * @return array $settings 100 */ 101 function safe_block_editor_editor_settings( $settings, $post ){ 102 $settings['imageEditing'] = false; 103 return $settings; 78 104 } 79 105 … … 158 184 'anchor' => false, 159 185 // 'customClassName' => false, 186 // 'lightBlockWrapper' => true, 160 187 'html' => false, 161 188 'reusable' => false, 189 '__experimentalLineheight' => false, 190 '__experimentalEnableRichImageEditing' => false, 191 '__experimentalFeatures' => array( 192 'typography' => array( 193 'dropCap' => false 194 ), 195 ), 162 196 ); 163 197 return apply_filters( 'safe_block_editor_supports', $supports ); … … 170 204 */ 171 205 function safe_block_editor_block_editor_scripts() { 172 $version = get_plugin_data( __FILE__, false, false )['Version'];206 $version = get_plugin_data( __FILE__, false, false )['Version']; 173 207 wp_enqueue_script( 'safe-block-editor-js', SAFE_BLOCK_EDITOR_URL . 'js/block-editor.js', array( 'wp-blocks', 'wp-hooks', 'wp-dom-ready', 'wp-edit-post' ), $version, true ); 174 208 wp_enqueue_style( 'safe-block-editor', SAFE_BLOCK_EDITOR_URL . 'css/block-editor.css', array(), $version );
Note: See TracChangeset
for help on using the changeset viewer.