Skip to content

Commit ea4d057

Browse files
committed
Twenty Ten: Escape get_permalink() where appropriate in functions.php file.
This changeset adds missing `esc_url()` to some instances of `get_permalink()` used in Twenty Ten, as per WordPress Coding Standards. Props hztyfoon, robinwpdeveloper, mukesh27, rudlinkon, fuadragib01. Fixes #56667. git-svn-id: https://develop.svn.wordpress.org/trunk@54341 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ac614e5 commit ea4d057

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-content/themes/twentyten/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function twentyten_excerpt_length( $length ) {
326326
* @return string "Continue Reading" link.
327327
*/
328328
function twentyten_continue_reading_link() {
329-
return ' <a href="' . get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
329+
return ' <a href="' . esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
330330
}
331331
endif;
332332

@@ -607,7 +607,7 @@ function twentyten_posted_on() {
607607
'meta-prep meta-prep-author',
608608
sprintf(
609609
'<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
610-
get_permalink(),
610+
esc_url( get_permalink() ),
611611
esc_attr( get_the_time() ),
612612
get_the_date()
613613
),
@@ -648,7 +648,7 @@ function twentyten_posted_in() {
648648
$posted_in,
649649
get_the_category_list( ', ' ),
650650
$tags_list,
651-
get_permalink(),
651+
esc_url( get_permalink() ),
652652
the_title_attribute( 'echo=0' )
653653
);
654654
}

0 commit comments

Comments
 (0)