How to efficiently rename PHP namespace without breaking backward compatibility
Recently, we came across a problem, while developing a new version of the Notification plugin. We wanted to tidy up our codebase and one of the tasks was to rename some of the namespaces. But how to do it without copying the classes?
How to schedule WordPress Cron to run on a specific date
WordPress Cron is pretty basic and doesn’t allow for much configuration in terms of schedules. By default, you can run your events with a specific interval, like daily, weekly, or monthly (or with intervals of any amount of seconds, really). There is a tricky way to run your event on a specific hour, day of […]
How to Ensure your WordPress Website Stays Safe in 8 Easy Steps
In today’s online world, your WordPress website isn’t just a spot on the internet. It’s the face of what you do, whether that’s your business, sharing ideas, or showing off your brand. Now, here’s something to think about: every month, thousands of websites get hacked. And it’s not just the big names – even smaller […]
JavaScript Fetch with Basic Auth
Sometimes it is necessary to use fetch from a server secured with basic auth (very often in case of staging domains), usually, the authorization is done by login and password included within the URL itself: JavaScript may seem pretty obvious: But in case of fetch this is not allowed and will result in an error: […]
Prevent element wiggle effect while animating in Chrome
Sometimes Chrome doesn’t render the animations properly causing weird, unexpected transformations, like this: The solution is simple with one CSS property. Kudos to Tomasz Adamowicz for finding this fix.
Filter your action – WordPress hooks collision
Did you know that actions and filters are the same things in WordPress? Because of that, you can filter the action and vice versa. Let me show you an example of this conflict.
Our first free WordPress theme – Pierogi
We are pretty proficient at writing plugins and have a bunch of them. Now it’s time for a theme! Ladies and Gentlemen, I present to you our first free WordPress theme – Pierogi.
How to run PHPUnit with a database via GitHub Actions
As of March 2020, GitHub seems to remove the default MySQL installation from its ubuntu-latest container. Now it’s required to set up the database service in order to use it.
Micropackages – reusable packages for faster development
We at BracketSpace write a lot of code. And the best part is that a lot of this code is the same for each project. We used to copy&paste or create boilerplates like starter themes or plugins to make the work a bit faster and more standardized. Until we came up with Micropackages. What the […]
Close unclosed HTML tags in PHP
Recently I stumped upon a handy WordPress function which closes HTML tags.
How to fix a broken serialization
Fixing database serialization issues and recovering corrupted serialized string
How to access the WordPress admin without password
Logging in as an administrator, the easy way with a short snippet. Site files access required.