
This is what we are going to build, ready ?
Get to know a little of who I am and you can also check my LinkedIn profile at:
linkedin.com/in/jo%C3%A3o-dessain-saraiva-87384129/
These plugins were written to address real life projects needs, they are currently in production and available at the WordPress repository:
Json reader: https://wordpress.org/plugins/json-reader/
Uses shortcodes to easily display data from a Json feed, the user can filter the data using the key parameter.
Login with QR: https://pt.wordpress.org/plugins/login-with-qr/
Allows users to login into their account with a QR code link, users must have a specific role for this permission.
Block used images: https://wordpress.org/plugins/block-used-images/
Check if the user is uploading an already used image into a new event.
Plugins are used to solve problems and add new features.
Get to know the code editors: one is free and the other is paid.
Download Vagrant: www.vagrantup.com/downloads.html
Download Virtualbox: https://www.virtualbox.org/wiki/Downloads
Download GIT: https://git-scm.com/download/win
Vagrant Press: https://github.com/vagrantpress/vagrantpress
Vagrant manager: http://vagrantmanager.com/
To create a new virtual machine open the terminal, go to your website's folder and run:
git clone https://github.com/vagrantpress/vagrantpress new-website
Once it’s done open the website and run: vagrant up
This way all the files are downloaded, and the installation is good to go.
Your website should be running at vagrantpress.dev
To log in to the local Wordpress installation the username is admin, the password is vagrant.
Get to know this plugin, and how it can make your live easier displaying JSON data feeds via shortcode.
Same method for mostly every plugin available.
Our plugin is called via shortcode, this means that the user just need to write [jsonReader src=”URL”] at WordPress text editor to get the data feed.
Json file content
{
"id": 1,
"name": "A green door",
"price": 12.50,
"tags": ["home", "green"]
}Data is flowing but we need to clean and filter it
If you got lost at some point or are spending too much time to find that little typo feel free to copy and paste the source code.
This plugin wasn’t fully written by me.
It’s a mix of two plugins:
QR user login plugin - https://github.com/acasado86/qr-user-login
Autologin Links - http://www.craftware.nl/wordpress-autologin/
That results in a plugin that works in every website.
The other plugins are open source, we’ll keep the same licensing and indicate the authors names on the description.
/*
Plugin Name: Login with QR
Description: Allow users to login using a link (QR code).
Version: 1.0.0
Author: DessainSaraiva
Author URI: https://github.com/jdsaraiva
License: GPLv2
This plugin uses code from:
QR user login plugin - https://github.com/acasado86/qr-user-login
acasado
Autologin Links - http://www.craftware.nl/wordpress-autologin/
Paul Konstantin Gerke
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
Let’s get the working part inside our plugin and make it roar!
As we saw at the beginning of this course the initial version of the plugin did not work on the server.
Let’s compress the one we modified, upload and try it,
This plugin appeared as a suggestion of a client that said: it would be awesome if the event managers couldn't use images that were currently in use. Some days later this function was implemented on the website, happy customer.
Like JSON reader this plugin will be fully written by us.
Run a function when the user saves the event, check the data and block it if needed
We are using transients to show the warning message
Obrigado, thank you, gracias, merci, etc…
You might already have some WordPress knowledge but your clients are starting to ask for specific website features that WordPress doesn’t have by default and there's no plugin for it.
You are not going the stop your projects or deny others because you have not yet acquired the skills, please don’t get me wrong: you are not going to became a WordPress development plugin guru just by watching this course.
However, I am going to show you how I developped 3 WordPress official plugins from 0 to production and publication at the WordPress official plugins repository.
These 3 plugins address real live problems, such as a user login via QR code, JSON feed reader and check if the user is uploading an event picture that’s currently in use. Notice that the subjects are user roles, fetch external data and compare data that your WordPress site currently has - main subjects regarding WordPress development.
If you want to learn how real live productions plugins are made, improve your WordPress skills and learn the know how of someone that does this for more than five years on a daily base you are on the right place, hope to see you on the course.
50% discount voucher available with the code: NEWSITE
This course is constantly reviewed and updated with new lessons.