[wp-hackers] what function creates the post slug?
Dion Hulse (dd32)
wordpress at dd32.id.au
Tue Aug 23 14:27:49 UTC 2011
I'd be looking into the wp_insert_post_data filter in wp_insert_post()
and the "{$field_no_prefix}_save_pre" filter in sanitize_post_field()
function, however the latter provides no $context or post object for
reference, so you're probably better off filtering on the raw post
data..
On 24 August 2011 00:19, Ricardo Moraleida <moraleida at gmail.com> wrote:
> Hi guys, quick question here...
>
> i wanted to create a hook to change how WordPress creates slugs on a
> specific custom post type that handles quite sensitive data.
>
> I've just spent a few hours looking at rewrites and such but although the
> information is pretty helpful, i just don't think rewriting the slug display
> is the way to go, as it would be much safer to just have wp save a fixed md5
> slug for that specific post type.
>
> I imagine there's a simple sanitizing function that takes the post title and
> transforms it, and then saves it to the db as slug, but i can't seem to find
> it.
>
> Any help?
>
> thanks!
>
> Ricardo Moraleida
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list