diff --git a/mu-plugins/10up-plugin/includes/classes/PostTypes/AbstractPostType.php b/mu-plugins/10up-plugin/includes/classes/PostTypes/AbstractPostType.php index 3a067f65..04b20b8c 100644 --- a/mu-plugins/10up-plugin/includes/classes/PostTypes/AbstractPostType.php +++ b/mu-plugins/10up-plugin/includes/classes/PostTypes/AbstractPostType.php @@ -113,7 +113,7 @@ public function get_editor_supports() { * @return array */ public function get_options() { - $options = [ + return [ 'labels' => $this->get_labels(), 'public' => true, 'has_archive' => true, @@ -126,8 +126,6 @@ public function get_options() { 'menu_position' => $this->get_menu_position(), 'hierarchical' => $this->is_hierarchical(), ]; - - return $options; } /** @@ -140,7 +138,7 @@ public function get_labels() { $singular_label = $this->get_singular_label(); // phpcs:disable -- ignoring template strings without translators placeholder since this is dynamic - $labels = array( + $labels = [ 'name' => $plural_label, // Already translated via get_plural_label(). 'singular_name' => $singular_label, @@ -169,7 +167,7 @@ public function get_labels() { 'item_updated' => sprintf( __( '%s updated.', 'tenup-plugin' ), $singular_label ), 'menu_name' => $plural_label, 'name_admin_bar' => $singular_label, - ); + ]; // phpcs:enable return $labels; diff --git a/mu-plugins/10up-plugin/includes/classes/Taxonomies/AbstractTaxonomy.php b/mu-plugins/10up-plugin/includes/classes/Taxonomies/AbstractTaxonomy.php index 59ca9051..d7d0b136 100644 --- a/mu-plugins/10up-plugin/includes/classes/Taxonomies/AbstractTaxonomy.php +++ b/mu-plugins/10up-plugin/includes/classes/Taxonomies/AbstractTaxonomy.php @@ -98,7 +98,7 @@ public function register() { * @return array */ public function get_options() { - return array( + return [ 'labels' => $this->get_labels(), 'hierarchical' => $this->is_hierarchical(), 'show_ui' => true, @@ -106,7 +106,7 @@ public function get_options() { 'query_var' => true, 'show_in_rest' => true, 'public' => true, - ); + ]; } /** @@ -119,7 +119,7 @@ public function get_labels() { $singular_label = $this->get_singular_label(); // phpcs:disable - $labels = array( + $labels = [ 'name' => $plural_label, // Already translated via get_plural_label(). 'singular_name' => $singular_label, // Already translated via get_singular_label(). 'search_items' => sprintf( __( 'Search %s', 'tenup-plugin' ), $plural_label ), @@ -135,7 +135,7 @@ public function get_labels() { 'not_found' => sprintf( __( 'No %s found.', 'tenup-plugin' ), strtolower( $plural_label ) ), 'not_found_in_trash' => sprintf( __( 'No %s found in Trash.', 'tenup-plugin' ), strtolower( $plural_label ) ), 'view_item' => sprintf( __( 'View %s', 'tenup-plugin' ), $singular_label ), - ); + ]; // phpcs:enable return $labels;