Make WordPress Core


Ignore:
Timestamp:
09/27/2022 10:24:13 PM (21 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyten/functions.php

    r51482 r54341  
    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    }
    331331endif;
     
    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()
     
    649649            get_the_category_list( ', ' ),
    650650            $tags_list,
    651             get_permalink(),
     651            esc_url( get_permalink() ),
    652652            the_title_attribute( 'echo=0' )
    653653        );
Note: See TracChangeset for help on using the changeset viewer.