SlideShare a Scribd company logo
Jonathan Bossenger
Let’s Code
Learn.WordPress.org
A Beginners Guide to Block Locking in Block Themes
2
đź‘‹
Welcome!
As you join, feel free to
answer these questions in
the chat:
1. What region are you joining us from?
2. What do you do with WordPress?
3. What is your favourite thing about
WordPress?
Learn.WordPress.org
Let's code!
A Beginners
Guide to Block
Locking in Block
Themes
Jonathan Bossenger
Announcements
â—‹ Welcome, and thanks to Alvaro for co-hosting with me today!
○ We’ll be presenting in focus mode.
â—‹ You are welcome to ask questions.
â—‹ You are welcome to unmute to ask questions, or post them in the chat.
Announcements
â—‹ Block course theme code for this session:
• https://github.com/WordPress/block-course-theme
• https://github.com/WordPress/block-course-
theme/releases/download/1.0.0/block-course-theme.zip
â—‹ If I am going too fast, please let me know!
â—‹ We will be posting this session to https://wordpress.tv/ afterwards
â—‹ For more WordPress focused content please visit https://learn.wordpress.org/
Learning Outcomes
â—‹ What is Block Locking?
â—‹ Block Locking vs disabling block settings
â—‹ Using theme.json to disable block settings
â—‹ Lock blocking options in the Site Editor
â—‹ Using canLockBlocks to enable/disable locked blocks for users
What is Block Locking?
â—‹ Block locking is a new feature added to WordPress in version 5.9
â—‹ https://make.wordpress.org/core/2022/01/08/locking-blocks-in-wordpress-5-9/
â—‹ Blocks can be locked at the block level
• Block.json attributes
â—‹ Blocks can be locked in the editor
• Enable/disable removal
• Enable/disable movement
Block Locking vs Block Settings
â—‹ Block settings
• Can be enabled/disabled using theme.json
• Apply to all instances of that block across the entire theme
â—‹ Block locking
• Can be enabled/disabled in the editor
• Only apply to the blocks that have been locked
• Currently only support removal and movement, or both
9
Let’s code.
Learn.WordPress.org
Thank You!
Questions?
Link Vault
â—‹ https://gutenbergtimes.com/how-to-disable-theme-features-and-lock-block-templates-for-full-site-
editing-in-wordpress/
â—‹ https://fullsiteediting.com/how-to-lock-blocks-and-templates/
â—‹ https://make.wordpress.org/core/2022/01/08/locking-blocks-in-wordpress-5-9/
â—‹ https://make.wordpress.org/core/2022/05/05/block-locking-settings-in-wordpress-6-0/
â—‹ https://developer.wordpress.org/block-editor/reference-guides/block-api/block-templates/#locking
â—‹ https://wordpress.tv/2022/08/17/using-create-block-theme/
â—‹ https://learn.wordpress.org/tutorial/wordpress-filter-hooks/

More Related Content

PPTX
New WordPress Developer APIs The Interactivity API
PPTX
The WordPress HTML API
PPTX
The WordPress Create Block tool
PPTX
PHP compatibility testing with PHPCompatibilityWP
PPTX
Common WordPress APIs_ Settings API
PPTX
Common WordPress APIs - Options API
PPTX
Common WordPress APIs_ HTTP API.pptx
PPTX
Common WordPress APIs: Metadata
New WordPress Developer APIs The Interactivity API
The WordPress HTML API
The WordPress Create Block tool
PHP compatibility testing with PHPCompatibilityWP
Common WordPress APIs_ Settings API
Common WordPress APIs - Options API
Common WordPress APIs_ HTTP API.pptx
Common WordPress APIs: Metadata

More from Jonathan Bossenger (20)

PPTX
What’s new for developers_ (August 2023).pptx
PPTX
Testing your plugins for PHP version compatibility
PPTX
Common WordPress APIs_ Global Variables
PPTX
Common WordPress APIs_ Internationalization
PPTX
Testing WordPress 6.3 - Developer edition
PPTX
Common WordPress APIs: Responsive Images
PPTX
Common WordPress APIs - Dashboard Widgets
PPTX
Custom Tables in WordPress
PPTX
The WordPress Database
PPTX
WordPress Coding Standards
PPTX
Managing a WordPress Multisite Network
PPTX
Debugging in WordPress
PPTX
Testing plugins for PHP 8
PPTX
Introduction to WordPress Multisite Networks
PPTX
Developing for multisite
PPTX
Custom Post Types and Capabilities.pptx
PPTX
Developing WordPress User Roles and Capabilities
PPTX
Let's code: WordPress multisite experiments
PPTX
Creating a WordPress multisite network
PPTX
Extending WordPress: common security vulnerabilities
What’s new for developers_ (August 2023).pptx
Testing your plugins for PHP version compatibility
Common WordPress APIs_ Global Variables
Common WordPress APIs_ Internationalization
Testing WordPress 6.3 - Developer edition
Common WordPress APIs: Responsive Images
Common WordPress APIs - Dashboard Widgets
Custom Tables in WordPress
The WordPress Database
WordPress Coding Standards
Managing a WordPress Multisite Network
Debugging in WordPress
Testing plugins for PHP 8
Introduction to WordPress Multisite Networks
Developing for multisite
Custom Post Types and Capabilities.pptx
Developing WordPress User Roles and Capabilities
Let's code: WordPress multisite experiments
Creating a WordPress multisite network
Extending WordPress: common security vulnerabilities

Let's code! A Beginners Guide to Block Locking in Block Themes.pptx

  • 1. Jonathan Bossenger Let’s Code Learn.WordPress.org A Beginners Guide to Block Locking in Block Themes
  • 2. 2 đź‘‹ Welcome! As you join, feel free to answer these questions in the chat: 1. What region are you joining us from? 2. What do you do with WordPress? 3. What is your favourite thing about WordPress?
  • 3. Learn.WordPress.org Let's code! A Beginners Guide to Block Locking in Block Themes Jonathan Bossenger
  • 4. Announcements â—‹ Welcome, and thanks to Alvaro for co-hosting with me today! â—‹ We’ll be presenting in focus mode. â—‹ You are welcome to ask questions. â—‹ You are welcome to unmute to ask questions, or post them in the chat.
  • 5. Announcements â—‹ Block course theme code for this session: • https://github.com/WordPress/block-course-theme • https://github.com/WordPress/block-course- theme/releases/download/1.0.0/block-course-theme.zip â—‹ If I am going too fast, please let me know! â—‹ We will be posting this session to https://wordpress.tv/ afterwards â—‹ For more WordPress focused content please visit https://learn.wordpress.org/
  • 6. Learning Outcomes â—‹ What is Block Locking? â—‹ Block Locking vs disabling block settings â—‹ Using theme.json to disable block settings â—‹ Lock blocking options in the Site Editor â—‹ Using canLockBlocks to enable/disable locked blocks for users
  • 7. What is Block Locking? â—‹ Block locking is a new feature added to WordPress in version 5.9 â—‹ https://make.wordpress.org/core/2022/01/08/locking-blocks-in-wordpress-5-9/ â—‹ Blocks can be locked at the block level • Block.json attributes â—‹ Blocks can be locked in the editor • Enable/disable removal • Enable/disable movement
  • 8. Block Locking vs Block Settings â—‹ Block settings • Can be enabled/disabled using theme.json • Apply to all instances of that block across the entire theme â—‹ Block locking • Can be enabled/disabled in the editor • Only apply to the blocks that have been locked • Currently only support removal and movement, or both
  • 11. Link Vault â—‹ https://gutenbergtimes.com/how-to-disable-theme-features-and-lock-block-templates-for-full-site- editing-in-wordpress/ â—‹ https://fullsiteediting.com/how-to-lock-blocks-and-templates/ â—‹ https://make.wordpress.org/core/2022/01/08/locking-blocks-in-wordpress-5-9/ â—‹ https://make.wordpress.org/core/2022/05/05/block-locking-settings-in-wordpress-6-0/ â—‹ https://developer.wordpress.org/block-editor/reference-guides/block-api/block-templates/#locking â—‹ https://wordpress.tv/2022/08/17/using-create-block-theme/ â—‹ https://learn.wordpress.org/tutorial/wordpress-filter-hooks/

Editor's Notes

  • #2: TITLE SLIDE: Make a copy of this presentation to your Google Drive, and edit to replace with your details.