Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#42707 closed enhancement (fixed)

Show taxonomy visibility information in the REST API

Reported by: pento's profile pento Owned by: joehoyle's profile joehoyle
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch
Focuses: rest-api Cc:

Description

In order to determine whether to show the meta box for a taxonomy, Gutenberg needs to know its show_ui setting.

While we're adding that, lets expose all of the visibility settings.

Attachments (4)

42707.diff (3.4 KB) - added by pento 7 years ago.
42707.2.diff (5.0 KB) - added by joehoyle 7 years ago.
42707.3.diff (766 bytes) - added by danielbachhuber 7 years ago.
42707.4.diff (3.1 KB) - added by danielbachhuber 6 years ago.

Download all attachments as: .zip

Change History (19)

@pento
7 years ago

#2 @TimothyBlynJacobs
7 years ago

I don't think the context conditional is required there, it should be stripped out of non edit contexts by the controller in filter_response_by_context().

@joehoyle
7 years ago

#3 @joehoyle
7 years ago

Added a clean patch and also added JSON Schema for the visibility properties, description taken from the WP documentation.

#4 @joehoyle
7 years ago

  • Owner set to joehoyle
  • Status changed from new to assigned

#5 @omarreiss
7 years ago

Anything blocking this from being committed?

#6 @pento
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 42729:

REST API: Show taxonomy visibility settings.

For Gutenberg and other admin-type interfaces, it's useful to be able to see the visibility settings for taxonomies.

Props joehoyle, pento.
Fixes #42707.

#7 @TimothyBlynJacobs
7 years ago

Strings aren't translated?

#8 @pento
7 years ago

  • Keywords has-patch has-unit-tests removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Whee!

#9 @pento
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 42730:

REST API: Translate the taxonomy visibility description strings.

This was missed in [42729].

Props TimothyBlynJacobs.
Fixes #42707.

#10 @schlessera
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's a typo in the first description string:

'The visibility settings for the taxomonmy.'

Should be:

'The visibility settings for the taxonomy.'

#11 @danielbachhuber
7 years ago

42707.3.diff fixes the typo

#12 @pento
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 42973:

REST API: Fix a typo introduced in [42729].

Props danielbachhuber.
Fixes #42707.

#13 @danielbachhuber
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for backporting against the 5.0 branch.

#14 @danielbachhuber
6 years ago

  • Keywords has-patch added

As it turns out, part of this landed in r43445: https://core.trac.wordpress.org/changeset/43445/branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php

42707.4.diff is an application of the remainder against the 5.0 branch.

#15 @danielbachhuber
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43680:

REST API: Define taxonomy visibility settings in schema

For Gutenberg and other admin-type interfaces, it's
useful to be able to see the visibility settings for
taxonomies.

The original changeset was partially included in [43445].

Merges [42729], [42730], [42973] to the 5.0 branch.
Props joehoyle, TimothyBlynJacobs, pento.
Fixes #42707

Note: See TracTickets for help on using tickets.