Tag: WordPress

  • Filtering Blocks When allowed_block_types_all is a boolean

    If you’re trying to filter which blocks are allowed in the WordPress block editor using allowed_block_types_all but the value is true/false it’s difficult to know what to do. I’ll cover every use case here: If It’s false This means no blocks are allowed. Note that I’ve used empty here so that it also catches empty…

  • Gutenberg Comments

    You might have noticed my comment section looks a little.. blocky.. After my WordCamp Europe talk in Berlin about the block list module, I decided to polish up my examples some more and deploy to production. And so I present, block comments, a prototype of block editor powered comments. https://github.com/tomjn/block-comments FAQ How Does it Work?…

  • Using HTTP2 Push With WordPress

    Taking advantage of HTTP/2 push can bring big improvements to front end performance. This pushes resources to the browser preemptively, avoiding extra requests and waiting time. I’m going to cover how to do this in WordPress. This has made big improvements to page load times, removing connections and waiting times for resources, as well as…

  • Leaflets at WordCamps a PSA

    Want to promote your services? Don’t litter a WordCamp with promotional flyers and leaflets. A lot of people turn up at WordCamps, such as London or Europe, hoping to gain new business contacts or customers. But they don’t talk to people, sponsor, or hand out business cards. Instead they place promotional flyers and leaflets in…

  • How Frontenberg Works

    How does Frontenberg work? I’m going to walk through what I did to build a frontend Gutenberg site, the problems encountered, and the fixes

  • Where Gutenberg Leads Us

    The new editor has the potential to be an amazing experience. While there’s a lot of kinks to be ironed out, there are some less appreciated consequences, that lead to more exciting places! I’m a strong believer that the new Gutenberg editor introduces a landmark shift in WP UX design for WordPress. Similar to the…

  • VIP-VVV

    Mourning the loss of VIP Quickstart? A fan of VVV? Then I have something for you.

  • Writing a WP REST API endpoint in 2 minutes

    I need to write a REST API endpoint, but lets assume we know nothing about REST APIs.

  • What’s New in VVV 2.0

    Varying Vagrant Vagrants ( VVV ) has undergone a small transformation for the better. This post will cover what’s changed and how to make sure your local developer environment isn’t left behind. The New Main Provisioner The fabulous Lorelei Aurora has rewritten the provisioning system for VVV, enabling a slew of new features and improved…

  • The Correct Way to Build Plugins – The Bitter Truth

    What is the correct way to build a WordPress plugin, the official, recommended way that was always intended? The idealised standard? The Problem Plugins are not discrete modules in the WordPress world. Their isolation exists only on the filesystem, but once that code is loaded into memory it shares the same space as Core itself.…

  • Scaling the WP Importer

    Small scale imports are handy, but when sites get large you can run into problems. Normally people fall back to using SQL dumps, but doing this sidesteps hooks, and filters that could be important. Here are some tips on how to make WordPress imports and exports using WXR files easier. The First Major Problem When loading…

  • WordPress and Composer TLDR

    There’s a few questions I’m commonly asked about using composer + WordPress. Here they are in a super short form FAQ: To install a composer project, run: composer install To update a composer project, run: composer update Install WordPress in a folder composer require johnpbloch/wordpress @stable or in your composer.json add: { “require” : { “johnpbloch/wordpress”: “@stable”…

  • Root Composition in WordPress Plugins

    When I build a WordPress plugin, I use several methods to structure things that help me greatly, all of which stem from root composition. I’m going to expand on what that is and how I use it. Every plugin has a root file that contains the plugin header comment, and gets loaded by WordPress. This…

  • Escaping the Unsecure

    Part of my job at WordPress VIP is review. It takes up a lot of my time, and it’s critical work. Before code reaches our servers it needs to be vetted and peer reviewed to vouch that it’s fast, safe, and secure. Every developer makes mistakes ( even VIP developers ), so we peer review…

  • ___ without a plugin

    How do I do ___ without a plugin? The answer is to remove the comment at the top of the plugin, and it’s no longer a plugin.

  • Admin Colour Schemes

    I’ve built two Admin Colour schemes for WordPress. Both are based initially off of the themergency theme generator, but with extensive changes. Notably the split colours of the admin menu and the admin bar. I’ve also accounted for form highlights, selection, checkboxes, and the progress bar on videos. The first is called Tangerine: The second…

  • Theme Composition vs Frameworks

    For a long time, theme frameworks have been the primary alternative to building things from scratch in WordPress, and to a lesser extent, starter themes. There is a better way. Starter Themes & Frameworks Starter themes work on the paradigm of adding and replacing. You’re given a theme that represents the ‘halfway’ mark and add…

  • WordPress Bash Magic

    I’ve been doing a lot of bash scripting with WordPress, especially with WP CLI. Here are some snippets I found useful. All my scripts assume a standard wp-config.php with DEFINE() statements and no unusual logic structures. A rogue constant with the name DB_NAME may throw things off without some modification. Getting the Database table prefix If you…