Disable File Editing function

There is no “Enable” button I’m aware of, but if you want to fully disable file editing, then that’s easy. https://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing Add this line to your wp-config.php file: define(‘DISALLOW_FILE_EDIT’, true); No more file editing in WordPress.

Disable Plugin with one button

If you have FTP access (or File Manager on your hosting place), just rename the plugin’s folder (in wp-content\plugins). That will deactivate the plugin, but won’t remove the settings. Once you fix things, you can put the plugin’s folder name back to the original name. Then reactivate it. (This is a great way to find … Read more

Inline style HTML attribute is being stripped from all elements of a post

This is because what you’re trying to do trips a security feature, post content is passed through wp_kses_post to strip out dangerous tags Administrators however, have the unfiltered_html capability, which allows them to put arbitrary dangerous HTML in content and titles. This is why you’re able to insert the tags via the editor. This still … Read more

How to set default post editor based on role?

create_function() is deprecated as of PHP 7.2.0, so you should avoid using it. Instead, use an anonymous function. Additionally, it’s better the check the current user role inside the callback function, so that the current user role is checked when the filter is applied, not when the hook is added, which could be before the … Read more

How to add custom table style for table block in gutenberg editor

The register_block_style function is what you’ll want. The basic implementation is register_block_style( ‘core/table’, array( ‘name’ => ‘my-table-style’, ‘label’ => ‘My Table Style’, ) ); When you select the style, it will add the is-style-my-table-style class to the block, which you can style using your style.css or other stylesheet. There are two other implementations, where you … Read more