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: Pagination by letter #1

Open
bobbingwide opened this issue Sep 8, 2016 · 6 comments
Open

Requirements for: Pagination by letter #1

bobbingwide opened this issue Sep 8, 2016 · 6 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Sep 8, 2016

These are some of the requirements for the Pagination by letter plugin, taken from the first draft of the plugin, dated 27th July 2016.

  • Automatically sets the value for the identified first letter taxonomies using extendable rules
  • Provides a category page with selectable letters
  • Taxonomies can be associated to any post type
  • Batch population of letter category
  • Initialisation of the letter terms - A ... Z, -, ?, #

Assumptions

  • Expected to be implemented as taxonomies rather than categories
  • Extendable rules will enable plugins to implement filters to choose the 'letter term' to which the post is associated.
  • Multiple letter categories will be allowed per post type.

Requirements

for WP-a2z

  • Letter taxonomy for APIs, Classes, Files and Hooks
  • using a flexible approach to choosing the first letter after the identifying prefix(es) in the post's identifier

for bigram.co.uk

Letter taxonomies:

  • s-letter for S-words - choosing the second letter from the s-word taxonomy
  • b-letter for B-words - choosing the second letter from the b-word taxonomy
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 29, 2017

For others sites where we want to support simple A to Z pagination in addition to numeric page pagination .... e.g. bobbingwidewebdesign.com, oik-plugins.com we need an action hook to display the selection list for the selected letter taxonomy.
The action hook will be oik_a2z_display, taking two parameters $taxonomy and $url

In a Genesis framework child theme we'd hook into an action such as genesis_after_endwhile

@bobbingwide
Copy link
Owner Author

To reduce confusion with letter pagination and numeric page pagination we need to ensure that we group all first letter digits 0..9 as #.

bobbingwide added a commit that referenced this issue Jan 29, 2017
bobbingwide added a commit that referenced this issue Jan 29, 2017
@bobbingwide
Copy link
Owner Author

The currently selected taxonomy term should be highlighted in a similar manner to the pagination links.
i.e. the list item of the active link should have additional CSS classes "active current".

@bobbingwide
Copy link
Owner Author

Note: The basic requirements have now been implemented such that the logic can be used in a Genesis child theme.

I won't close this issue just yet since:

  • PHPUnit tests have not been developed,
  • the batch facility requires oik-batch,
  • the solution for WP-a2z has not yet been developed
  • the solution for bigram uses its own custom code
  • the solution lends itself to implementation using a shortcode and a widget

@bobbingwide
Copy link
Owner Author

Updated requirements - 17 Feb 2017

  • Automatically sets the value for the identified first letter taxonomies using extendable rules
  • Provides a taxonomy page with selectable letters
  • Taxonomies can be associated to any post type
  • Batch population of letter category
  • Initialisation of the letter terms - A ... Z, -, ?, #
  • Filtering of the terms by selected post type
  • [bw_terms] shortcode for use in text widgets.

Assumptions

  • Expected to be implemented as taxonomies rather than categories
  • Extendable rules will enable plugins to implement filters to choose the 'letter term' to which the post is associated.
  • Multiple letter categories will be allowed per post type.
  • Multiple terms may be set for each taxonomy.

Requirements

for WP-a2z, oik-plugins and similar sites

  • API Letters taxonomy for APIs, Classes, Files and Hooks
  • API Letters allows multiple terms from the title
  • Letter(s) taxonomy for posts, oik-plugins, oik-themes, oik_shortcodes etc
  • Letter taxonomy only has one value per post.

For bigram.co.uk

Requirements unchanged

@bobbingwide
Copy link
Owner Author

bobbingwide commented Feb 19, 2017

The code must also work with PHP 7.1. Need to correct logic in the filter function oik_a2z_first_letter that attempts to convert a string parameter to an array. It needs to return an array.

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