Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'm going to give you an assignment each Monday that you should complete by Friday, and then I will review over the weekend and send you notes the following Monday, along with the next assignment. Rein will keep an eye on everything and be available to help in any way he can. We'll aim to spend about 25% of your time on these training projects.
- We'll start with basic practice exercises and over the next month or two we'll try and do more exercises that add some value to our products. I'll make each one have clear objectives and be finish-able within a week (10 hours) of your time. If you can't finish the project in that amount of time, still send it to me on Friday and I'll review where you've gotten and provide notes.
- We'll be focusing on efficiency in these projects so try and find the best solution possible in the shortest time possible.
- Wherever possible, try to use and learn more about core WordPress functions, actions, and filters. There are hundreds of them (some more important than others) but it's important to become familiar with the common ones, as we'll use them on most projects we work on.
- FIRST PROJECT - HELLO BAR
- For this project you will be creating a WordPress plugin that displays a "Hello Bar" greeting when people first visit a website. Once you've learned the skills required, you should be able to complete a project like this in one to two hours. I think based on my experience you should be able to finish it within 8. Please track your time as "Hello Bar" under the "Training" project in Toggl.
- What you will be practicing / focusing on:
- WordPress coding standards
- The structure for a basic plugin
- WordPress actions and filters
- Using AJAX in plugins
- Setting cookies in PHP
- Enqueuing scripts and styles
- Creative problem solving
- Debugging
- Commenting
- What to do:
- You'll be building a plugin that creates a "Hello Bar". It should look exactly like the blue bar in the attached mockup.
- The plugin should follow WordPress coding standards and be contained in a single class
- When a user first visits the website, the bar should animate down from the top of the page
- If a user clicks the "X" button, the bar should animate up
- After a user clicks the X button, the bar should no longer be loaded or displayed on the website for that user for the next 30 days (through the use of cookies)
- The plugin should look and behave the same way when installed on different websites with different themes
- Please comment your code and make it easy to read and properly spaced / indented wherever possible.
- Suggested reading:
- https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/
- https://premium.wpmudev.org/blog/adding-scripts-and-styles-wordpress-enqueueing/
- https://codex.wordpress.org/AJAX_in_Plugins
- https://premium.wpmudev.org/blog/set-get-delete-cookies/
- https://codex.wordpress.org/Plugin_API
- https://www.sitepoint.com/how-to-set-get-and-delete-cookies-in-wordpress/
- https://codex.wordpress.org/Writing_a_Plugin
- Please let me know if you have any questions about the objectives. Otherwise I expect you to figure out the solutions to these problems using your own resources. There are multiple correct ways to approach this project, so just Google often, and use your best judgement. Good luck!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement