228 reputation
19
bio website flyingtrolleycars.com
location Seattle, WA
age 31
visits member for 1 year, 9 months
seen Aug 12 at 17:39

I'm a developer living in the Seattle area.


Jun
17
comment Redirect to a page after a few seconds
If your goal is to misdirect a search engine into believing the content is there then JavaScript won't help. Google's engine is sophisticated enough to realize you're changing the URL. If your intention is to have a URL actually redirect to correct content then you'll want to use wp_redirect() as below. There isn't really a great reason to show a page for 5 seconds.
Jun
17
comment get_plugins() doesn't work after plugins_loaded
There is no way to "not include the file". The codex explains that the function is, really, only designed for use in the admin side of WordPress - not for themes. If you want to use it in your theme go ahead and include the file as shown.
Jun
17
comment get post author id outside loop
It's also your own question. You can edit it to clarify.
Jun
17
comment Pages displays correctly but returning a 404 error in http header.
It certainly could. Unfortunately the magic that happens under the hood for finding old slugs is difficult to deal with. It also leaves a trail of records in your database. You can forcibly disable it by adding this to your functions.php: remove_action( 'template_redirect', 'wp_old_slug_redirect' );
Apr
16
comment Get Authors Role
If my answer worked please mark it as the solution.
Apr
12
comment What is wrong with this wp_query?
Just a quick side-comment. Why not just use "get_posts" instead of juggling all that stuff with the $wp_query variable? As far as the main question, my guess would be a mismatch with the time value stored in the DB compared to date('g:i A').
Apr
12
comment Get Authors Role
You question is a little confusing. The first code echoes a user's role. The second code adds a template part based on their role. What, exactly, are you trying to do?
Apr
4
comment Removing fields from the Media Uploader/Gallery
I agree. For now I've opened a ticket over on Trac. If they're going to make it the same as any other post it should respond to remove_post_type_support(), at least.
Apr
3
comment $form_fields from attachment_fields_to_edit returning empty array
After investigating the only thing I could figure out was to catch admin_head and admin_footer to forcibly modify the HTML. It's pretty klugey.
Apr
3
comment $form_fields from attachment_fields_to_edit returning empty array
Yeah, @Dan. I'm running into the same thing. This comment on trac would seem to verify your thoughts about the new media manager working differently. Did you have any luck figuring this one out?
Apr
3
comment Removing fields from the Media Uploader/Gallery
This Trac comment makes it clear that the solutions below will no longer work. Does anyone have an updated anser to this question? core.trac.wordpress.org/ticket/22664#comment:7
Apr
3
comment Removing fields from the Media Uploader/Gallery
Doesn't appear to work any more. $form_fields is empty for this filter.
Mar
26
comment Settings API - save multiple tabs at once
Thanks for the heads up, Chip. You're absolutely right. I guess what I should suggest is that you register an option of "my_theme_has_been_installed" and if it hasn't been set then do the init and set it. I rather like your more detailed answer, though. :)
Mar
25
comment How to change post format from Aside to Image for all posts?
If there aren't enough posts displayed on one page you can also open the "Screen Options" section at the top of the page and display more posts per page.
Mar
25
comment Save list from a custom meta box?
Please mark the answer below as accepted.
Mar
25
comment replace html entities in posts between pre tags
Have you tried Raw HTML and wrapping your <pre> blocks in the Raw HTML tag provided?
Mar
24
comment Hook 'wp_enqueue_scripts' priority has no effect
I'm going to try to make this clear one more time. Your priority is not ignored. That is the order in which they are added to the list. But the list gets rearranged. You can add them in wp_head, and it may work for now, out of sheer luck. But if you upgrade or add a plugin, it might fail. Just because they are added in order doesn't guarantee they will stay in order. The only way to guarantee that is using dependencies.
Mar
22
comment Is there an alternative way to upload html without using TinyMCE?
Most of the sanitizing happens in the WordPress code and not while editing in TinyMCE. This means that the behavior can be changed with plug-ins.
Mar
22
comment Hook 'wp_enqueue_scripts' priority has no effect
Your function priority is being honored but after being added to the list they are (usually) rearranged to honor dependencies.
Mar
22
comment Hook 'wp_enqueue_scripts' priority has no effect
Internally WordPress waits to collect all of the scripts before including them. Say WordPress adds 7 of its own script then you add your three. Some point much later WordPress looks at the list and includes them however it sees fit (by figuring out which scripts depend on each other). It doesn't matter what order you add yours because the order is ignored while WordPress looks at the dependencies. e.g. You add 3 scripts that need jQuery but jQuery is added fourth. jQuery is moved to the first position. You can only guarantee order by "3 needs 2", "2 needs 1".