You can clone with
HTTPS or Subversion.
Unless I've missed it, there does not seem to be a way to set default content in the fields. Sample text, for example. Or a default URL for image uploads.
It would be nice to have this, if possible. Thanks.
That's what the 'std' field on most field types is for:
'name' => 'Test Text',
'desc' => 'field description (optional)',
'std' => 'Default text goes here',
'id' => $prefix . 'test_text',
'type' => 'text'
We should probably include that in the wiki in all the examples.
argh. How did I miss that? Sorry. and Thanks!
No problem, as Bill says it's something we need to document better :)
You missed it as "std" is un-necessarily abbreviated...
perhaps 'default' should become the standard, and 'std' depreciated. and add this to the examples. I totally missed this as well. To be honest, I still don't know what std means. standard?
I agree, we should add 'default' and then do a check for 'std' in case anyone is still using that
+1 from me as well. Default makes more sense, dont remember how we ended up with std to begin with :P
I don't care what it's called. Just glad the feature exists.
I did it, here it is: #421
Thanks @SiR-DanieL Didn't realize there was an issue for this, but it's going to be in 1.0.1: https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/blob/trunk/init.php#L386