Useful Code Snippets for WordPress 5.6

The newest version of WordPress version 5.6 was released on the 8th of December. Some of the new features and changes added in the 5.6 release relate to block patterns in the block editor, a new default theme, application password, better video captioning, and PHP 8.0 support.

To disable the application passwords feature in WordPress you can use this code snippet;

add_filter( 'wp_is_application_passwords_available', '__return_false' );

The reason you might need to disable the application password feature in WordPress is that can be a security risk.

You can disable the application passwords feature for specific users as well using this code snippet;

add_filter( 'wp_is_application_passwords_available_for_user', '__return_false' );

We have already covered how to allow minor WordPress core updates but disable major WordPress core updates in the new automatic WordPress core updates feature that was added in WordPress 5.6. You can use this code snippet;

add_filter( 'allow_major_auto_core_updates', '_return_false' );

Most of the main new features in WordPress 5.6 were related to the new default theme Twenty Twenty-One and block editor related features.

MainWP has a solid extension for being able to easily activate or deactivate code snippets on connected child sites.

Being able to easily add code snippets and deploy those to connected child sites makes disabling WordPress features or making changes related to any of the active plugins that are being used on the child sites.

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys