This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Allow post field control labels to be defined in register_post_type()#195
Merged
westonruter merged 4 commits intodevelopfrom Jul 5, 2016
Merged
Allow post field control labels to be defined in register_post_type()#195westonruter merged 4 commits intodevelopfrom
westonruter merged 4 commits intodevelopfrom
Conversation
js/customize-post-section.js
Outdated
| */ | ||
| addTitleControl: function() { | ||
| var section = this, control, setting = api( section.id ); | ||
| var postTypeObj = api.Posts.data.postTypes[ section.params.post_type ]; |
Contributor
There was a problem hiding this comment.
@lgedeon minor thing, but in the cases where you define a new var postTypeObj in your patch, could you just add postTypeObj to the existing list of variables declared? We're generally having only one single var statement in our code I believe. So you could change this and other instances to:
var section = this, control, setting = api( section.id ), postTypeObj;
postTypeObj = api.Posts.data.postTypes[ section.params.post_type ];…-dev-lib#188 from branch feature/eslint-one-var xwp/wp-dev-lib@4c79f77...30b4b22
Contributor
|
@lgedeon Thanks! 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check for field_x in labels when registering post_type and use as lable for default fields