Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #56 from Scotchester/menu-name-fix
Browse files Browse the repository at this point in the history
Set menu names for custom post types to be plural
  • Loading branch information
Scotchester committed Apr 16, 2015
2 parents c623afb + 66be63d commit ff00db1
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 7 deletions.
61 changes: 58 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,66 @@ All notable changes to this project will be documented in this file.
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format.


## 1.3.0 - 2015-01-15
## 1.5.4 - 2015-04-15

### Changed
- Names of our custom post types in the sidebar to be plural, matching the
standard for default WordPress post types.


## 1.5.3 - 2015-04-01

### Changed
- `url` field output (in the meta box) from `type="url"` to `type="text"`,
so that relative URLs will not fail native browser validation.


## 1.5.2 - 2015-03-30

### Changed
- Version number due to confusion about misplaced tags.

**This version provides no functional changes over 1.5.1.**
It is only being included here so it doesn't appear that we skipped a version.


## 1.5.1 - 2015-03-26

### Added
- Meta-data saving of `date`, `time`, `datetime` fields
- labeling to link and "how to" to formsets

### Changed
- Refactored some code

### Fixed
- Readability of those field's taxonomy tags
- A bug that ignored validation for some field types under certain circumstances


## 1.5.0 - 2015-03-24

### Changed
- Where and how date/time/datetime is saved
- Refactored tests

### Removed
- Obsolete tests


## 1.4.0 - 2015-03-20

### Added
- Meta-data saving of `wysiwyg`, `date`, `time`, `datetime` fields

### Fixed
- Readability of the date/time fields' taxonomy tags
- Format of how each field is saved


## 1.3.0 - 2015-01-15

### Added
- Arbitrary formset functionality

### Fixed
- Lots of issues with saving and removing fields
- Some visual issues
2 changes: 1 addition & 1 deletion cms-toolkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
available throughout the application and make building complex functionality
in WordPress a little easier.
Version: 1.5.3
Version: 1.5.4
Author: Greg Boone, Aman Kaur, Matthew Duran, Scott Cranfill, Kurt Wall
Author URI: https://github.com/cfpb/
License: Public Domain work of the Federal Government
Expand Down
4 changes: 2 additions & 2 deletions inc/meta-box-html.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ public function link_input( $meta_key, $value, $required, $label, $form_id = NUL
$existing = get_post_meta( $post_id, $meta_key, false);
?><div class="link-field <?php echo "{$meta_key}" ?>"><?php
if ( ! isset( $existing[0] ) || ! isset( $existing[1] ) ) {
$this->single_input( $meta_key . "_text", $value, 'text', $required, NULL, 'Link Text', 'Url text here', $form_id );
$this->single_input( $meta_key . "_url", $value, 'text', $required, NULL, 'Link URL', 'Url here', $form_id );
$this->single_input( $meta_key . "_text", $value, 'text', $required, NULL, 'Link Text', 'Link text here', $form_id );
$this->single_input( $meta_key . "_url", $value, 'text', $required, NULL, 'Link URL', 'URL here', $form_id );
} else {
$this->single_input( $meta_key . "_text", $existing[1], 'text', $required, NULL, 'Link Text', NULL, $form_id );
$this->single_input( $meta_key . "_url", $existing[0], 'text', $required, NULL, 'Link URL', NULL, $form_id );
Expand Down
2 changes: 1 addition & 1 deletion inc/post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function build_post_type( $name, $plural, $slug, $prefix = '', $args = ar
'not_found' => 'No ' . $plural . ' found.',
'not_found_in_trash' => 'No ' . $plural . ' found.',
'parent_item_colon' => 'Parent ' . $name . ':',
'menu_name' => $name,
'menu_name' => $plural,
);
$defaults = array(
'labels' => $labels,
Expand Down

0 comments on commit ff00db1

Please sign in to comment.