Forum Replies Created
-
AuthorPosts
-
nicolas
ParticipantThanks again Anh, working great with a little modification.
Hooking into
rwmb_after_save_postcreated a double log input. I changed the hook to WPsave_postand it is working as expected.Thanks again for your help.
nicolas
ParticipantThank Anh for the reply, it's working great.
There is one more thing that I'm trying to accomplish and I can't with this filter. At least I don't know how to do if it's possible.
If I write to the log in the conditional statement, I will get one entry per field. Was I want is one entry per transaction (one per post save). So in order to write the all the changes in one log entry block, I would need a way to return the results of this filter and THEN write to the log. But I don't know how to do that. You have any ideas?
Thanks again
nicolas
ParticipantThe argument is this
array( 'name' => esc_html__( 'Price', $plugin_name ), 'id' => "{$prefix}price", 'desc' => esc_html__( 'Input price without currency', $plugin_name ), 'type' => 'text', 'clone' => false, 'size' => 25, 'tab' => 'dish', // 'visible' => array( "{$prefix}menu_item_type", '!=', '0' ), 'hidden' => array( 'when' => array( array( "{$prefix}menu_item_type", 'not in', array( 'item_type_a_la_carte', 'item_type_table_hote', 'item_type_combo' ) ), array( "{$prefix}table_hote_price_radio", '=', 'no' ), ), 'relation' => 'or', ), ),I tried the hidden logic but I have the same issue, it seems to be using an
andlogic.the
{$prefix}table_hote_price_radioradio button is visible whenitem_type_table_hoteis selected. The{$prefix}pricetextbox is supposed to show on all selection but it will show only onitem_type_table_hotewhen{$prefix}table_hote_price_radiois set toyesnicolas
ParticipantThanks, it does work by using outside conditions. I thought that adding the arg
visibleto the tab's array would suffice to enable the condition. Maybe this could be done in a future update?nicolas
ParticipantExcellent, it looks all good now. Thanks
May 31, 2016 at 8:48 PM in reply to: Lots of images in an image_advanced can wipe all images in that field on save #3234nicolas
ParticipantAfter rereading the issue, it doesn't seem to be a POST vars issue. Anyhow, it might still spark an idea to find a better solution!
May 31, 2016 at 8:44 PM in reply to: Lots of images in an image_advanced can wipe all images in that field on save #3233nicolas
ParticipantI'm not sure, but I think this is a POST vars limit issue. It looks like a tricky problem one of my client had when saving her menu in WP. She had over 100 items in her menu and when she updated the menu with changes, parts of the menu just disappeared (like if they were overwritten or just dropped) what I did was augmented the value for max_input_vars to a larger number like 3000 (provided you have access to php's config). It helped but in the end I suggested the client to rethink the way she used her menu so she would need less items in it.
I'm not saying this is the same problem here, but it made me think of that issue I had so it might help you find a more accurate solution.
this link talks about the menu limit problem in wordpress: http://sevenspark.com/wordpress/menu-item-limit
-
AuthorPosts