Great article... :-)<div><br><div>Added to - <a href="http://make.wordpress.org/themes/about/resources/">http://make.wordpress.org/themes/about/resources/</a> (comments section)</div><div><br></div><div>Timing is good as well! 10 pages gives a lot to explore on weekend! ;-)</div>
<div><br clear="all">--<br>Rahul Bansal | Founder & CEO | rtCamp Solutions Pvt. Ltd.<br>Skype: rahul286 | Twitter: @rahul286 | Web: <a href="http://rtcamp.com/" target="_blank">http://rtcamp.com/</a><br><br>
<br><br><div class="gmail_quote">On Fri, Feb 18, 2011 at 9:11 AM, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
All,<div><br></div><div>I have just published a tutorial: <a href="http://bit.ly/hHjo6n" target="_blank">Incorporating the Settings API in WordPress Themes</a>:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><span style="color:rgb(85, 85, 85);font-family:TeXGyreScholaRegular, 'URW Bookman L', Garamond, 'Century Schoolbook', 'Bookman Old Style', Georgia, serif;font-size:15px;line-height:23px"><p style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:2em;margin-right:0px;margin-bottom:0px;margin-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial">
While others such as <a href="http://ottopress.com/2009/wordpress-settings-api-tutorial/" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;color:rgb(85, 136, 170);text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(85, 136, 170);font-weight:bold" target="_blank">Otto</a> and <a href="http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;color:rgb(85, 136, 170);text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(85, 136, 170);font-weight:bold" target="_blank">Ozh</a> have done yeomen's work in explaining how to implement the Settings API, I have not yet come across anything that really put everything together, and explained the process and implementation from beginning to end, in a way that even the less-experienced Theme developers (like me) could easily understand.</p>
<p style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:2em;margin-right:0px;margin-bottom:0px;margin-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial">
This tutorial will attempt to fill that gap, by providing examples of current (as of the pending release of WordPress 3.1) best-practice implementation, not merely of the Settings API, but of Theme Options implementation as a whole, including:</p>
<ul style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:1em;margin-right:0px;margin-bottom:0px;margin-left:10px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial">
<li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">Registering options in the database as a single options array</li>
<li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">Initializing default options</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Creating a single Theme Settings page (with tabs)</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Defining settings page sections and fields</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Validating and white-listing user-input form data</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Adding Settings Page contextual help</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Enqueueing custom CSS for the Settings page</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Implementing settings in the Theme template files</li><li style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:25px;line-height:1.1em">
Enqueueing front-end CSS</li></ul></span></div></blockquote><div><br></div><div>Please give it a read; I hope it is helpful. Also, any feedback, comments, corrections, criticism, etc. is welcome, so please comment!</div>
<div>
<br></div><font color="#888888"><div>Chip</div>
</font><br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div></div>