Skip to content

Commit

Permalink
Add the new post type label in 6.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Aug 21, 2023
1 parent 276ec30 commit 5a67b7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Not your first time here? See [Recent Changes for Developers](https://github.com
* **PHP:** 7.4
- Tested up to PHP 8.2
* **WordPress:** 5.6
- Tested up to WP 6.2
- Tested up to WP 6.3

## Installation ##

Expand Down
1 change: 1 addition & 0 deletions src/PostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public function __construct( string $post_type, array $args = [], array $names =
'item_updated' => sprintf( '%s updated.', $this->post_singular ),
'item_link' => sprintf( '%s Link', $this->post_singular ),
'item_link_description' => sprintf( 'A link to a %s.', $this->post_singular_low ),
'item_trashed' => sprintf( '%s trashed.', $this->post_singular ),
];

# Build the featured image labels:
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/SetupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public function testPostTypeLabelsAreCorrect(): void {
'item_updated' => 'Singular updated.',
'item_link' => 'Singular Link',
'item_link_description' => 'A link to a singular.',
'item_trashed' => 'Singular trashed.',
), $bar->labels );

$featured_image = version_compare( $wp_version, '5.4', '>=' ) ? 'Featured image' : 'Featured Image';
Expand Down Expand Up @@ -205,6 +206,7 @@ public function testPostTypeLabelsAreCorrect(): void {
'item_updated' => 'FAQ updated.',
'item_link' => 'FAQ Link',
'item_link_description' => 'A link to a FAQ.',
'item_trashed' => 'FAQ trashed.',
), $faq->labels );

$post = get_post_type_object( 'post' );
Expand Down

0 comments on commit 5a67b7c

Please sign in to comment.