At this point, refresh the plugin and you should be able to click on the input element and see something like this:

Pretty cool, isn't it? Notice that when you select a date it will automatically apply the date to the input element. If you're interested in customizing the date format (or other aspects of the date picker) even more, be sure to check out its API docs.

5. Display the Date on the Post

At this point, we're ready to display the date on the actual post. For the purpose of our plugin, we're going to be prepending this to the content.

To do this, define the following hook in the constructor of your plugin:

add_action( 'the_content', array( $this, 'prepend_the_date' ) );

Next, we need to actually define the function. It's really simple, though. Check it out, then I'll explain it after the code snippet:

In this function, we're checking the post meta data for the current post. Since this function fires within the context of The Loop, we're able to use get_the_ID().

If the date string - that is, the post meta keyed by the_date - isn't empty, then we'll wrap it in a paragraph tag and prepend it to the $content; otherwise, we just return the $content as it is.

6. Prepare the Plugin for Release

At this point, there's only two things left to do:

Provide the localization file for translation

Create the README.

Creating the localization file is simple. Since we defined the plugin.po file in the first article, all that we need to do is open the file with Poedit, click 'Update', then save the file. This will generate a plugin.mo file in the lang directory.

Next, we need to create a README file that follows the WordPress Readme conventions. Though you can be as creative as you like, I've shared mine below.