[wp-hackers] post_name_check

Alex King lists at alexking.org
Mon Apr 18 21:58:20 GMT 2005


Hi Jamie--

I've run into a problem with Singular: it overwrites any selected post 
slug with the generated slug from the post title.

I'm looking at 3 possible solutions:

1. Check for $_POST['post_name'] which should still be around. (I think 
this is best)
2. Retrieve both post_name and post_title and compare them before 
overwriting - could be complicated.
3. Retrieve post_name and do some regex to see if the last digit is a 
number, yada-yada-yada.

I'm going to implement #1 as #2 and 3 seem like poor solutions to me. 
Perhaps the rest of you have better ideas?

Cheers,
--Alex

http://www.alexking.org/


On Apr 12, 2005, at 5:08 AM, Jamie Talbot wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alex King wrote:
> | Thanks Jamie. I guess this is easier to update than having to re-hack
> | the source. :)
> |



More information about the wp-hackers mailing list