<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
I'm not opposed to these suggestions if they're merely
recommendations.<br>
<br>
I use post meta across multiple themes with the same meta key. This
at least ensures compatibility with features across my themes. Not
to mention, several developers use the Hybrid Core framework, so
there's some standardization for meta keys with themes that I didn't
create. I know my users are just a drop in the ocean compared to
the entire WP user base, but at least a few hundred thousand users
can have some standardization.<br>
<br>
As for the underscore prefix, I typically choose not to do this with
themes. This way, the user can still see that they can use this
metadata, even after they switch themes. For me, it depends
entirely upon the situation. If I want the user to be able to
easily access this data in the future, I don't use the underscore.<br>
<br>
In general, I believe using a prefix and underscore are extremely
good practices, especially if the data is specific to just that one
theme.<br>
<br>
On 8/9/2011 8:06 AM, Chip Bennett wrote:
<blockquote
cite="mid:CAPdLKqczuEod+XRgvU6exLYZDetr+Xm+YDGX8bxm3YpGA3aHkA@mail.gmail.com"
type="cite">This is great advice, and probably something that
should be added to the Codex: prefix custom post meta fields with
theme-slug. Anyone opposed to me adding this to the Guideline
regarding proper namespacing?
<div><br>
</div>
<div>I would also add (as best-practice, or as a requirement?)
that custom post meta fields that are handled by metaboxes
should be prefixed with an underscore, so that they are hidden
from the Custom Fields metabox.</div>
<div><br>
</div>
<div>Chip<br>
<br>
<div class="gmail_quote">On Mon, Aug 8, 2011 at 3:43 PM, Otto <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="im">On Mon, Aug 8, 2011 at 12:27 PM, Chip
Bennett <<a moz-do-not-send="true"
href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>>
wrote:<br>
> I am considering adding post meta to allow for
per-post layout selection. It<br>
> is simple enough to implement; however, here's my
question: would this cross<br>
> the content/presentation line? Or expressed
differently: would it be<br>
> inappropriate to add Theme-specific custom post meta
in this manner, given<br>
> that such metadata would be mostly useless to the
user after switching<br>
> Themes?<br>
<br>
</div>
Post meta for this use is fine, just prefix the meta key
with your<br>
theme name so that it's obvious where the meta came from.<br>
<br>
Not necessary to offer a cleanup option as such, but might
be a nice feature.<br>
<font color="#888888"><br>
-Otto<br>
</font>
<div>
<div class="h5">_______________________________________________<br>
theme-reviewers mailing list<br>
<a moz-do-not-send="true"
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a moz-do-not-send="true"
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
theme-reviewers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a>
<a class="moz-txt-link-freetext" href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
</blockquote>
</body>
</html>