Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterI don't think child theme is the problem, because both plugins don't do anything specific for themes.
Do you see any errors in the log?
Anh Tran
KeymasterAnh Tran
KeymasterUnfortunately, it's not supported. The plugin uses only the default WordPress uploader. I think other plugins use different JavaScript API so they won't work together.
Anh Tran
KeymasterDone! π
Anh Tran
KeymasterIt's $100 to upgrade. Please purchase it via Paypal and I will refund the $99 of Core Ext. Bundle to you.
Anh Tran
KeymasterHi Johann,
Working with Backbone (which is used to make everything with the media library) in WordPress is a pain. There's no documentation at all in the Codex. There are very few articles about it π
You can read the source code of Meta Box to understand how to word with
wp.media.view. This is another great tutorial to start working with Backbone view.However, in the WordPress environment, there's no official solution to inject fields into the Media Details Popup for now. This is how we use
wp.mediato open the Media details popup when clicking the edit link. The technique is discovered by funkedgeek on Github.I see Jetpack adds some config for Tiled Gallery in the Media popup, which might be a good example how to hack it.
June 8, 2016 at 11:34 AM in reply to: Post metabox with select advanced - big amount of related posts #3394Anh Tran
KeymasterLooks like the problem with the select2 library. Do you see the problem if you load fewer entries (500 for example) and no limit on the displayed result? I tried searching and found only this result but it's not 100% the same issue.
Anh Tran
KeymasterThis is done as a standalone plugin here https://github.com/rilwis/mb-rest-api. Will be soon available on WordPress.org.
Anh Tran
KeymasterHi, the
sizesvalue returned is not thesizesattribute in responsive image. It's an array of the following info:[sizes] => Array ( [thumbnail] => Array ( [file] => press_image-150x150.jpg [width] => 150 [height] => 150 [mime-type] => image/jpeg ) [medium] => Array ( [file] => press_image-4-300x194.jpg [width] => 300 [height] => 194 [mime-type] => image/jpeg ) [large] => Array ( [file] => press_image-1024x665.jpg [width] => 1024 [height] => 665 [mime-type] => image/jpeg ) [post-thumbnail] => Array ( [file] => press_image-624x405.jpg [width] => 624 [height] => 405 [mime-type] => image/jpeg ) )To get the
sizesattribute, we can use the following function:wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null, $attachment_id = 0 )So, in your code, you can do like this:
foreach ( $images as $image ) { $sizes = wp_calculate_image_sizes( array( $image['width'], $image['height'] ), null, null, $image['ID'] ); echo "\n<a href='{$image['full_url']}'>\n<img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' srcset='{$image['srcset']}' sizes='{$sizes}'>\n</a>"; }Anh Tran
KeymasterYeah, I'll add it to future update as it's nice feature. Thanks for your question π
Anh Tran
KeymasterDear Nicolas,
Thanks for using MB Conditional Logic, short answer: It supports Tabs.
Because Tabs isn't Meta Box's field, it's a DOM Element so you can hide it via using DOM Selector, as already mentioned in the documentation:
https://metabox.io/docs/meta-box-conditional-logic/#section-use-conditional-logic-outside-meta-box
In your case, you can add this code to your theme
functions.php:add_filter( 'rwmb_outside_conditions', function( $conditions ) { $conditions['.rwmb-tab-nutrient-content'] = [ 'visible' => ["{$prefix}menu_item_type", 'item_type_a_la_carte'] ]; return $conditions; } );Best regards
Tan
Anh Tran
KeymasterHi Sinusite,
Perhaps in your context, the maps field's script in loaded before Geolocation. To fix that, go to
inc/class-meta-box-geolocation.phpand replace:add_action('rwmb_enqueue_scripts', array($this, 'enqueue'));with:
add_action('admin_enqueue_scripts', array($this, 'enqueue'));to make sure MB Geolocation loaded first.
Let me know if it works so I'll put the patch to the next release π
Also, I don't understand this:
if $meta_boxes[βmineβ] is called with AND before $meta_boxes[βwith_geoβ], it worksβ¦.
( $meta_boxes[β1β] can contain only 1 text field )i also put the demo (adress and map fields) in $meta_boxes[β1β] and it seems not working if there only one metabox.
Best regards,
Tan
June 6, 2016 at 8:31 AM in reply to: Group and file_upload (AND clone) : only 1st file_upload is considered #3344Anh Tran
KeymasterHi, I see you closed this issue on Github. So I will close this thread now. We'll track the issue with iPad on Github π
Anh Tran
KeymasterHi @jonwatson87,
I'm very happy to see you figured it out. The way you use the helper function is correct!
Anh Tran
KeymasterDear Nicolas,
Sorry for the long silence. Can you please post your code so I can check?
Tan
-
AuthorPosts