Skip to content

Instantly share code, notes, and snippets.

View GLWalker's full-sized avatar
🤠

G.L.Walker GLWalker

🤠
View GitHub Profile

In WordPress Gutenberg, the interface is also organized into distinct panels and work areas, following a similar philosophy to Figma in terms of functionality and workflow. Here's how the Gutenberg panels can be categorized:


1. Canvas Area

  • Purpose: The main content editing area where users create and arrange blocks.
  • Elements:
    • Editable content blocks (e.g., paragraphs, headings, images, etc.).
    • Drag-and-drop functionality for reordering blocks.
  • Real-time WYSIWYG (What You See Is What You Get) editing.
@GLWalker
GLWalker / functions.php
Created January 9, 2024 03:15 — forked from jmccall75/functions.php
Locking down Gutenberg...
<?php
/**
* Gutenberg Block customization for this theme.
*/
// gutenberg disable for posts
//add_filter('use_block_editor_for_post', '__return_false', 10);
// gutenberg disable for post types
//add_filter('use_block_editor_for_post_type', '__return_false', 10);
@GLWalker
GLWalker / get-color-values-from-theme-json.php
Created November 8, 2023 06:43 — forked from sethrubenstein/get-color-values-from-theme-json.php
Provides an example of how to extract your color palette from a theme.json file and create styles dynamically.
<?php
function generate_css_from_theme_settings() {
if ( !function_exists('wp_get_global_settings') ) {
return new WP_Error('missing_function', 'wp_get_global_settings() is missing');
}
$colors = wp_get_global_settings();
$colors = $colors['color']['palette']['theme'];