<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I don't think that you need is_admin at all. Customizer already covers the roles and capability by default.</div><div class="gmail_default" style="font-family:verdana,sans-serif">
<br></div><div class="gmail_default" style="font-family:verdana,sans-serif">See <a href="http://themes.svn.wordpress.org/twentyfourteen/1.1/inc/customizer.php">http://themes.svn.wordpress.org/twentyfourteen/1.1/inc/customizer.php</a> for examples.</div>
<div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Also see: <a href="http://kwight.ca/2012/12/02/adding-a-logo-uploader-to-your-wordpress-site-with-the-theme-customizer/">http://kwight.ca/2012/12/02/adding-a-logo-uploader-to-your-wordpress-site-with-the-theme-customizer/</a></div>
<div class="gmail_default" style="font-family:verdana,sans-serif">this will give you an idea how API works :)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 8:01 PM, Stephen Cui <span dir="ltr"><<a href="mailto:scui2005@gmail.com" target="_blank">scui2005@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, Chip:<div><br></div><div>I found the issue after several hours of digging.</div><div><br></div><div>
Normal I only admin related function by checking is_admin()</div><div><br></div><div>if ( is_admin() ) {<br>
</div><div>   require( get_template_directory() . '/core/theme-customizer.php' );<br></div><div>}</div><div><br></div><div>However, the preview is not admin. Thefore I have to remove the is_admin() check.</div><div>

<br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Stephen</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jun 3, 2014 at 5:41 PM, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net" target="_blank">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"><div dir="ltr">Can you post code somewhere? GitHub/Gist etc.? It's really impossible to say for certain what the issue is without seeing what you're doing.<div>

<br></div><div>Using the Options API (get_option()) works fine with the Customizer. Have a look at Oenology if you need a code reference.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Tue, Jun 3, 2014 at 4:58 PM, Stephen Cui <span dir="ltr"><<a href="mailto:scui2005@gmail.com" target="_blank">scui2005@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi, <div><br></div><div>I am in the process to change my theme to use customize. I use method 3 from Otto's tutorial. However, the customize preview and get_option does not work well. get_option is always getting the value from the database.</div>



<div><br></div><div>Is this expected results? Do I missing anything here?</div><div><br></div><div>Regards</div><span><font color="#888888"><div><br></div><div>Stephen Cui</div><div><br></div></font></span></div>

<br></div></div>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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></div><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>