PHP Autoloading and WordPress Plugins

PHP Class Loading and WordPress Plugins

/ PHP, Wordpress / by Paul Robinson / 4 Comments

WordPress plugin development can be an absolute pain. That’s right. I said it. Coding plugins for clients and keeping that code neat and tidy can be a nightmare. The best way to write your code (in most cases) to prevent conflicts and keep code together is to use classes. Obviously you should use your best judgement as to if the […]

Read more

Image Uploads Using Laravel 5.4 With Vue: Part 2

/ PHP / by Paul Robinson / 0 comments

When we last left our image upload application in part 1 we had created a working image uploader, but it could still be improved. In this second part we are going to look at improving the application by adding in thumbnailing and moving our image listing into a separate page. Vue Router To start off we will install Vue Router. […]

Read more

Image Uploads Using Laravel 5.4 With VueJS

/ PHP / by Paul Robinson / 10 Comments

It’s been a little while since I made a ‘proper’ tutorial so I have decided to put this one together in the hopes that it helps those starting out with Laravel and Vue. I assume you have basic knowledge of HTML & CSS, plus I assume you have at least had a quick perusal of the Laravel Documentation and Vue […]

Read more

Adding Content To Yoast SEO Analysis Using YoastSEOJS

/ Javascript, PHP, Wordpress / by Paul Robinson / 18 Comments

I recently received a request from a previous client asking if I could debug why their custom field content had stopped being analysed by their Yoast SEO plugin. It turns out they had updated the plugin and Yoast made a breaking change in regards to adding content to be analysed. To quote Yoast directly: In the upcoming 3.0 release of […]

Read more

Fill MySQL Table With Data From CSV

/ PHP / by Paul Robinson / 0 comments

It’s probably been in every PHP ‘test’ going and is a very commonly asked question, but it’s something I’ve never covered here at Return True before. So what exactly is the best way to insert data into a MySQL table from a CSV file? Well I can’t say these are the best ways, but here are two ways I’ve come […]

Read more

Creating A WordPress Plugin With Composer and the Mailgun API

/ PHP / by Paul Robinson / 2 Comments

Composer is an extremely powerful tool for PHP developers and I love it, but how about when you are building a WordPress plugin? WordPress has a lot of built in features but having access to the massive library of packages available on sites like Packagist is amazing, so the question is how do you use Composer along with WordPress? Prerequisites […]

Read more

Uploading Directly To Amazon S3 From Your Laravel 5 Application

/ PHP / by Paul Robinson / 30 Comments

So you have your killer new application planned out in Laravel, you get everything working with local uploads for that fancy image feature you need. Then bummer, you realize something. With a lot of hosts now shifting to SSD technology they are no longer offering unlimited hosting space. What about if you use something like Digital Ocean who only offer […]

Read more

Using Composer To Stop Reinventing The Wheel

/ PHP / by Paul Robinson / 0 comments

Let’s say you are developing a cool web application in PHP. Maybe it’s a cool, but very simple gallery. You build out your album system, then suddenly you hit a seemingly small issue. You need slugs for the URL. Google hates generic IDs, so better use a slug derived from the album title. Fine, let’s just do a str_replace(‘ ‘, […]

Read more

Simple Website with Silex and Twig: Adding Form Validation

/ PHP / by Paul Robinson / 4 Comments

In that last part of our tutorial we looked at how to add Swiftmailer to the contact form of our simple Silex website. This time we are going to look at how to finish things off by using the Form Builder, adding CSRF protection and moving our Silex install to a more secure location. If you haven’t followed the first […]

Read more

Reorder A Numerically Keyed Array Using Array Splice?

/ PHP / by Paul Robinson / 3 Comments

So today I was given an interesting task by a client. I had the output of a certain function. That function returns an array containing the days of the week (via numeric key, 0 = Sunday, 1 = Monday, etc). The value of each key was an array containing data. Something like this:

Using shorthand array syntax here & […]

Read more

I'll keep your WordPress site up-to-date and working to its best.

Find out more