Posted People, Posted Life.
Archive for all
October 6, 2008 at 3:56 am · Filed under ASP Program and tagged: aCookieStatCounter, all, application, application vnd, application vnd ms-excel, application vnd ms-powerpoint, blog, cannot get cookie, class, com, com project, com project standard, Connection, cookie, download log php, else, end, end if end, error, function, GetAllResponseHeaders, host, HTMLEncode, http, http vhost, http vhost2, HTTP_USER_AGENT, id, image, instr lcase, instr lcase vstr, Keep-Alive, kgetstring, kgetstring vstr, kurlget, lcase, lcase vstr, li, log php project, ohttp, ohttp status, php, php project, php project id, phpsessid, pre, project, project id, project standard, project standard csv, project standard download, red, referer http vhost2, response, server htmlencode, server htmlencode vcookie, serverVariables, set-cookie, setRequestHeader, standard, standard download log, statcounter, statcounter com, statcounter com project, User-Agent, username or password, vcookie, vcookie kgetstring vcookie, vhost, vhost2, vnd, vprojectid, vstr, vstr kurlget, vuser, web, Write, x-www-form-urlencoded
June 23, 2008 at 2:16 am · Filed under WordPress and tagged: all, apply_filters, common words, do_action, english, filter, filters, function, me, name, other, post, post name, post title, post_name, post_title, preg, replace, sanitize title, sanitize title function, seo, substr, tags, title, url, WordPress, work
Few days ago, I was not satisfied with the ugly URL of some post, so I hacked “sanitize_title” function. After I said that time, I also not satisfied with super-long URL and want short them. After short WP category permalink structure today, I put more hacked code in sanitize_title function for short URL. Anyhow, shit happens and I noticed sanitize_title function also used almost everywhere, special when normal visitor visit and process the URL. I don’t want to explain how this mess up, just forget it.
So, I need new method of short and nice URL for article post. I need find a place for “apply_filters” or “do_action“, after quite long time track from /wp-admin/post.php, finally I found at sanitize_post_field function, $value = apply_filters(”pre_$field”, $value); to pretreat all submit data.
Here is my filter: Read the rest of this entry »