« first day (2900 days earlier)      last day (2033 days later) » 

2:54 AM
Stack Exchange updates: Relative links within posts now work properly with the Linked sidebar.
posted on September 08, 2018

Relative links within posts now work properly with the Linked sidebar.

Stack Exchange updates: The new responsive design has been rolled out to all beta and graduated sites without a custom de
posted on September 20, 2018

The new responsive design has been rolled out to all beta and graduated sites without a custom design.

 
 
11 hours later…
1:52 PM
@TomJNowell I just wanted to thank you for your advice about multi-step form processing.
If I'm utilizing the REST API, should I be flushing rewrite rules on init or on rest_api_init?
 
2:49 PM
Flushing rewrite rules is heavy and shouldn't be ran on each load
Most suitable hooks would be either "after_switch_theme" or plugin activation
 
3:24 PM
@Feeds Finally after a decade, the responsive design. Still lacking a mobile app that has the moderation tools.
 
 
1 hour later…
4:30 PM
I know that it should be done on activation/deactivation, but once either of those evens are triggered, don't you still have to respect the traditional hook process in order to ensure the rewrite rules are flushed AFTER they've been modified?
AKA after the rest routes have been added.
 
5:23 PM
who said that wordpress has a bad code and bad security? a maintainer of a library had just justified to me his use of eval :(
@MichaelEcklund rewrite rules should always be registered on init
IIRC it does not matter much when you flush them
@JackJohansson those plugin activation hooks are overly appreciated. There are all kind of situations (multisite network activation) in which they are not going to be triggered
 
5:48 PM
@MarkKaplun It seems like it does, I did a quick dive in the core and it looks like the rules are flushed no matter if they aren't changed. Also, in every corner of codex you can find a note "Don't just flush rules on init"
 
 
1 hour later…
6:58 PM
@JackJohansson not sure what you refer to with "it does". in case it is plugin activation, well it is not triggered on upgrade or git pull etc, so there is no reason to actually trust them, and this goes to themes as well.
as for rewrite rules IIRC all that flushing does is to delete the option. Maybe if you do it in init there might be some race condition, but I wasn't thinking about such edge cases.
 
7:40 PM
@MichaelEcklund why would you flush rewrite rules on any init? You only flush them when they change, and you make sure the rules are added after
if you add the rules, then flush, then it's like painting a portrait of someone and finishing it off by wiping the canvas clean at the end
flushing rules on every page load is bad, just load the permalinks page and refresh it when you change rules
simply visiting that page flushes permalinks
 

« first day (2900 days earlier)      last day (2033 days later) »