Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirements for oik-shortcodes-a2z #1

Closed
bobbingwide opened this issue Feb 6, 2017 · 2 comments
Closed

Requirements for oik-shortcodes-a2z #1

bobbingwide opened this issue Feb 6, 2017 · 2 comments

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Feb 6, 2017

The oik shortcode and API server (oik-shortcode plugin) allows you to create documentation for WordPress core, plugins and themes; functions, classes, shortcodes and files.

When there's a lot of content pagination by page number is pretty much hit and miss.

The oik-shortcodes-a2z plugin extends the server with A to Z pagination provided through a letter taxonomy that extends the oik-a2z plugin to set a different letter taxonomy for APIs.

Requirement

  • New API letter taxonomy - oik_letters ( Label "API Letters" )
  • Taxonomy associated with post types as in table below
  • Filter function to set the api_letters terms
  • Theme changes to improve the display and selection by API letter

Proposed solution

Post type Letter taxonomy Filter function
oik-plugins letters oik_a2z_first_letter
oik-themes letters oik_a2z_first_letter
oik_api oik_letters oik_shortcodes_a2z_first_letters
oik_class oik_letters oik_shortcodes_a2z_first_letters
oik_file oik_letters oik_shortcodes_a2z_first_letters
oik_hook oik_letters oik_shortcodes_a2z_first_letters
oik_sc_param oik_letters oik_shortcodes_a2z_first_letters
oik_shortcodes oik_letters oik_shortcodes_a2z_first_letters
shortcode_example oik_letters oik_shortcodes-a2z_first_letters

oik_shortcodes_a2z_first_letters() needs to take into account the formatting of the titles for each of the post types.

Post type Title format
oik_api Function() - summary or Class::Method() - summary
oik_class Class - Summary
oik_file path/file-name.php
oik_hook hook - action/filter
oik_sc_param shortcode parm parameter
oik_shortcodes shortcode - Summary
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 24, 2019

Following WordPress 5.0 and the introduction of the Block editor ( Gutenberg plugin ) we now need to add support for new CPTs block and block_example.
We'll also change / correct the letter taxonomy for oik_shortcodes and shortcode_example

Post type Letter taxonomy Filter function
block letters oik_a2z_first_letter
block_example letters oik_a2z_first_letter
oik_shortcodes letters oik_a2z_first_letter
shortcode_example letters oik_a2z_first_letter

Originally I thought I'd use oik_shortcodes_a2z_first_letters and therefore would have had to change the function to into account the formatting of the titles for each of the post types.
But now I've decided to use the letter taxonomy so that filter function won't really need changing.
... we'll change it anyway.

Post type Title format
block Block name - block_type_name
block_example Block name - additional example title

@bobbingwide
Copy link
Owner Author

Another change of plan for blocks and block examples.

Post type Letter taxonomy Filter function Title format
block block_letters oik_shortcodes_a2z_block_letters Block name - block_type_name
block_example block_letters oik_shortcodes_a2z_block_letters Block name etc etc

oik_shortcodes_a2z_block_letters() will return the first letters of up to 5 words in the post title ignoring the namespace part of the block_type_name.
If the post title is not set the Block letter will be _.
An unplanned side effect that has its uses in locating badly documented blocks and block examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant