[wp-trac] [WordPress Trac] #22352: Update get_permalink() to allow for permalink structure argument
WordPress Trac
noreply at wordpress.org
Sat Nov 3 01:08:02 UTC 2012
#22352: Update get_permalink() to allow for permalink structure argument
-------------------------------------------------+-------------------------
Reporter: doublesharp | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Permalinks | Review
Severity: normal | Version: trunk
Keywords: has-patch needs-testing dev- | Resolution:
feedback |
-------------------------------------------------+-------------------------
Comment (by scribu):
Couldn't you use the 'pre_post_link' filter?
{{{
function my_change_permalink( $permalink, $post ) {
return '/foo/bar/';
}
add_filter( 'pre_post_link', 'my_change_permalink', 10, 2 );
$link = get_permalink();
remove_filter( 'pre_post_link', 'my_change_permalink', 10, 2 );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22352#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list