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

Revisit the Taxonomy List widget #1187

Merged
merged 16 commits into from
Mar 31, 2016
Merged

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Mar 31, 2016

Changes

  • Remove option to include only chosen terms
  • Include ability to exclude chosen terms from returned terms
  • Remove ability to output infinite terms, number output must be set and defaults to 5
  • Make the taxonomies option a select instead of a text field, preventing empty-taxonomy error
  • Creates two sort options:
    • alphabetically by term name
    • newest term first, by descending order of term id (proxy for most-recently-updated)
  • Improve docs in the widget's settings
  • Add docs in docs/users/sidebarswidgets.rst
  • Fixes enqueues for the post-type and series taxonomies: Revisit the Taxonomy List widget #1171 (comment) (the previous behavior would register the inactive taxonomies without any labels, leading to spare "tag" labels in taxonomy listings.)

screen shot 2016-03-16 at 11 56 42 pm

## Why

Widget rewrites: to make this widget simpler and more user-friendly. For HELPDESK-589.

Taxonomy registration rewrite: The old method of registering the post-type and series was to, if the theme option to register the taxonomy was not active, register them with empty labels and various amounts of 'hiddenness' based on the registration args. This was causing the inactive taxonomies to appear in an earlier version of this pull request with default "Tag" labels: #1173. The fix for this was to instead always register those taxonomies, but if they were not enabled in the theme options, to register them with the arguments public, show_admin_column and show_in_nav_menus set to false.

What else?

This does not include the option to sort by last-updated; WordPress does not provide this option. 😞

@benlk benlk added type: bug type: improvement priority: normal Must be completed before release of this version of plugin. labels Mar 31, 2016
@benlk benlk added this to the 0.5.5 - Story Elements milestone Mar 31, 2016
@benlk
Copy link
Collaborator Author

benlk commented Mar 31, 2016

Filed as a bug PR because of #1173, improvement because of the helpdesk ticket that started this.

@aschweigert
Copy link

is that screenshot current? I'd like to remove all the extra inline docs because I think that's overkill if so

@benlk
Copy link
Collaborator Author

benlk commented Mar 31, 2016

It's not, my bad. That came from the last PR.

This is the current amount of docs:

screen shot 2016-03-31 at 4 28 50 pm

case 'series':
$this->render_series_list($tax_items, $instance);
$this->render_series_list( $tax_items, $instance );
break;
case 'category':

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems unnecessary, shouldn't we just use an if/else here to use the one function for series and the other function for everything else?

@aschweigert aschweigert assigned benlk and unassigned rnagle Mar 31, 2016
@aschweigert aschweigert merged commit 76bf5ce into develop Mar 31, 2016
@aschweigert aschweigert deleted the HELPDESK-589-tax-list-widget-redo branch September 21, 2016 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal Must be completed before release of this version of plugin. type: bug type: improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants