230 reputation
19
bio website mattdeclaire.com
location San Francisco, CA
age 35
visits member for 3 years, 2 months
seen May 16 '13 at 4:03

<--


Sep
8
awarded  Popular Question
Jul
2
awarded  Curious
Jan
22
awarded  Yearling
Apr
22
awarded  Popular Question
Dec
7
comment I need a “Choose from existing content” popin
I'm referring to a modal popup box, which is simply a floating element in the page. As opposed to an actual popup, which is a new window, typically opened with window.open().
Apr
2
revised How do I flush the rules after saving settings using the Settings API?
adding chosen solution
Apr
2
accepted How do I flush the rules after saving settings using the Settings API?
Apr
2
comment How do I flush the rules after saving settings using the Settings API?
Note: My settings page is little more than turning on/off archives, so there aren't a bunch of other settings they will change often. If I ever add more non-permalink related settings, then I will check inside the validation callback to see if the archive option actually changed before setting the transient.
Apr
2
comment How do I flush the rules after saving settings using the Settings API?
The way I see it, I'm flushing the rules only as often as they change the settings. And I'd rather do the work than tell then to do it. Regardless, the transient strategy is working well for me. I'd rather only set the transient if the settings are saved, than when they are validated, but I'm not throwing any errors, so they are effectively the same.
Apr
2
comment How do I flush the rules after saving settings using the Settings API?
The function I would have written myself would have only flushed the rules after capturing the $_POST, testing for nonce, etc. You do bring up a good point about the order of things. My register_post_type() calls happen before the settings are saved, so the has_archive flag would already be set. The one-time flush using transients sounds like an idea, but the question remains. When do I set the trigger? In the settings sanitation callback? On an admin_init hook, in which I first test for the right $_POST variables?
Apr
2
asked How do I flush the rules after saving settings using the Settings API?
Mar
27
awarded  Supporter
Mar
21
revised Second Custom Post Type Archive
said "does" when meant "does not"
Mar
21
accepted Second Custom Post Type Archive
Mar
6
asked I need a “Choose from existing content” popin
Mar
4
comment Second Custom Post Type Archive
I've added my own solution. I'm open to improvements on it.
Mar
4
revised Second Custom Post Type Archive
I had the can_modify_query test in the __construct(), but the is_ functions weren't working there.
Mar
4
answered Second Custom Post Type Archive
Mar
3
comment Second Custom Post Type Archive
Maybe I reuse the archive page with a query param. I could htaccess rewrite the param to a pretty url.
Mar
3
asked Second Custom Post Type Archive