Overview of how I consolidated multiple plugins into one, and allow the various plugins to be turned on and off as features. Presented at 2017 Kent WordCamp
The Codex of Business Writing Software for Real-World Solutions 2.pptx
One Plugin to Rule All Your Custom Code
1. One plugin toruleall your custom code
Joe Querin – www.joequerin.com
2017 WordCamp Kent
@joequerin joecue
joecue
#wckent
2. { About: Joe }
• Graphic Design major
• Self taught Web Developer for 19+ years
• Currently work full-time at Lorain County
Community College for 18+ years.
• WordPress experience last 6 years
• Recently completed moving our college
website to WordPress, and working on an additional 6-
8.
www.joequerin.com
#wckent @joequerin
3. { History }
• Modular code
– Develop apps in blocks, or modules
• Cleaner admin interface
– Less clutter, central management
#wckent @joequerin
5. { History }
• Admired Jetpack’s layout
• Use common elements from
WordPress to help end users
#wckent @joequerin
6. { Designing a Solution }
• What features are you trying to combine?
• What features should be able to turn on or
off?
• How are the plugins currently constructed?
#wckent @joequerin
7. { Items to Keep in Mind }
• Naming
• Prefix functions
• It still is just a plugin
• It might not be a solution for everyone!
#wckent @joequerin
8. { How it works }
• Base plugin framework
• Utilizes Settings API
• Create a Menu Page
• Create a Settings Section
• Add Settings Fields
• Add logic to check if field is true or false
#wckent @joequerin
9. { Site Specific Plugin Template }
<?php
/*
Plugin Name: Site Plugin for example.com
Description: Site specific code changes for
example.com
*/
/* Start Adding Functions Below this Line */
/* Stop Adding Functions Below this Line */
?>