Forum Replies Created
-
AuthorPosts
-
April 2, 2019 at 12:01 PM in reply to: ✅Color Picker display issues (Background & Color Picker #14022
Anh Tran
KeymasterThanks a lot for your feedback. This is an issue with overflow set in the Columns and Tabs extension. I'm fixing them and will release new versions soon.
April 2, 2019 at 10:46 AM in reply to: ✅Shortcode in function not working for me after 4.17.0 update #14021Anh Tran
KeymasterHi Brian,
If the shortcode works fine on their own somewhere else, then it works.
In this case, the problem might come from how the post type grid module works. I have no idea about this.
Can you try var_dump the value of
do_shortcode('[rwmb_meta id="tour_date"]')in the function, just to see if it returns correct value?Anh Tran
KeymasterAh, when initialize the select2, you can get options via
data-optionsand pass it to the initializer:var options = $s2.data( 'options' ); $s2.select2( options );Anh Tran
KeymasterHi Calpaq, thanks for your feedback, let me check it.
April 1, 2019 at 5:10 PM in reply to: ✅[MB User Profile] Show password meter on registration form #14006Anh Tran
KeymasterThat's a good question. It's not available at the moment. I'll try to add another shortcode attribute to make it disable or able to set which password strength is acceptable.
Anh Tran
KeymasterThanks a lot for your feedback. It's a bug in the plugin and I've just fixed it in the version 1.1.8. Please update.
Anh Tran
KeymasterCan't you get it via
$_GET?Anh Tran
KeymasterI made a modification to that script, here is a working version: https://ghostbin.com/paste/tqqof
April 1, 2019 at 10:16 AM in reply to: ✅[MB User Profile] Show password meter on registration form #13998Anh Tran
KeymasterHi Sergio,
Unfortunately, users are required to have strong password. There's no way to set the level to "medium" at the moment.
April 1, 2019 at 10:10 AM in reply to: ✅Shortcode in function not working for me after 4.17.0 update #13997Anh Tran
KeymasterHi Brian,
I've just tested the code and it works fine to me. I modified the code a little bit to work for my test (as I don't have your hook, I use
the_content, everything else is the same):https://ghostbin.com/paste/fn24m
Here is my screenshots:
https://screenshots.firefox.com/iwwS8S5VJn85bYN6/localhost
https://screenshots.firefox.com/3coKCuQPHAxCyH00/localhostAnh Tran
KeymasterHi Sergio,
Your question is great! I think checking the user privilege on
template_redirectis the correct way. Maybe check if user is logged in, and is the user the author of that post / or is user an admin. That might be enough.Anh Tran
KeymasterHello,
I answered you on Facebook. I tested and couldn't replicate the bug. Am I missing something?
Anh Tran
KeymasterHi,
I think it's possible. For example, if you have a select field, you can set the options from current user post meta like this:
$user_id = get_current_user_id(); $options = get_user_meta( $user_id, 'meta_key', false ); // false to returns an array // In select field 'options' => $options,Anh Tran
KeymasterHi,
Regarding the first option, to add constraints between fields, I think the only way to do that is with custom JS.
To save sum of some fields, please use rwmb_after_save_post hook. Here you can get fields' values and update the sum to another field:
add_action( 'rwmb_after_save_post', function( $post_id ) { $field_1 = get_post_meta( $post_id, 'field_1', true ); $field_2 = get_post_meta( $post_id, 'field_2', true ); $field_3 = get_post_meta( $post_id, 'field_3', true ); $sum = $field_1 + $field_2 + $field_3; update_post_meta( $post_id, 'sum', $sum); } ); -
AuthorPosts