[theme-reviewers] Alternative to eval()
Justin Tadlock
justin at justintadlock.com
Fri Apr 29 15:48:38 UTC 2011
Why not just make a plugin for this to extend the theme?
On 4/28/2011 10:39 AM, Philip Walton wrote:
> Out of curiosity, why are you wanting them to be able to execute PHP?
> I would think that someone savvy enough to hand code PHP into a
> textarea would be savvy enough to add it to the functions.php.
>
> Or perhaps, if you're worried about upgrades overwriting such
> modifications, you could make your own custom-functions.php file that
> isn't controlled by svn. (Actually, that still may get deleted in an
> upgrade, someone else would have to confirm.)
>
>
> On 4/28/11 4:58 AM, Rahul Bansal wrote:
>> Hi All,
>>
>> In next theme, we are preparing for open-source release, we want to provide
>> a "hooks-editor" interface.
>>
>> Like many pro themes, we have added a lot of custom action& filter hooks in
>> our theme code base.
>> In admin area, we plan to provide list of hooks, each coupled with a
>> textarea, which can be used to post php-html codes in them (like
>> action-handlers)
>>
>> Now, to "execute" action handlers in textarea, we need to use eval()
>> function in PHP which is prohibited here.
>>
>> So what are my alternatives here?
>>
>> Just a note - we do not want to provide custom.css and/or
>> custom-functions.php files (like thesis provides) as they are hard to
>> maintain in multisite environment.
>> Also child-theme support is not yet present on repo so creating child themes
>> with style.css& function.php (to declare action handlers) is not feasible
>> either at this stage.
>>
>> Please suggest something.
>>
>> Thanks,
>> -Rahul
>> --
>> Rahul Bansal | Founder& CEO | rtCamp Solutions Pvt. Ltd.
>> Skype: rahul286 | Twitter: @rahul286 | Web:http://rtcamp.com/
>>
>>
>> _______________________________________________
>> 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/20110429/df27dd0b/attachment.htm>
More information about the theme-reviewers
mailing list