Author: the404hub
WordPress Actions Vs Filters
Both actions and filters are WordPress hooks that allow you to hook into certain code within WordPress core or a plugin. Actions allow you to add code at a point where WordPress, a plugin or your own custom action is doing something. There will need to be a do_action called so that you can hook… Continue reading WordPress Actions Vs Filters
PHP Arrow Functions
Arrow functions were introduced in PHP 7.4 making them similar to JavaScript’s arrow functions. See how $y is scoped on both functions.
Getting started with Vim
Here is a list of the most useful commands to get started with Vim
React build: open local index file in browser
If you tried to open the index.html file of the build folder of your React project and it doesn’t work, it’s because by default it’s trying to load files through your system root. Adding the following line to your package.json will allow you to open the file locally after rebuilding. “homepage”:”.”,
WordPress TinyMCE no visual tab
Check that your user profile has the rich_editing meta_key. My issue was the user was added through the database so even though Disable the visual editor when writing looked unchecked it wasn’t saved to the database. Going into Edit Profile and saving solved the issue
Fixing WordPress 5.5 issues
You may have noticed issues with websites after upgrading to WordPress 5.5. In this version WordPress stopped using jQuery Migrate which was being used to bridge outdated code in themes and plugins.
Windows 10 Stuck in Automatic Repair
My Dell XPS crashed with the following errors First this: Stop code: SYSTEM SERVICE EXCEPTION Then this after a restart: Stop code: DRIVER_IRQL_NOT_LESS_OR_EQUALWhat failed: nwifi.sys It looked like automatic updates were happening as the computer crashed. After extensive Googling of the above errors, trying to start in safe mode but Automatic Repair kept repeating in… Continue reading Windows 10 Stuck in Automatic Repair
Opencart 1.5.6.1 FATAL error when saving settings
There is an issue that occurs when updating areas in the admin and experiencing a 500 error. As a result of the error, some items in the database are deleted. In the below function which updates the database with the settings on save. The problem is that it doesn’t actually “UPDATE”. It first deletes the… Continue reading Opencart 1.5.6.1 FATAL error when saving settings
Cloudflare DNS is not authoritative for zone
Problem: When changing namservers on a registrar to Cloudflare error shows “cloudflare dns is not authoritative for zone” This is usually caused when there are two Cloudflare accounts set-up for the one domain. Removing one account and re-trying the nameserver change usually solves this.