Created
November 10, 2011 18:17
-
-
Save ninnypants/1355629 to your computer and use it in GitHub Desktop.
Permalink export for Dustin Nay - changed location of function call.
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
<?php | |
add_filter('template_include', 'export_perms'); | |
function export_perms(){ | |
$posts = get_posts(array( | |
'post_type' => array('post', 'page'), | |
'numberposts' => -1, | |
)); | |
$perms = ''; | |
foreach($posts as $post){ | |
setup_postdata($post); | |
$perms .= get_the_permalink().', '; | |
} | |
echo trim($perms, ','); | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment