Hi again π
It’s quite deeper than you most probably think, but basically the whole process starts in https://plugins.trac.wordpress.org/browser/ultimate-post-types/trunk/classes/UPT_Custom_Post_Type.php at line 206.
The $meta array includes as sub-array of fields, which should be checked to see if it’s empty and is pretty a bug. Right now I don’t have the opportunity to fix it, but tomorrow I will add it either to the dev version or 0.4.
Thread Starter
Olivier
(@eterneige)
Well, I found the file where it happens :
ultimate-post-types/classes/UPT_Custom_Post_Type.php
I’ve added
if ('fields' == $m->meta_key and 'a:0:{}' == $m->meta_value) {
return;
}
between lines 213 and 214 (in the foreach loop).
It does the job, even if I’m not sure it’s a good practice π
Could you please include such a modification in the plugin ? My code or another way to handle this…
Thanks !
Thread Starter
Olivier
(@eterneige)
Oh, you answered while I was writing…
No matter when, it’s not a real problem : I just find it’s useless to display an empty box ^^
I’m sorry I delayed things for a week, but I was packing for a full week of vacation π
I fixed this and uploaded it to the trunk/development version. You can get it at https://wordpress.org/plugins/ultimate-post-types/developers/ , but it will be included in the next version too.
Best Regards,
Rado