wordpress plugin development
TRANSCRIPT
Plugin Development
A peek into the world of WordPress plugin development
Rakesh Lawaju Abiral Neupane Regan Khadgi
WordCamp Nepal 2015
WordPress plugin & it’s usages?WordPress plugins are bits of software that can be uploaded to extend and expand the functionality of your WordPress site.
- Register post type & taxonomy
- Shortcodes
- Ecommerce feature
- Sliders and gallery
- and many more
Let’s startDraw roadmap
Think outside the box
Get a unique name
Files and folder structure
Coding standard
Custom tables?
Don’t forget about security
Extensibility
Translation ready
Draw roadmapFailing to plan is planning to fail.
Images Designed by Freepik
Think outside the boxGive user some unique feature because there are almost 50000 plugins in WordPress.org
Get a unique nameBecause the name matters.
Files and folder structureKeep it simple, keep it clean
A plugin can a single .php file or it can be a folder with its main file and other additional required files and folder
Coding standardThere are some rules, it's good to follow.
- Single and Double Quotes
- Indentation
- Brace Style
- No Shorthand PHP Tags
- Space Usagehttps://codex.wordpress.org/WordPress_Coding_Standards
Custom tables?Think before you add custom tables.
Try to use default WordPress database table, as it might be enough to manage your data. So that you won't have to create extra methods to manage data.
Don’t forget about security- Validating and sanitizing is must when user submits data to
WordPress, data is imported from an external feed, or data comes into WordPress
- To prevent issues like Cross-site scripting (XSS) make sure that output are escaped like post title, post meta value, or some other data from the database
- Prevent an unauthorized person from changing your plugin’s settings or performing actions they are not authorized to perform. WordPress offers two ways: nonces and capability checks.
Image from https://pixabay.com/p-538715/
ExtensibilityPlugin should allow developers to easily tie their own code.
Translation readyDon't lose your potential user
How you are offering your plugin?After you have successfully developed a plugin it can be offered in many ways to the users. Some of them are:
- Free
- Freemium
- Premium
The sky's the limitand let’s give back to community
Hope you found it useful Thank you!