Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterGlad you like it.
Do you want to remove an ajax query when users open a closed relationships field? I understand "closed relationship field" is a field that users already chose items for the relationship, right?
Well, what if users want to change a selected item to something else? We still need to make ajax query to fetch other items for users to change.
FYI, if a field already has some selected items, only once query is made when page loads (not via ajax). It makes sure the selected items is visible in the dropdown.
If field has no selected items, no queries are created when page loads. Queries are created only via ajax.
Anh Tran
KeymasterUpdate: the ajax + pagination is enabled by default and works for terms and users. Please use the latest version on ajax-post branch on Github:
https://github.com/wpmetabox/meta-box/tree/ajax-post
Please try it before I release a new version.
Anh Tran
KeymasterHi Paul,
This is done on Github (the ajax-post branch). Can you please try it before I release a new version:
Anh Tran
KeymasterHi again,
I've done the relationships for
post. Please follow this guide to use it:- Download the latest dev version of MB Relationships on Github.
- Download the latest dev version of Meta Box for ajax post on Github
Now try it again and you'll see the ajax requests are sent when open the dropdown.
If you want to customize the ajax request, in your code to register relationships, use this code:
add_action( 'mb_relationships_init', function () { MB_Relationships_API::register( array( 'id' => 'users_to_posts', 'from' => array( 'object_type' => 'post', 'meta_box' => array( 'title' => 'Manages', ), 'field' => array( 'ajax' => true, // Note this 'query_args' => array( 'posts_per_page' => 10, // This is for pagination in Ajax ), 'js_options' => array( 'minimumInputLength' => 1, // Send ajax requests when users enter at least 1 character ), ), ), 'to' => array( 'object_type' => 'post', 'post_type' => 'page', 'meta_box' => array( 'title' => 'Managed By', 'context' => 'side', 'empty_message' => 'No users', ), 'field' => array( 'ajax' => true, // Note this 'query_args' => array( 'posts_per_page' => 10, // This is for pagination in Ajax ), ), ), ) ); } );Some notes:
- Now in the relationship, you'll have an extra
fieldsettings, which you can pass full settings array for the field. It's similar topost,taxonomyoruserfield. - Enable
ajaxfor the dropdown by adding'ajax' => trueto the field - If you just want to query only some posts via ajax (not all of posts at once), you can set
posts_per_pageparameter.
Currently, it works for posts only. I'll make it works for terms and users by tomorrow.
September 10, 2019 at 9:19 AM in reply to: ℹ️METABOXERS! Help get OxygenBuilder integration by upvoting this github issue #16054Anh Tran
Keymaster@saint: no, the extensions just work. The integration will help pulling the data to output on the front end easier.
I've marked this topic as super sticky. Guys, please upvote!
Anh Tran
KeymasterHi Chris, thanks for your bug report. I'll check and fix it.
September 10, 2019 at 9:16 AM in reply to: ✅Do action hook 'mb_settings_page_load' execution only when saved/updated #16052Anh Tran
KeymasterHi,
I think you need to track the 'initial save' or 'update' with a custom option, like this:
add_action( 'mb_settings_page_load', function() { $is_updated = get_option( 'your_custom_option' ); if ( ! $is_updated ) { do_your_work(); update_option( 'your_custom_option', 1 ); } }, 20 );Anh Tran
KeymasterHi Ryan,
It's not a bug. It's different implementations by WordPress in different areas. I think I'll add an extra param for the meta box for you to add custom CSS class easier. Please wait.
Anh Tran
KeymasterHi,
I almost finish it. You can track the progress here: https://github.com/wpmetabox/meta-box/commits/ajax-post.
What I've done so far:
- Make it possible to use ajax for
postfield (which is used in relationships plugin) by adding'ajax' => trueto the field. - Make pagination works in case you don't want to request all posts at once (via
posts_per_pageparam in thequery_args) - Cache the ajax requests
I'm working on clone. If everything goes well, I can give you an example by the end of today.
September 6, 2019 at 9:57 PM in reply to: ✅Received license key renewal receipt, but plugin has not been updated #16020Anh Tran
KeymasterIt's done. Please check your account.
September 6, 2019 at 4:50 PM in reply to: ✅How to remove Meta Box license key Notification when Extension is Bundled? #16015Anh Tran
KeymasterHi Swami,
I'm working on some issues and when they're done, I'll update the plugin.
Regarding "Activate License" links, they won't appear if you provide updates for the plugins (e.g., they're on the latest versions). It's kind of impossible to detect a plugin is installed via TGMPA or the normal way, because when it's installed, it's just a normal plugin.
I'd suggest you update the theme when a new version of plugins is released, so your users will get the most recent updates of the plugins.
Or you can just bundled the Meta Box extensions directly in your custom plugin. In this case, the notification won't show anymore.
Anh Tran
KeymasterHi Christine,
Sorry for the delay. I've just fixed this bug and released a new version on wordpress.org. Please update. The AIO will come later.
Anh Tran
KeymasterPlease see the link I posted above. It has some code that you can use to limit the number of characters in a tinymce editor (wysiwyg field). You'll need some coding, though.
Anh Tran
KeymasterHi dwcouch,
Looking at the message, I think the problem is the Meta Box Updater. Please remove it and try again. The updater is not used anymore, it's merged into Meta Box 5.1 already and it's safe to remove it.
September 6, 2019 at 8:32 AM in reply to: ✅Received license key renewal receipt, but plugin has not been updated #16007Anh Tran
KeymasterHi, can you check if the email you used in the recent purchase is the same as your account email? We use emails to identify license expiry time. If you use 2 emails, then the system thinks there are 2 accounts.
If that's the case, please just tell me the email you used recently, and I'll change it to your account's email. Then you'll see the renewal in your account page.
-
AuthorPosts