Changes between Initial Version and Version 1 of Ticket #48622, comment 4
- Timestamp:
- 11/14/2019 03:36:42 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #48622, comment 4
initial v1 14 14 15 15 So, are you sure that the value you are getting is from the same types of calls every time? The block editor uses the REST API to make calls, so is it possible that you're seeing some other value come through an editable_slug filter which you were not expecting? 16 17 Edit: On an additional note, because this is a filter and not an action, then you shouldn't be using it to retrieve the slug. Filters are intended to, well, filter. You use them to modify data as it passes through the system. You don't typically save that data for use elsewhere. That's what actions are for, actions are called when data is being made available to be used. If you need the post slug to save or otherwise do something with it, then finding an action would be what you want here.