1,991 reputation
1843
bio website tomauger.com
location Toronto, Canada
age
visits member for 3 years, 4 months
seen 4 hours ago

WordPress developer. Always learning. Hoping to contribute.


Sep
1
comment Is there a way to list all the JavaScript scripts that are actually loaded by WordPress? Do we care?
Thanks for the detailed answer! Much appreciated.
Sep
1
accepted Is there a way to list all the JavaScript scripts that are actually loaded by WordPress? Do we care?
Sep
1
asked Is there a way to list all the JavaScript scripts that are actually loaded by WordPress? Do we care?
Aug
30
comment Memory usage when querying users
Not that I'm a proponent of direct DB access, but if you're running into extreme memory situations, would that be a solution for you? get_users() will cache each "gotten" user in RAM; if you have a buttload of users, this will eat a ton of RAM. You might bypass this with a direct DB query.
Aug
30
comment Detection of theme being used
The bigger question here is why you would need this information. I have the suspicion that your need to get the current theme may be due to some other, possibly non-standard, approach that could probably be done a lot easier the "WordPress way". Care to elaborate?
Aug
30
comment What's the difference between get_the_time and get_the_date?
The real question for me is why is the template tag called "the_time()" but the "get" version is "get_the_date()"!?
Aug
29
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
It will be a generated image in most cases. I'm totally cool with it being a separate image that is created manually (outside WP) and uploaded separately.
Aug
29
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
please if you have the time, post your other solution. This is not just for me, but for future seekers who come upon this thread. Appreciate you giving back to the community.
Aug
29
accepted Will I see a performance hit if I use native API calls like get_the_title() instead of $post->post_title?
Aug
28
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
@helenhousandi well, the plugin appears to be broken in WP 3.2.1, but there's a lot of good code in there that might be salvageable. I'll post back if I write a plugin
Aug
28
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
@helenhousandi brilliant blog post. I'ma try the plugin now, see how well it works.
Aug
28
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
+1 for suggesting a completely out-of-the-box way to handle this. It is, in fact, an approach I have been considering in the absence of other options. The downvote was probably because your answer seems to indicate that I should hard-code the URLs with HTML, but this is not necessary, since the Insert Image or Insert Media buttons will do all that for you.
Aug
28
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
How do you figure that ACF will be able to help me with my media upload issue?
Aug
26
answered Using wp_trim_excerpt to get the_excerpt() outside the loop
Aug
26
comment Will I see a performance hit if I use native API calls like get_the_title() instead of $post->post_title?
Awesome. Can you update your answer so I can accept it?
Aug
26
revised Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
added 105 characters in body
Aug
26
comment Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
Note that I'm not necessarily suggesting that the image thumbnail should be automatically generated. Just have the ability to upload a separate JPG or PNG and associate it as the thumbnail with a larger file.
Aug
26
comment Will I see a performance hit if I use native API calls like get_the_title() instead of $post->post_title?
thanks for the follow-up. I think I just haven't dug deeply enough into wp_cache to understand how consistently something is cached. Is EVERY get_post() request cached for the session? Does the cache get purged after a certain limit? I believe that it's pretty safe to do get_the_permalink($id) and then get_the_title($id) and it will NOT be 2 separate database calls. Do you agree?
Aug
26
asked Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
Aug
26
comment Will I see a performance hit if I use native API calls like get_the_title() instead of $post->post_title?
Let's not oversimplify my question, Rarst. Actually, if you dig into the code, you see that template tags are significantly more sophisticated than that. At least the get_ variety. IF the global $post object has been defined, AND no ID has been supplied, then the global $post object is used; however, if the ID is supplied, then it goes to the cache. If the cache has nothing for that ID, then it goes to the database.