Created
October 20, 2014 22:54
-
-
Save RCowles/177acfd0db2c78f6818b to your computer and use it in GitHub Desktop.
Customize the output of wp_get_shortlink on your site to replace all shortlinks with standard permalinks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tweakjp_cust_shortlink() { | |
global $post; | |
if ( !$post ) | |
return; | |
return get_permalink($post->ID); | |
} | |
add_filter( 'get_shortlink', 'tweakjp_cust_shortlink' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment