Create a directory it doesn’t already exist
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 […]
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 […]
zip the plugin folder to a zip file of the same name.
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 […]
Creating a line that is thinner than its parent
Values order: Top Right Bottom Left
Sanitising for HTML from a form POST If server magic quotes is turned on then it will add / before a single and double quotes in the text, so strip them out first: \n new line characters will still be stored as \n (htmlspecialchars() doens’t convert them to <be>). You can convert them now using […]
Check: Make sure your <form> tag has the enctype=”multipart/form-data” attribute Check php.ini for: file_uploads = On, post_max_size = 100M, upload_max_filesize = 100M (Note it’s “M”, not “MB”)You might need to use .htaccess or .user.ini if you are on shared hosting and don’t have access to php.ini.