Skip to content

Commit

Permalink
Changed where the uppercase letter is backfilled for 'label'.
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonwebz committed Feb 10, 2019
1 parent d570cda commit 63a69ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AbstractPostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* class before calling 'register'.
*
* @package PattonWebz Post Type Registration Class
* @version 0.2.0
* @version 0.2.1
* @since 0.1.0
* @author William Patton <[email protected]>
* @copyright Copyright (c) 2018-2019, William Patton
Expand Down Expand Up @@ -81,7 +81,7 @@ public function get_name() {
public function get_labels() {

return ( ! empty( $this->labels ) ) ? $this->labels : [
'name' => $this->name,
'name' => ucfirst( $this->name ),
];
}

Expand All @@ -95,7 +95,7 @@ public function get_labels() {
*/
public function get_args() {
$labels = $this->get_labels();
$name = ( isset( $labels['menu_name'] ) ) ? $labels['menu_name'] : ucfirst( $this->name );
$name = ( isset( $labels['menu_name'] ) ) ? $labels['menu_name'] : $this->name;

return ( ! empty( $this->args ) ) ? $this->args : [
'post_type' => $name,
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ _No documentation available about unreleased changes as of yet._

- When the `$name` property is used to backfill the `label` arg is has the first letter uppercased.
- Post Types now register as `public` by default.

## [0.2.1] - 2019-02-10

- Changed where the uppercase first letter when backfilling is done for 'label'

0 comments on commit 63a69ad

Please sign in to comment.