1,881 reputation
1641
bio website tomauger.com
location Toronto, Canada
age
visits member for 3 years, 1 month
seen Mar 25 at 20:52

WordPress developer. Always learning. Hoping to contribute.


Sep
13
awarded  Notable Question
Sep
9
awarded  Necromancer
Sep
3
revised W3 Total Cache = WP Total Fail? Multiple errors after install
edited title
Sep
3
asked W3 Total Cache = WP Total Fail? Multiple errors after install
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
Jul
22
awarded  Notable Question
Jul
11
comment Add 'title' attribute to stylesheets with wp_enqueue_style()
Yeesh. How very DIY of you! Thanks for posting your solution.
Jul
11
comment Creating a Lightweight Media Tags Plugin with a Custom Taxonomy
Ok, see the second part of my answer. Also, since you're new here, please don't forget to Accept the correct answer when you're done!
Jul
10
revised Creating a Lightweight Media Tags Plugin with a Custom Taxonomy
Added answer for second part of OP's question
Jul
10
revised Creating a Lightweight Media Tags Plugin with a Custom Taxonomy
Found problem, working on solution
Jul
10
revised Creating a Lightweight Media Tags Plugin with a Custom Taxonomy
Updated post to note that I do see one of the issues the OP mentions.
Jul
10
answered Creating a Lightweight Media Tags Plugin with a Custom Taxonomy