From 63a69ad86e830593d9e2ff4256e96132fd1e2c6c Mon Sep 17 00:00:00 2001 From: William Patton Date: Sun, 10 Feb 2019 13:44:11 +0000 Subject: [PATCH] Changed where the uppercase letter is backfilled for 'label'. --- AbstractPostType.php | 6 +++--- changelog.md | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/AbstractPostType.php b/AbstractPostType.php index bcaaad1..225e4d4 100644 --- a/AbstractPostType.php +++ b/AbstractPostType.php @@ -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 * @copyright Copyright (c) 2018-2019, William Patton @@ -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 ), ]; } @@ -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, diff --git a/changelog.md b/changelog.md index 8117b62..20ddaf5 100644 --- a/changelog.md +++ b/changelog.md @@ -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'