Categories
IT

Creating Plugins

I have dabbled in the past and created some simple plugins but now i want to really get to grips with this. It really helps to have clear objective so i thought i would create a calender plugin for WordPress. I am going to keep i simple but functional, title, description, start date and time, end data and time, location.

Why a calender, well I have been thinking for a while that i am not happy about the amount of my personal data that i give away in return for tools and given that at least one major organisation is going to move us over to a US based organisation at the end of the month i have decided now is the time to act!

My approach has been to create a couple of very simple apps that work with short codes to add simple tools. The first one i created was a conversion tool using JavaScript, i also created a plugin to display an RSS feed. As part of my learning i have found some amazing resources online and partly for my own reference but also for others i am sharing them here.

To date i have got a new type added using the boiler plate and now i need to make it do some useful stuff.

Update: Its Thursday and i have got the boiler plate doing what i want apart from the fact that it won’t save meta data on save-post! very frustrating but i have loads about debugging! Resources have been added, not that any of it helps as it just not registering my callback

Resources

The handbook and a couple of key pages
https://developer.wordpress.org/plugins/
https://developer.wordpress.org/plugins/security/
https://developer.wordpress.org/plugins/internationalization/

Working with shortcodes. this was great for building quick and dirty plugins that worked with shortcodes, great for getting going.
https://wpshout.com/how-to-create-wordpress-shortcodes/

Step by step using the standard boiler plate
https://scotch.io/tutorials/how-to-build-a-wordpress-plugin-part-1
https://scotch.io/tutorials/how-to-build-a-wordpress-plugin-part-2

Create a custom post type
https://www.elegantthemes.com/blog/tips-tricks/how-to-create-a-wordpress-plugin

Using the boiler plate to add a custom post type. I mostly used #3 as it explains where to put things really well .
https://torquemag.io/2016/08/building-wordpress-plugin/
https://torquemag.io/2016/09/building-a-wordpress-plugin-part-3-setting-up-a-custom-content-type/
https://torquemag.io/2016/09/building-a-wordpress-plugin-part-4-looking-at-displaying-content-via-shortcodes/
https://torquemag.io/2016/09/building-a-wordpress-plugin-part-five/
https://torquemag.io/2016/09/building-wordpress-plugin-part-6/

Unfortunately the camera angle means you cannot read the screen so it is hard to follow. The source code for Chris’ plugin in github https://github.com/slushman/now-hiring

Debugging

Top ways to debug save-post

Wish List

These are a few that i have bookmarked for later reading

using nonces
https://markjaquith.wordpress.com/2006/06/02/wordpress-203-nonces/

localizing
https://urbangiraffe.com/articles/localizing-wordpress-themes-and-plugins

register settings
http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/

Leave a Reply

Your email address will not be published.