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

WordPress developer. Always learning. Hoping to contribute.


Apr
26
comment How do I enqueue styles/scripts on certain /wp-admin pages?
Looking at my answer now, I believe that explicitly enqueueing jquery-ui-core and jquery-ui-tabs is entirely superfulous, since those scripts are already registered. You just need to call them in the dependency. I'll update my answer accordingly.
Feb
25
comment Opinions and recommendations on the best barebones base theme
Just coming back to his old (not constructive) thread, and just wanted to point out that in the years since I posted this, I have moved (like so many others) toward starter themes like underscores.me, which I have then adapted and roll out and customize for pretty much any project that needs a bespoke design / functionality.
Jan
6
comment Wordpress changes URL?
I'm confused how <a href="1-5/redrum-5/"> could ever link to 1-5/redrum-4 redirect or otherwise. I get it that this is a "next" button, but if the href is redrum-5 that's where it's going. WordPress isn't going to automagically guess that you want to go to the "previous" or "next" page. Perhaps you could clarify a bit more?
Dec
9
comment How does WordPress generate URL slugs?
Also consider sanitize_title_with_dashes() if you want to be a little more explicit about generating a URL-friendly slug.
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.