Saturday, August 13, 2022
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory
  • Login
  • Register
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
No Result
View All Result
Cloud7 News
No Result
View All Result

Home > Development > WordPress 5.9 coming with a new block level locking mechanism

WordPress 5.9 coming with a new block level locking mechanism

The WordPress team announced that the new version of WordPress will come with a new block level locking mechanism.


Erdem Yasar Erdem Yasar
January 13, 2022
2 min read
WordPress 5.9 coming with a new block level locking mechanism

The WordPress team announced that WordPress 5.0, which is expected to be released on 25 January, is coming with a new block level locking mechanism. It will work alongside templateLock and allow theme authors to create better patterns and templates. The API was already included in Gutenberg and it enables developers to lock the template, preventing users from manipulating the block.

Can be applied to selected blocks

Developers can apply it selectively to individual blocks with the lock attribute instead of applying it to all inner blocks. The new API can be applied on the block level and override template locking. Block locking is not inheritable, unlike templateLock. This means if a block is locked, its children can still be removed. To prevent that, templateLock can be added to the inner block component.

By adding locking to its definition, users can lock a block by default:

"attributes": {
"lock": {
"type": "object",
"default": { 
"move": true, 
"remove": true } 
} 
}

It is also possible to lock a specific block in a pattern. For example, this is how users can lock the heading block and it can’t be removed:

<!-- wp:media-text {"align":"full","mediaType":"image","verticalAlignment":"center"} -- >
<div class="wp-block-media-text alignfull is-stacked-on-mobile is-vertically-aligned-center">
<figure class="wp-block-media-text__media"><img src="https://s.w.org/images/core/5.8/architecture-04.jpg" alt="Close-up, abstract view of architecture." /></figure>
<div class="wp-block-media-text__content">
<!-- wp:heading {"textAlign":"center","level":3,"style":{"color":{"text":"#000000"}},"lock":{"remove": true}} -- >
<h3 class="has-text-align-center has-text-color" id="open-spaces-1" style="color: #000000;"><strong>Open Spaces</strong></h3>
<!-- /wp:heading -- >

<!-- wp:paragraph {"align":"center","fontSize":"extra-small"} -- >
<p class="has-text-align-center has-extra-small-font-size"><a href="#">See case study <img draggable="false" role="img" class="emoji" alt="" src="https://s.w.org/images/core/emoji/13.1.0/svg/2197.svg"></a></p>
<!-- /wp:paragraph -- >
</div>
</div>
<!-- /wp:media-text -- >

See more Development News


Tags: WordPress

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

Next Post
Flatpak 1.12.3 released with important fixes

Flatpak 1.12.3 released with important fixes

Related News

DuckDuckGo includes Microsoft in its 3rd-party tracker protection

DuckDuckGo includes Microsoft in its 3rd-party tracker protection

August 10, 2022 1:45 pm
Slack resets passwords after fixing a bug

Slack resets passwords after fixing a bug

August 8, 2022 12:45 pm
Is GitLab going to delete inactive projects from its free tier?

Is GitLab going to delete inactive projects from its free tier?

August 5, 2022 5:15 pm
WordPress 6 1 is going to have WebP by default

WebP support for WordPress is now merged into Core

August 3, 2022 6:55 pm
Get free daily newsletters from Cloud7 News Get the Cloud7 Newsletter

Check your inbox or spam folder to confirm your subscription.

By subscribing, you agree to our
Copyright Policy and Privacy Policy

Get the Cloud7 Newsletter

Sign up for the Cloud7 Newsletter to receive the latest IT business updates straight to your inbox daily.

Check your inbox or spam folder to confirm your subscription.

Editor's Choice

Interview with Igor Seletskiy on AlmaLinux

7 best hosting control panels

How to update Linux Kernel without rebooting?

7 best Linux mail servers for 2022

7 best cPanel alternatives for 2022

7 best Linux web browsers for 2022

7 best CentOS alternatives

7 best Linux server distros for 2022

How to scan your server for Log4j (Log4Shell) vulnerability

10 Best Web Hosting Services of 2022

AlmaLinux 8.6 Stable is ready to download

Ubuntu 22.04 LTS is available for download. What is new?

Kali Linux 2022.2 is ready for download

Recent News

  • [Event] WordPress: Don’t underestimate the power of plugins
  • Snap app of the week: Motrix
  • We might need DNA storage systems by 2030
  • Rackspace achieved QSAC status for PCI DSS across EMEA
  • Ubuntu 22.04.1 is now available for download after a little delay


Cloud7 is a news source that publishes the latest news, reviews, comparisons, opinions, and exclusive interviews to help tech users of high-experience levels in the IT industry.

EXPLORE

  • Web Hosting
  • Cloud Computing
  • Data Center
  • Cybersecurity
  • Linux
  • Network/Internet
  • Software
  • Hardware
  • How-Tos
  • Troubleshooting

RESOURCES

  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

Get the Cloud7 Newsletter

Get FREE daily newsletters from Cloud7 delivering the latest news and reviews.

  • About
  • Privacy & Policy
  • Copyright Policy
  • Contact

© 2022, Cloud7 News. All rights reserved.

No Result
View All Result
  • Cloud Computing
  • Web Hosting
  • Data Center
  • Linux
  • Cybersecurity
  • More
    • Network/Internet
    • Windows
    • Software
    • Hardware
    • Blockchain
    • Policy/Legislation
    • How-Tos
    • Troubleshooting
  • Events
  • Interviews
  • Jobs
  • Opinion
  • Whitepapers
  • Glossary
  • Community Forum
  • Web Hosting Directory

© 2022, Cloud7 News. All rights reserved.

Welcome Back!

Sign In with Facebook
Sign In with Google
Sign In with Linked In
OR

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Sign Up with Facebook
Sign Up with Google
Sign Up with Linked In
OR

Fill the forms below to register

*By registering into our website, you agree to the Terms & Conditions and Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.