From 8cbe134f81897c935559e8fad76b290030783366 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 18 Apr 2007 22:51:54 +0000 Subject: [PATCH] Add url_to_postid filter. Props Alex King. fixes #4160 git-svn-id: http://svn.automattic.com/wordpress/trunk@5283 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rewrite.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 125f91217..cf545aa81 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -63,6 +63,8 @@ function add_rewrite_endpoint($name, $places) { // determine the post ID it represents. function url_to_postid($url) { global $wp_rewrite; + + $url = apply_filters('url_to_postid', $url); // First, check to see if there is a 'p=N' or 'page_id=N' to match against preg_match('#[?&](p|page_id)=(\d+)#', $url, $values);