[wp-hackers] Activation hook exist for themes?

Sudar Muthu sudar at sudarmuthu.com
Mon Sep 14 14:29:55 UTC 2009


Hi all,

(Sorry for digging the old thread)

Ozh solution is nice, but it will get triggered every time any theme is
activated. I wanted to trigger a function only when my theme is triggered.
Is it possible to do that?

With Regards,
Sudar

http://SudarMuthu.com
http://twitter.com/sudarmuthu


On Tue, Sep 1, 2009 at 03:14, rajasekharan <websweetweb at gmail.com> wrote:

> I went with Ozh's approach and it worked well. But still, a formal method
> for this would be convenient and
> give us some peace of mind. Who knows? Something may change in the next
> version and this method may break.
> Hope the core people are reading this thread.
>
> Peter Westwood wrote:
>
>> On 31 Aug 2009, at 00:46, Dion Hulse (dd32) wrote:
>>
>>  Theres a ticket, there was a messy patch from me(IIRC) but i dont think
>>> its in core yet.
>>>
>>
>> This is what I was thinking of:
>>
>> When WordPress switches themes it fires the switch_theme action.
>>
>> Unfortunately this is run before the theme is active so is really more use
>> as a deactivation hook.
>>
>> Peter
>>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list