Well, it’s time to test what you have learned from this course so far. If you face any difficulties, feel free to go back to the previous topics and learn them once again. It will only make you a better developer.
Create a plugin named WP Book (wp-book). Upon activation, it should do the following things –
- Create a custom post type Book
- Create a custom hierarchical taxonomy Book Category
- Create a custom non-hierarchical taxonomy Book Tag
- Create a custom meta box to save book meta information like Author Name, Price, Publisher, Year, Edition, URL, etc.
- Create custom meta table and save all book meta information in that table (See how to extend Metadata API).
- Create a custom admin settings page for Book. Settings option should contain options for changing currency, number of books displayed per page, etc. Settings menu should be displayed under the Books menu.
- Create a shortcode [book] to display the book(s) information. Shortcode attributes should be id, author_name, year, category, tag, and publisher.
- Create a custom widget to display books of selected category in the sidebar.
- Create a custom dashboard widget which shows the top 5 book categories (based on count).
By the way, don’t forget to internationalize the plugin.
You can get started by creating a new repo on Github for this assignment and doing separate commits for each subtask. You can also create your own plugin folder structure or you can use the WordPress Plugin Boilerplate Generator. Also, check out this GitHub repo DevinVinson/WordPress Plugin Boilerplate.