[wp-hackers] Handling cookies with wp-plugin and wp-supercache
Donncha O Caoimh
donncha at linux.ie
Tue Nov 3 20:27:51 UTC 2009
And here we have it. WP Super Cache for Developers:
http://ocaoimh.ie/wp-super-cache-developers/
If you have feedback, please leave it on my blog post announcing it as
the above link is a page with no comment form:
http://ocaoimh.ie/wp-super-cache-developer-documentation/
Donncha
Donncha O Caoimh wrote:
> For the past few weeks I've been meaning to write a "Hacking Supercache
> for fun and pleasure" post with tips and tricks and lists of actions and
> filters that can be used.
>
> Unfortunately a lack of time has stopped me writing it so far but maybe
> this month.
>
> If you're curious, have a read through wp-cache-phase1.php. It's a short
> file but has some interesting stuff, and the plugins/ folder has 2
> example plugins.
>
> Donncha
> PS. it's not horrible, really! :P
>
> William Canino wrote:
>> +1 on starting the Super Cache API documentation.
>>
>>>> You'll be able to add a supercache plugin in the
>>>> wp-super-cache/plugins folder that uses that hook. You should
>>>> probably move
>>>> the plugins folder out of that directory as the next time you update
>>>> it'll
>>>> delete your plugin.
>>
>> Sorry for my language, but this is horrible.
>>
>>> Instead of modifying wp-cache-phase1.php you can use one of the
>>> cacheactions
>>
>> Donncha is referring to wp_cache_served_cache_file. He is right.
>> Instead of my previous code suggestion, I would have suggested this:
>>
>> function cookie-setting-code() {
>> // do stuff
>> }
>> add_cacheaction('wp_cache_served_cache_file', 'cookie-setting-code');
>>
>> The thing is, I don't know whether to put the code inline in the
>> plugin, in init, in wp_head or in functions.php. I haven't gotten
>> around to trying this and, well, there's no documentation.
>>
>>
>>
>> 2009/11/2 Konrad Karpieszuk <kkarpieszuk at gmail.com>:
>>>>
>>>> Instead of modifying wp-cache-phase1.php you can use one of the
>>>> cacheactions. You'll be able to add a supercache plugin in the
>>>> wp-super-cache/plugins folder that uses that hook. You should
>>>> probably move
>>>> the plugins folder out of that directory as the next time you update
>>>> it'll
>>>> delete your plugin.
>>>>
>>>> Doing this will make it easier to upgrade the plugin.
>>>
>>> Donncha, could you describe it (maybe create some small tutorial)
>>> somewhere
>>> how to do this? I think this will help for numerous wordpress plugins
>>> develeopers :) Your plugin (wp super cache) is really popular and in
>>> internet many times i saw questions from plugins developers that their
>>> plugins doesn't work if wp super cache is installed. Most of them
>>> finally
>>> decide to write in FAQ to disable wp super cache (truelly i did it
>>> also).
>>> But this is not good solutions, especially if your plugin is ready to
>>> handle
>>> this problem. Not everybody read source code of your plugin to find
>>> solution
>>> and today i first time see that it is possible to set and read cookie
>>> with
>>> wp super cache enabled :)
>>>
>>> If you will decide to write this (even shortly) i promise to help you in
>>> translating it into polish language.
>>>
>>>
>>> --
>>> (en) regards / (pl) pozdrawiam
>>> Konrad Karpieszuk
>>> http://konradjestwrwandzie.wordpress.com/
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
> _______________________________________________
> 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