2,265 reputation
22551
bio website tomauger.com
location Toronto, Canada
age
visits member for 4 years, 2 months
seen 8 hours ago

WordPress developer. Always learning. Hoping to contribute.


Nov
14
comment Working with l10n contexts (_x etc)
Wow, awesome. Thanks for this!
Oct
16
comment Working with l10n contexts (_x etc)
Hey Chip, I hear you, and to be honest, I'm pretty sure this has nothing whatsoever to do with WordPress. So why post here, right? It's just that it seems like such a common issue in the WP community that someone must have come across it already. I hope you won't recommend removing the question as a result - I do think it's quite relevant to the WP SE.
Oct
16
revised Working with l10n contexts (_x etc)
Further specifications to clarify what I have already tried, to prevent further answers like the one I just received.
Oct
16
comment Working with l10n contexts (_x etc)
Thanks for your comment. I should have specified in my original post that I AM adding _x, _ex and other variants to the keywords.
Oct
16
asked Working with l10n contexts (_x etc)
Oct
16
answered Why should I put if(have_posts()), is while(have_posts()) not enough?
Oct
8
accepted Debugging / displaying errors in WP_Widget->form()
Oct
1
awarded  Nice Answer
Sep
25
awarded  Popular Question
Sep
13
awarded  Notable Question
Sep
9
awarded  Necromancer
Aug
26
awarded  Popular Question
Aug
20
comment How to enqueue script if widget is displayed on page?
You can call wp_enqueue_script() any time before the wp_footer action. The widget is called during the building of the template page. You can either hook onto dynamic_sidebar action, detecting when your widget is actually displayed, or, more simply, just put your enqueue_script() right into the widget() method, as @ChipBennet recommends.
Aug
19
comment How to enqueue script if widget is displayed on page?
Cool idea, but this doesn't actually address the OP's question, since is-active_widget() just lets you know whether a widget has been activated (ie: dragged into one of the sidebar areas in Appearance > Widgets), as opposed to actually appearing on any given page.
Aug
19
comment How to enqueue script if widget is displayed on page?
Ugh. wp_enqueue_script() please. No direct printing of JS.
Aug
14
comment How do filters and hooks really work in PHP
@OfirBaruch, I'm pretty sure the OP was referring to their implementation in WordPress, and wasn't suggesting there was some native PHP implementation thereof.
Aug
14
comment How do filters and hooks really work in PHP
This is a great general overview of hooks and filters, but I'm afraid totally misses the OP's question, which is about the internals of how hooks work and how WordPress creates, stores and processes them. Great answer; you should probably link to your tutorial on WP Sites.
Aug
13
comment How do filters and hooks really work in PHP
don't forget that as it's going through the callbacks, it orders the execution of multiple callbacks on the same hook using their "priority", which is set (optionally) with add_action() and apply_filters() and defaults to 10.
Jul
24
awarded  Popular Question
Jul
22
comment Is it necessary to use wp_reset_query() in a WP_Query call?
Just for others reading this, since this is still the accepted answer (@Rarst's answer should be accepted). Since the OP uses the_post() in his code, best practices dictate that he must use wp_reset_postdata(). wp_reset_query() calls wp_reset_postdata(), so that will work, though the other thing wp_reset_query() does - resetting the $wp_query global variable - is not necessary, but not harmful in this case. So the answer is actually YES