Plugin namespace

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 […]

Read More

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 […]

Read More

.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 […]

Read More