8,104 reputation
1030
bio website
location 127.0.0.1
age
visits member for 3 years, 6 months
seen 10 hours ago

I sell sea shells by the sea shore.


Jan
5
answered How do I check if a post is private?
Jan
3
comment Best way to initiate a class in a WP plugin?
@bueltge Thanks for the link, shall read. Looks like a good discussion!
Dec
21
revised template_redirect not being called when using ajax
added code samples and additional link to reference material
Dec
19
awarded  Outspoken
Dec
19
answered Categories Template Assistance
Dec
14
comment How to use is_single and get_post_type within a plugin?
@webaware 7pm Friday night here too... so I hope that glass has something else to go with that ice.
Dec
14
comment How to use is_single and get_post_type within a plugin?
@webaware We both know what the purpose of template_redirect is, yay, but your last sentence is... confusing. Who's getting upset? You presuming I'm upset? Are you upset? Don't get upset bro. What if Tom, Dick and Harry all want to use template_redirect for its "intended purpose" but each of which decide to exit after hooking onto this action? Then what? We going to have a hook-off? This is what I am talking about. Also I asked for your suggested solution, because your example thus far shows one plugin using the hook in the wrong context. For the sake of educating others, what say you?
Dec
14
comment How to use is_single and get_post_type within a plugin?
@webaware In that example, NextGEN are using the wrong hook for the intended purpose of script injection. Agreed. Although, it is a bit presumptuous on behalf of WP-eCommerce that no one else outside their plugin would want to use template_redirect nor be allowed to for that matter! That's a akin to saying, "if WP-eCommerce is installed no one else dare use template_redirect or else!" - what if that's the most appropriate context? It could be solved with priority but even so I still think thats more or less a poor design decision on WP-eComm's behalf. What is your suggested solution?
Dec
14
comment How to use is_single and get_post_type within a plugin?
@webaware Can you provide some context/example? Hooking onto template_redirect allows your processing to occur within the context of this hook before the layout is rendered to screen. If a theme or another plugin ends processing before this hook is being fired, what then is being rendered to screen? I would say nothing is. If that is the context in which you are wanting to know if something is_single or so on, then template_redirect is fine to use, else you can use another hook up the chain as suggested. I'd still like to see some more context provided to your comment though? Cheers mate
Nov
30
awarded  Nice Answer
Nov
30
revised How can I show 1 featured post in a styled element, and the next few below differently styled
added 1 characters in body
Nov
30
comment How can I show 1 featured post in a styled element, and the next few below differently styled
Indeed there is.. I threw that in there to test you ;) haha.. not. Thanks for pointing that out, I'll update that now.
Nov
29
comment What is the Plural of WordPress?
Yes you are right but, but at least 15,000 others have violated your law :)
Nov
29
comment What is the Plural of WordPress?
@brasofilo Hey Sue Says? When you figure that one out let me know :)
Nov
29
comment What is the Plural of WordPress?
@JohannesPille You can phrase it like that if you want, but its still incorrect. If you want "two cans of Pepsi", you would say, "hey busboy, two Pepsi please!" no "s". Just like "I have five WordPress on my server" would be the correct form of the expression, no "es". Sure that's harder to digest but you'd normally say "I have five WordPress installations on my server" or something similar that indicates the plural form. Trademark or not, that's irrelevant. Some words and names just can't bastardized like we do with everything else in the English language :)
Nov
18
revised Where to put my code: plugin or functions.php?
Suggested links to references that underpin this question
Nov
18
comment Use navigation path from menu for permalink
If you can some how pass variables on links contained ONLY within the menu link structure and output, you could then use those variables to conditionally control your rewrite rules as you'd be able to determine whether a click/request for a URL is coming from a menu item or coming from somewhere else in your theme other than a menu and thus present a URL structure based upon that origin. Seems possible to me... Thoughts?
Nov
17
comment Multiple Content Block
+1 Loving your answers buddy! Keep it up.
Nov
16
comment the_title() and the_permalink() won't work on AJAX calls
@powerbuoy It works without AJAX/global $post because its already in the context of the loop which has already setup and provided the necessary globals. An AJAX function held externally to the loop does not know of the context in which it is required so you need to tell your function, "hey, you need this global, that global, to make this request work". Using get_template_part does this for you, otherwise you need to do it yourself. I do wonder the performance differential versus get_template_part and include, the latter may be more efficient.
Nov
16
comment the_title() and the_permalink() won't work on AJAX calls
@powerbuoy If you follow the paper trail of functions right back to load_template you can see that the difference in a raw include versus the former is substantial. get_template_part (and friends), takes your requested file through an entire process of initialization passing along the KEY global variables needed to access common data and to allow certain API functions to operate correctly, include does not as it knows nothing of its (WP) environment. So you can use an include so long as you provide the necessary globals.