Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHello,
Is the field
image_advanced? Do you have any custom CSS that might affect that? It seems not to happen on my side.Anh Tran
KeymasterI faced some issues that took me so long to refactor the code. I promise to release this within 3 days. Please wait.
Anh Tran
KeymasterHello,
When the
timestampis set totrue, the date/datetime field will store values as an array in a group. This array contains 2 elements:timestamp: the Unix timestamptformatted: the formatted (user-entered) value
This is a difference between a single date/datetime field, which stores only
timestampvalue.So, when you get the value from this field, please check both values.
Here is the video that demonstrates how the data is saved:
Anh Tran
KeymasterHi, I've added your CPT "work" and it works. Here is the video:
Anh Tran
KeymasterI see. Can you try CSS approach, like this:
array( 'name' => 'Website Screenshot URL:', 'desc' => '', 'id' => $prefix . 'website_screenshot', 'type' => 'text', 'class' => 'hidden', ),And in the Customizer > CSS and add this:
.hidden { display: none; }Anh Tran
KeymasterHi,
I've just tested your code and it works for me. Here is the video:
Can you please check again? Probably there's some hooks elsewhere that modifies the requests?
Anh Tran
KeymasterHello,
I've just tested again with the custom table for only 1 CPT. When I save another CPT, there's nothing happened. Can you please check again? Maybe there's somewhere else that you use the same CPT.
Anh Tran
KeymasterI'm not sure about the quick edit for groups. It's kind of custom output + JavaScript. As long as you format the submitted data in correct way (e.g. array of sub-fields values), it might work. So, please be very careful about the data, or you might lost them.
Anh Tran
KeymasterHello,
I've just did a similar test and it works for me. Do you have any filter/code that change the query? Some kind of hooks to
pre_get_posts,query_vars, etc.?Anh Tran
KeymasterThat's cool. Is the global
$postobject is available and set to the being edited post inside the filter?Anh Tran
KeymasterYes, you can do that. However, because PHP doesn't allow to use same keys in an array, you need to change the selector to something else (while still make it work):
'input_value' => array( 'input[name=rnr_wr_pagetype]' => 'st2', 'input[name*=rnr_wr_pagetype]' => 'st3', ),Anh Tran
KeymasterSorry, I missed that. I thought the code is the code that you're using.
Yes, there's a bug with the image_select field. It uses radio for inputs, so we can't use
#field_idin our rules. Please change it to[name=rnr_wr_pagetype]and update the plugin.Anh Tran
KeymasterHello,
I've checked your code and it works for me. Here is the video:
Please check the
$prefixagain. Probably you missed it.Anh Tran
KeymasterHello,
The MB Frontend Submission uses WordPress
wp_insert_post()andwp_update_post()to create/update a post. Both functions fire thesave_posthook. So, your code still works in the frontend. Please try and let me know how it goes.Anh Tran
KeymasterI see. The code that I posted above works for whole website, because that's the only PHP hook WordPress provides. And it's site-wide.
If your CPT doesn't have any other upload fields, then you can add some PHP checks to make sure the filter runs only for that CPT only. That might work.
And if you can hook into the ajax process, please share with us. I'm curious how to do that, too.
-
AuthorPosts