wordpress

  • A theme.json schema check in CI

    A typo in a theme.json key is silently ignored, which means a setting that does nothing looks exactly like a setting that works. The published schema is versioned…

  • useBlockProps applies the class the editor expects

    API version 2 moves the block wrapper from the editor into the block, which means the editor markup and the front-end markup can finally match. Forgetting the call…

  • wp_safe_remote_get, and the SSRF you did not consider

    wp_remote_get fetches any URL it is given, including one on the local network, and the safe variant blocks private ranges. The attack is a URL parameter pointing at…

  • A block theme is a directory of HTML files

    5.9 on 25 January, and templates/ replaces the template hierarchy. A theme with 41 PHP templates and an editor that cannot see any of them.

  • blockGap, and the margin you stopped writing

    Vertical spacing between blocks moves from a stylesheet rule to a setting, which is a better mechanism and a large diff. Setting blockGap to false disables the control…

  • index.html is the only required template

    A block theme needs style.css, templates/index.html and nothing else, which makes the minimum viable theme three files. The fallback to index.html is total rather than partial, so a…

  • theme.json v2 renamed the keys you just learned

    Version 2 arrives with 5.9, six months after version 1, and moves several keys — a file written in 2021 needs migrating. The customTemplates and templateParts sections are…

  • templates/ and parts/ replace the template hierarchy

    5.9 on 25 January makes a theme a directory of HTML files, and the PHP template hierarchy stops being how a page is chosen. The naming still follows…

  • A hybrid theme keeps PHP templates and gains theme.json

    A classic theme can add theme.json without becoming a block theme, which is the migration path for an existing site. The flip is abrupt: creating templates/index.html makes WordPress…

  • A block template is an HTML file with block comments

    The file contains block markup, which is HTML with comments that carry the block name and its attributes, and nothing else. A self-closing block comment is a dynamic…