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
This commit is contained in:
Jb Audras 2022-09-27 22:24:13 +00:00
parent ac614e51f3
commit ea4d0576df

View File

@ -326,7 +326,7 @@ if ( ! function_exists( 'twentyten_continue_reading_link' ) ) :
* @return string "Continue Reading" link.
*/
function twentyten_continue_reading_link() {
return ' <a href="' . get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
return ' <a href="' . esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
}
endif;
@ -607,7 +607,7 @@ if ( ! function_exists( 'twentyten_posted_on' ) ) :
'meta-prep meta-prep-author',
sprintf(
'<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
get_the_date()
),
@ -648,7 +648,7 @@ if ( ! function_exists( 'twentyten_posted_in' ) ) :
$posted_in,
get_the_category_list( ', ' ),
$tags_list,
get_permalink(),
esc_url( get_permalink() ),
the_title_attribute( 'echo=0' )
);
}