Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterFYI:
1. Filter is done with MB Admin Columns v1.2. Please just update. You can also use this plugin to do the same job.
2. Search is done in v1.1. Just add
'searchable' => trueto the field to enable search by that field.Cheers
AnhAnh Tran
KeymasterIt's been a long time, but just want to let you know that the search functionality is done. Please just update the plugin.
Anh Tran
KeymasterFYI, #3 can be resolved with a free plugin.
Anh Tran
KeymasterHi, is that really
admin-columnsor you mistyped? It should beadmin_columns, underscore.Anh Tran
KeymasterCan you post full code of your meta box to check?
PS: I fixed the link in the sidebar. Thanks a lot!
Anh Tran
KeymasterYes, you can always do that with
classattribute of the field. Just add a custom CSS class to the "5-columns" field and change its width with CSS. It's kind of a hack while waiting for a better solution that we're working on.Anh Tran
KeymasterHi uththamag,
As Tan said in the previous reply, each field belongs to 1 column, so hiding a column probably break the layout unless we use a trick like above.
In the next couple of days, I will work on allowing multiple fields in a column, so you can hide/show them without problem. Please be patient.
Thanks
AnhAnh Tran
KeymasterWe just updated the Columns extension yesterday with a better check for total columns (less than or greater than 12, it will close the div). But if you use with tabs, you still need to make sure total columns in each row equals to 12. Please update.
Regarding the new syntax, I was thinking about something advanced that can offer you more flexibility. But after looking at that, I see the change is only the
fieldsparameter (theclassas I replied can be achieved viaclassattribute). And with the support of Group extension, you can do that easily, including the nested columns.Here is what you can do with Groups (the syntax is very similar):
'fields' => array( array( 'type' => 'group', // A wrapper group 'id' => 'wrapper', 'fields' => array( array( 'id' => 'name', 'type' => 'text', 'columns' => 4 ), array( 'id' => 'subgroup', 'type' => 'group', 'columns' => 8, 'fields' => array(), // Array of other sub-sub fields ) ), ), ),Anh Tran
KeymasterHi,
How do you setup the columns to show?
Anh Tran
KeymasterHi, I don't want to much nested arrays. In case sub-fields in groups are organized in columns, there will be a nightmare of nested nested arrays.
After reviewing the code, I think we can still achieve everything by this code:
fields => array( array( 'columns' => 4, 'class' => 'custom-column-class', ), ),We have
classattribute for fields, so let's use it instead of creating another attribute.Anh Tran
KeymasterHi Jackky,
Your idea about column class is nice. Will think about it. The suggested syntax I think will be problematic if we use with groups. So let's just keep it as it is.
Anh Tran
KeymasterThanks a lot. Just fixed the bug with the editor!
Cheers
AnhAnh Tran
KeymasterJust added 2 options
submit_buttonandmessagefor you ๐Anh Tran
KeymasterHi,
I guess the problem is when you hook
send_mails_on_publish. Probably it's hook too soon, sooner when Meta Box updates post meta.Currently Meta Box uses
save_post_{$post_type}with priority = 10 to save post meta. You should hook after that (atsave_postor at the same hook with higher priority).Looking at the function params, I think you're using
transition_post_status. It's fired inwp_transition_post_statusfunction that runs beforesave_post_*hook.Anh Tran
KeymasterSomehow my code that remove slashed was removed from the released version. Probably it was an error while merging. I've just pushed a fix for that. Also added 2 options:
submit_buttonandmessagefor the text of submit button and successful message.Please update.
PS: Can you post the screenshot of your screen when replying this thread? Don't you see any button in the reply box?
-
AuthorPosts