Creating a plugin inside a namespace By using a namespace, everything inside the namespace does not need globally unique naming prefixes, solving clashing issues with other plugins, themes and wordpress itself. Using a namespace is much simpler than using a class for your plugin. Add all your php files to the namespace Add this to […]
Category: Create Your Own Plugin
Database(1)
Update Plugin(2)
Plugin class
Creating a plugin inside a class By using a class, everything inside the class does not need globally unique naming prefixes, solving clashing issues with other plugins, themes and wordpress itself. BUT, in PHP a class has to be contained in a single file, you can’t split a class across multiple files. You can create […]
Plugin hooks
Plugin activated
Distribute Your Plugin
zip the plugin folder, including the root folder named as your plugin. The name of your zip can be anything, but is typically the name of your plugin too, possibly with a version number at the end if you want that..
.Create New Plugin
The basics Decide on a name for your plugin, this must be globally unique. Create a folder in the wp-content/plugins/ directory using your plugin name.Use lowercase and replace any spaces with hyphens. Create a file in the folder with the exact same name as your plugin folder, with the “.php” extension.This is the master file […]
Resources For Plugin Creation
Guides WordPress Plugin Handbook https://codex.wordpress.org/Writing_a_Plugin