Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: how best to intercept user registration on submit? #10633
    devr52
    Participant

    It 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).

    in reply to: file field media basic #9426
    devr52
    Participant

    Yes. 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.

    devr52
    Participant

    That 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?

    in reply to: save_post action hook replacement? #9382
    devr52
    Participant

    A 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_handler called after both wp_insert_post has 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
    in reply to: save_post action hook replacement? #9379
    devr52
    Participant

    Had to edit class-piklist-form.php and add do_action('piklist_fields_saved'); at the end of the save() method and marshall the arguments from the wp_insert_post handler to 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);
    }
    in reply to: save_post action hook replacement? #9376
    devr52
    Participant

    Yes. I’ve also checked all the registered callbacks on the hooks, everything looks fine.

    in reply to: save_post action hook replacement? #9373
    devr52
    Participant

    Same thing occurs with the wp_insert_post hook. The post data is available, but the meta fields are not saved yet.

    in reply to: save_post action hook replacement? #9372
    devr52
    Participant

    I’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…

    in reply to: front end forms #9360
    devr52
    Participant

    How does that allow injecting an ID, or other data obtained from the form (what if it’s search params?)

    in reply to: Where is the Features? #9348
    devr52
    Participant

    5 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.

    in reply to: Piklist Content Types and Taxonomies #9346
    devr52
    Participant

    It’s been several years, I don’t see either of these features in github or the wordpress.org plugin repo.
    Are they anywhere?

Viewing 11 posts - 1 through 11 (of 11 total)