Skip to content

Commit

Permalink
add default labels links to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joemaller authored Mar 24, 2024
1 parent eba49d0 commit b2a9779
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ New Post_Types and Taxonomies can add specific CSS Rules to the WordPress admin

### Generating Labels

A default set of labels can be generated from `WP\DataModel::postTypeLabels()` and `WP\DataModel::taxonomyLabels()`. These are often used to populate the `labels` value of the `$args` property when defining a new Post_Type or Taxonomy . Arguments are:
A default set of labels can be generated from `WP\DataModel::postTypeLabels()` and `WP\DataModel::taxonomyLabels()`. These are often used to populate the `labels` value of the `$args` property when defining a new Post_Type or Taxonomy.

Arguments are:

- **`$labelBase`** _String_
The base name of the label. This will be inflected and case-corrected to match WordPress defaults.
- **`$inflect`** _[Boolean]_, default `true`<br>
A boolean switch to enable singular/plural inflection of `$labelBase`.
- **`$overrides`** _[Array]_, default: `[]` <br>
An array of labels which will override the generated default labels.
An array of labels which will override the generated defaults [post_type](https://github.com/WordPress/wordpress-develop/blob/84c21abf36dc2d8cb2b58c03e0e1f237c0a6b18d/src/wp-includes/class-wp-post-type.php#L962-L1002) and [taxonomy](https://github.com/WordPress/wordpress-develop/blob/84c21abf36dc2d8cb2b58c03e0e1f237c0a6b18d/src/wp-includes/class-wp-taxonomy.php#L612-L648) labels.

### WordPress Compatibility

Expand Down

0 comments on commit b2a9779

Please sign in to comment.