Skip to main content
5 events
when toggle format what by license comment
Sep 18, 2017 at 20:44 answer added Jan Boddez timeline score: 1
Sep 18, 2017 at 18:01 comment added rudtek No, the code appears to be correct. The question is: did you try to disable the plugin then re-enable it? That's when the flush will happen with this code.
Sep 18, 2017 at 17:59 comment added danilocgsilva If you look to code that I share, you can see that I used the register_activation_hook, and supposedly is where the code run at plugin activation. Unless that is an alternative way to do that, yes, I tried to flush the rewrite rules at plugin activation and did not worked. Is there an alternative way to do that?
Sep 18, 2017 at 15:43 comment added rudtek With that rule, you're only going to flush the rewrite rules and permalinks when you activate the plugin. Did you try that? Turning it off and back on again? btw that IS the way a the flushing of rules is supposed to work. You don't want to be flushing all the time: it uses quite bit of resources. More info could be provided if you could detail what you mean by "new content".
Sep 18, 2017 at 15:18 history asked danilocgsilva CC BY-SA 3.0