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.


Mar
24
comment How do I enqueue styles/scripts on certain /wp-admin pages?
Sure it's still supported. Line 206 of admin.php. Been there since 2.6, and unlikely to go away any time soon (ever).
Dec
7
comment the_author_posts_link() for authors of custom post types
Haha, are you kidding me? Well THAT definitely would be the way to go, but I would definitely need to verify that. If so, then I will humbly thank you for taking me to school.
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
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.
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
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
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
2
comment Why does get_term() require taxonomy? Are term_ids not unique?
Hi @kaiser, update it with what? I'm not sure that there has been any further positive movement toward a resolution of the Trac issues mentioned.
Jun
5
comment Multisite with a single, shared custom post type, while retaining site URL
I've already been there, and that's why I created this question specifically. Thanks for the comment though.
May
28
comment How to obfuscate theme directory URLs
Thanks @Toscho. I realize that my original question was a bit silly, considering that WordPress exposes the theme directory and URI in so many other ways. I really appreciate your link to your other post on Endpoints. Lots to learn there!
May
22
comment How to use taxonomies on attachments with the new Media Library?
Frank, don't forget that for attachment taxonomies, you should probably set update_count_callback to _update_generic_term_count. See updated Codex entry for why: codex.wordpress.org/Function_Reference/…
May
22
comment What is 'term_group' for 'order_by' in get_terms()?
The bottom line is... don't use it, as it's not currently supported and term aliasing is neither currently supported either, nor is it fully thought through and has a bunch of nasty pitfalls to boot. Codex updated.
May
17
comment Run an action only when Widget actually instantiated (not just registered)
@Rarst, a valid point, and one I'll be sure to keep in mind. In this particular case, I think it makes complete sense to tie the metaboxes in the Edit Post page to the presence of the Widget.