You can create the plugin’s codebase from scratch, all in one file or divided over several files.In Unix, it would look like this:ĭescription: short-description-of-what-your-plugin-doesīefore you start coding your plugin, there are a couple of things you should know: To make a plugin, first create a local copy of WordPress on your machine and access your WordPress installation files using FTP or your hosting provider.Ĭreate a directory in the /wp-content/plugins/ folder named after your plugin. This is useful when you need to edit the title or the content of a web page.įor more details, check the WordPress Developer Resources. You can’t add anything to that response, but you can edit the response. Filters allow you to edit the content that WordPress returns upon running some hook.For example, if you want to share your post to social networks when the admin publishes it, you can write an action for that. Actions allow you to execute your own code when a preexisting hook runs in WordPress. Hooks come in two forms: actions and filters. For example, there’s a hook for when a user activates the plugin, another for when the plugin is uninstalled, and so on.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |