Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterDid you see any error in the console when deleting the clone?
Anh Tran
KeymasterAre you using a theme that has Meta Box plugin included directly?
Anh Tran
KeymasterHi again,
Just wonder why don't you use
plupload_imagefield? It has nice UI and allows you to select files from your computer. I forgot about this ๐Anh Tran
KeymasterThanks, I will look at this issue.
Anh Tran
KeymasterHi, I already fixed that in the development version. It will be included in the next version.
Anh Tran
KeymasterHi,
This is a hard question :). I think the filter allows you to change the value of whole group, as the group is the actual field you're filtering. So,
$oldand$neware arrays (of sub-field values). I guess you're using a cloneable group? If so, then$oldand$neware arrays (of clones), each clone is an array of sub-fields.Let's try with the code below:
add_filter('rwmb_GROUP_ID_value', 'prefix_change_value',10,3); function prefix_change_value ( $new, $field, $old ) { $text_field_id = 'SUB_FIELD_ID'; foreach ( $new as $k => $clone ) { $new[$k][$text_field_id] = uniqid(); } return $new; }Anh Tran
KeymasterHi, I see you included the Group extension inside your theme. The extension is the latest version (it has the method
is_saved()) but the Meta Box installed on your website is not (the version 4.7.3 has methodis_saved()). So, to fix this issue, please:- Deactivate the theme first (if the error prevents you from accessing the Dashboard, try changing the theme folder name)
- Update Meta Box to the latest version
- Reactivate the themeAnh Tran
KeymasterGlad to see you figured it out. To echo nothing if the field is empty, you just need to change the code a little bit:
<?php $field_id = 'twitter-url'; if ( !empty( $settings[$field_id] ) ) { echo '<li><a href=" ' . $settings[$field_id] . '"><i class="fa fa-twitter"></i></a></li>'; } ?>Anh Tran
KeymasterHi, where do you put the code above into your theme? Maybe you should not
returnthe result as you will use it in another way (display it or use as a variable). Usingreturnin a PHP file will stop execution of the following code.Anh Tran
KeymasterIf it comes with the theme, then you don't need to install the extension as a standalone plugin. Just use it ๐
Anh Tran
KeymasterThanks for the error, I will check it.
The
filefield, of course, doesn't have good UI. I will search to see if the WordPress media can force users to select files from the computer. If there's a solution for that, I will add to thefile_advancedfield.Anh Tran
KeymasterHi,
Yes, that's possible. Just define the validation rules in YAML format.
Anh Tran
KeymasterThe error says the extension is activated twice. Can you check if it is already installed? Maybe included directly in the theme?
Anh Tran
KeymasterHi Sinusite,
You can use native file input with
filefield. It's the default browser file input, which allows us to select files from computer only.Anh Tran
KeymasterDid you use any of these plugins: Conditional Logic, Show Hide, Include Exclude? Can you please check the conditions to show or hide the meta boxes?
-
AuthorPosts