Tagged: lock field
- This topic has 4 replies, 2 voices, and was last updated 9 years ago by
Steve.
-
AuthorPosts
-
-
February 5, 2013 at 1:07 am #674
johnmcalesterMemberIs it possible to apply the locked field feature to multiple status of a CPT. I have tried adding more values to the on_post_status array but only the last entry seems to take effect. I also tried just adding another array but that did not work either. Alternatively can a fieldjust be made read only all the time?
-
February 5, 2013 at 12:47 pm #677
SteveKeymaster@johnmcalester– I updated this tutorial to explain how to show values on a group or range of post statuses. Let me know if you need further clarification.
Yes, a field can be set to always read-only by including all post statuses in the range.
-
February 5, 2013 at 3:50 pm #679
johnmcalesterMemberThanks Steve. That makes sense. However, no matter what I try I cannot get this to apply to more than the first status. Which ever status I list first is the only one that is recognized. Does the status have to be a custom status defined in the CPT parameters?
I am using WP 3.5.1 and PikList 0.7.1
I’m stumped.
Thanks.
-
February 5, 2013 at 4:13 pm #680
johnmcalesterMember -
February 5, 2013 at 5:18 pm #681
SteveKeymasterJohn– You definitely found a bug. I believe you have to register your statuses with Piklist for this to work. Within your TICKET CPT, add the register post status code. It can be an exact duplicate of the WordPress defaults. Try adding this when you register the TICKET CPT. You can see the full format here.
,'status' => array(
'draft' => array(
'label' => 'Draft'
)
,'auto-draft' => array(
'label' => 'auto-draft'
)
,'pending' => array(
'label' => 'Pending'
)
,'future' => array(
'label' => 'Scheduled'
)
,'publish' => array(
'label' => 'Published'
)
,'private' => array(
'label' => 'Private'
)
,'trash' => array(
'label' => 'Trash'
)
,'inherit' => array(
'label' => 'inherit'
)
)
Let us know if this works.
-
-
AuthorPosts
- You must be logged in to reply to this topic.