[theme-reviewers] Theme Customizer Question
Emil Uzelac
emil at uzelac.me
Wed Jun 4 02:18:46 UTC 2014
IMO it doesn't have sense to do both.
On Tue, Jun 3, 2014 at 9:15 PM, Stephen Cui <scui2005 at gmail.com> wrote:
> Now I know after several hours of digging. I have another question.
>
> Does it make sense to implement both customize and theme options? In my
> opinion, some options is better on theme option (e.g. more space).
>
> Regards
>
>
> On Tue, Jun 3, 2014 at 9:56 PM, Emil Uzelac <emil at uzelac.me> wrote:
>
>> I don't think that you need is_admin at all. Customizer already covers
>> the roles and capability by default.
>>
>> See http://themes.svn.wordpress.org/twentyfourteen/1.1/inc/customizer.php
>> for examples.
>>
>> Also see:
>> http://kwight.ca/2012/12/02/adding-a-logo-uploader-to-your-wordpress-site-with-the-theme-customizer/
>> this will give you an idea how API works :)
>>
>>
>> On Tue, Jun 3, 2014 at 8:01 PM, Stephen Cui <scui2005 at gmail.com> wrote:
>>
>>> Hi, Chip:
>>>
>>> I found the issue after several hours of digging.
>>>
>>> Normal I only admin related function by checking is_admin()
>>>
>>> if ( is_admin() ) {
>>> require( get_template_directory() . '/core/theme-customizer.php' );
>>> }
>>>
>>> However, the preview is not admin. Thefore I have to remove the
>>> is_admin() check.
>>>
>>> Regards
>>>
>>> Stephen
>>>
>>>
>>>
>>> On Tue, Jun 3, 2014 at 5:41 PM, Chip Bennett <chip at chipbennett.net>
>>> wrote:
>>>
>>>> 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.
>>>>
>>>> Using the Options API (get_option()) works fine with the Customizer.
>>>> Have a look at Oenology if you need a code reference.
>>>>
>>>>
>>>> On Tue, Jun 3, 2014 at 4:58 PM, Stephen Cui <scui2005 at gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> 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.
>>>>>
>>>>> Is this expected results? Do I missing anything here?
>>>>>
>>>>> Regards
>>>>>
>>>>> Stephen Cui
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> theme-reviewers mailing list
>>>>> theme-reviewers at lists.wordpress.org
>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> theme-reviewers mailing list
>>>> theme-reviewers at lists.wordpress.org
>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>
>>>>
>>>
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140603/023e5e77/attachment.html>
More information about the theme-reviewers
mailing list