Dev Night Timeline: 4 hrs work, .75 hours fun. 12 hours dev time
- 5:30 — eat some dinner, drink some beers, unwind a bit. Crack knuckles.
- 6:00 — get started on tasks.
- 7:45 — break for frisbee, or whatever.
- 8:00 — get back to it.
- 10:15 — go home.
Before we start coding, you’ll need to do the following:
- Install VVV & VV for faster local environment setup.
- Set up a local environment named “search-plugin” using VV.
- Import the theme unit test data from Automattic.
- Pull down the plugin repo from Bitbucket (that I will create soon…)
Back-End PHP (Sam)
- Build the User-Generated Content Array. See Data Structure for more details.
- General plugin setup using The WordPress Plugin Boilerplate.
- Set up action to update the User-Generated Content Array, which will run on save for any piece of user-generated content, including posts, taxonomy terms, media items, etc.
- Cache the User-Generated Content Array using WordPress transients.
- Create JSON array of basic WordPress Admin Actions. See Data Structure for more details.
- Create a) a keyboard shortcut and b) a link that trigger the search modal.
- In general, append matches to the search modal with the following structure:
- Keep matches separated by content type. Begin with the current content type if possible.
- Include a sub-head for the content type to separate the matches. This subheading should ideally be selectable as well, and include the Dashicon if possible.
- Matches from the User-Generated Content array should be a link to the Edit Screen, selectable by the mouse, or by the keyboard arrows and return key.
- Matches from the Admin Pages array will be kept separate under a “Admin Pages” subheading.
- Matches from the Actions Array will be kept separate under an “Admin Actions” subheading. A match selected from this array will use the trigger type of the matched object on that object’s selector.
Front-End HTML/CSS Tasks (Josh)
- Create JSON array of WordPress Admin Pages using get_post_types for starters — cache and clear on activated_plugin, deactivated_plugin, and generate_rewrite_rules. It might be best to follow the $GLOBALS[‘menu’] variable. See Data Structure for more details.
- Create a settings page that allows users to opt-out of specific content types.
- Create UI for search field and style results.
User-Generated Content Array
- Object Type (post type, taxonomy term, etc)
- Object Name (post, page, category, nav menu item, etc)
- URL (if it saves us processing speed)
WordPress Admin Pages Array
- Object Type
- Object Name
- Dashicon (if a top-level admin page)
WordPress Admin Actions Array
- Target Selector (i.e., input[type=”submit”]#publish)
- Trigger type (i.e., click, focus, etc.)