[wp-hackers] Meta boxes and post metadata

Radi Varbanov aparoph at gmail.com
Fri Feb 22 23:30:06 UTC 2013


Is Yoast doing it wrong?

Is there a situation when you need to store empty meta_value?

Thx,
Radi


On Thu, Feb 21, 2013 at 7:01 AM, Alexander Höreth <a.hoereth at gmail.com>wrote:

> Same here: Only create DB entries when they contain information.
> Use "not existing" equal to "empty" => if empty, delete.
>
> Alex
>
>
> 2013/2/21 Steve Taylor <steve at sltaylor.co.uk>
>
> > A plugin I do (
> > http://wordpress.org/extend/plugins/developers-custom-fields/)
> > used to create DB records even if nothing was entered into the custom
> > field. I changed it to not create a record if the value is empty, also
> > to delete the existing record if it exists, but the new value entered
> > is empty.
> >
> > No problems so far - I think in retrieving values you get the same
> > result from an empty record as from no record.
> >
> > I'd be interested to hear if anyone else has alternate views on this.
> >
> > Cheers,
> >
> > Steve
> >
> >
> > On 20 February 2013 16:05, Radi Varbanov <aparoph at gmail.com> wrote:
> > > Hi Everyone,
> > > First time posting here, so please bare with me :)
> > >
> > > I am working on a site that is using the Yoast wpseo plugin and noticed
> > > that even if you leave the SEO fields empty the plugin will store an
> > empty
> > > row into the wp_postmeta table. That made me think about how I should
> use
> > > meta boxes.
> > >
> > > So my question is:
> > > When I use custom meta boxes should I also insert empty rows into the
> > > wp_postmeta table or I should check to see if the fields is empty and
> if
> > it
> > > is, do not store anything? With small websites that my be not a problem
> > but
> > > when you have 50k+ posts and have ~10 custom post meta boxes and 11
> form
> > > the SEO plugin that adds up very fast.
> > >
> > > Thanks,
> > > Radi.
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list