Forum Replies Created
-
AuthorPosts
-
devr52ParticipantIt wasn’t simple, and it took a fairly large amount of time to make work, including modifying piklist itself, new custom js, and figuring out all the right wp hooks to use (and the docs on the register/login flow hooks are terrible since the entire thing changed at some point).
devr52ParticipantYes. I also read that in the documentation and I did exactly that.
It still is only showing the basic uploader, which is exactly why I posted this ticket. It’s not working as documented.May 28, 2019 at 1:30 pm in reply to: post_meta vs taxonomy scope confusion, error message broken #9396
devr52ParticipantThat is what my field is set to–the taxonomy type.
It still doubles up the error message, so that is still an issue–any ideas?
devr52ParticipantA CPT isn’t complete w/o all its fields. My handler is for after the entire CPT has been saved so that it can do stuff with it.
I want
my_handlercalled after bothwp_insert_posthas happened and all the meta fields have been saved, so that inside the handler I can:$meta = get_post_meta($post_id); // ... do stuff with both $post and $meta
devr52ParticipantHad to edit
class-piklist-form.phpand adddo_action('piklist_fields_saved');at the end of the save() method and marshall the arguments from thewp_insert_post handlerto its handler.e.g.
add_action('wp_insert_post', 'insert_handler', 100, 3); function insert_handler($post_id, $post, $update) { if ( $post->post_type != 'my_post_type') return; add_action('piklist_fields_saved', function($scope, $fields) use($post_id, $post, $update) { do_action('my_handler', $post_id, $post, $update); }, 10, 2); }
devr52ParticipantYes. I’ve also checked all the registered callbacks on the hooks, everything looks fine.
devr52ParticipantSame thing occurs with the wp_insert_post hook. The post data is available, but the meta fields are not saved yet.
devr52ParticipantI’ve tried piklist_save_field, but for some reason it doesn’t work–it’s also getting called before the meta data is saved.
I’ve even set my handler for piklist_save_field to be added from within the wp save_post action hook–which is called after the post is saved. When my hook is called this way the post meta still comes back empty–the db confirms the meta hasn’t been saved if I stop it here. If I let the handler return and the process complete the meta is saved correctly to the db–afterwards…
devr52ParticipantHow does that allow injecting an ID, or other data obtained from the form (what if it’s search params?)
devr52Participant5 years later…
1.0 has been out for a while, where’s the Contact Manager?
Would be greatly helpful to have a complete app as an instructional resource.
devr52ParticipantIt’s been several years, I don’t see either of these features in github or the wordpress.org plugin repo.
Are they anywhere? -
AuthorPosts