2,320 reputation
32551
bio website tomauger.com
location Toronto, Canada
age
visits member for 4 years, 4 months
seen Jul 2 at 20:07

WordPress developer. Always learning. Hoping to contribute.


Jun
30
comment What action should I hook into when adding roles and capabilities?
@krembo99 if your plugin is adding roles dynamically (ie: as a result of user action), then there's no reason you couldn't just use the basic add_role(), since it wouldn't be called every time WordPress loads (assuming that true == $use_db). It's more of an issue if a plugin adds base functionality that requires new roles/caps to be created, in which case register_activation_hook is a great solution. Where it is still a problem is for mu-plugins or bespoke theme-dependent functionality. In that case, commenting out the code after you run it the first time works, though inelegantly.
Jun
25
awarded  Famous Question
May
22
awarded  Good Answer
Apr
30
awarded  Popular Question
Apr
26
revised How do I enqueue styles/scripts on certain /wp-admin pages?
Got rid of explicitly enqueueing jquery-ui-core and jquery-ui-tabs since they're going to be auto-enqueued as a result of being listed as dependencies of `my-script`
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.
Apr
23
answered How To Retrieve An Image Attachment's Alt Text?
Apr
22
answered Javascript WP Object Documentation?
Mar
4
awarded  Yearling
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.
Feb
25
awarded  Favorite Question
Feb
14
awarded  Popular Question
Feb
12
awarded  Notable Question
Feb
6
awarded  Popular Question
Jan
26
answered Can WordPress crop only the post thumbnails?
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
30
awarded  Taxonomist
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.
Nov
18
awarded  Famous Question
Oct
23
awarded  Famous Question