Eliminate use of `extract()` in `trackback_url_list()`.

See #22400.

Built from https://develop.svn.wordpress.org/trunk@28382


git-svn-id: http://core.svn.wordpress.org/trunk@28210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-05-13 04:44:15 +00:00
parent bee6492b9b
commit ef8b813682
1 changed files with 9 additions and 12 deletions

View File

@ -3825,11 +3825,8 @@ function trackback_url_list($tb_list, $post_id) {
// get post data
$postdata = get_post( $post_id, ARRAY_A );
// import postdata as variables
extract($postdata, EXTR_SKIP);
// form an excerpt
$excerpt = strip_tags($post_excerpt ? $post_excerpt : $post_content);
$excerpt = strip_tags( $postdata['post_excerpt'] ? $postdata['post_excerpt'] : $postdata['post_content'] );
if ( strlen( $excerpt ) > 255 ) {
$excerpt = substr( $excerpt, 0, 252 ) . '…';
@ -3838,7 +3835,7 @@ function trackback_url_list($tb_list, $post_id) {
$trackback_urls = explode( ',', $tb_list );
foreach( (array) $trackback_urls as $tb_url ) {
$tb_url = trim( $tb_url );
trackback($tb_url, wp_unslash($post_title), $excerpt, $post_id);
trackback( $tb_url, wp_unslash( $postdata['post_title'] ), $excerpt, $post_id );
}
}
}