Developing a post attachments plugin
In the two preceding sections, we discussed the steps for building a basic plugin and the life cycle events. In this section, we will be developing a plugin, while covering the implementation of life cycle events and critical features in plugin development. Let's summarize the requirement of the plugin.
Â
The use of blog posts and displaying dynamic content after the post is common in most WordPress sites. We already looked at the process of adding content after the post, in the first plugin we developed. Now, we are going to extend the feature to allow attachment downloads after the post. In some sites, it's essential to allow users to download files related to the post. This plugin will allow the administrator to add files to a post from the backend and let users download these files by displaying them after the post's content.
Let's start the development of our plugin by creating a new directory called wpquick-post-attachments
inside the wp-content/plugins...