Bird
0
0

You want to create a custom Gutenberg block that shows a user-editable heading and paragraph. Which two functions must you define to make this block work properly?

hard📝 Application Q15 of 15
Wordpress - Content Management
You want to create a custom Gutenberg block that shows a user-editable heading and paragraph. Which two functions must you define to make this block work properly?
AregisterBlockType and enqueueScripts only
Bedit and save functions to handle editing and saving content
CPHP render callback and CSS styles only
DenqueueScripts and enqueueStyles only
Step-by-Step Solution
Solution:
  1. Step 1: Identify core Gutenberg block functions

    Every block needs an edit function to show editing UI and a save function to define saved content.
  2. Step 2: Compare options with required functions

    edit and save functions to handle editing and saving content correctly lists edit and save. Other options mention scripts or PHP but miss these core functions.
  3. Final Answer:

    edit and save functions to handle editing and saving content -> Option B
  4. Quick Check:

    Blocks need edit + save functions [OK]
Quick Trick: Blocks always need edit and save functions [OK]
Common Mistakes:
  • Thinking only scripts or PHP are enough
  • Forgetting save function
  • Confusing enqueueing scripts with block logic

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes