Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
!!! #29 sanitize about us section
Browse files Browse the repository at this point in the history
  • Loading branch information
rodica-andronache committed Jun 7, 2016
1 parent fc12a1a commit fff62c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions template-parts/content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@
<?php echo get_avatar( get_the_author_meta( 'user_email' ), '100' ); ?>
</div>
<?php
$author_first_name = sanitize_text_field( get_the_author_meta( 'first_name' ) );
$author_last_name = sanitize_text_field( get_the_author_meta( 'last_name' ) );
$author_first_name = get_the_author_meta( 'first_name' );
$author_last_name = get_the_author_meta( 'last_name' );
if( !empty( $author_first_name ) || !empty( $author_last_name ) ) {
echo '<div class="author-details-title">';
if( !empty($author_first_name) ) {
echo $author_first_name . ' ';
echo sanitize_text_field($author_first_name) . ' ';
}
if( !empty($author_last_name) ) {
echo $author_last_name;
echo sanitize_text_field($author_last_name);
}
echo '</div>';
}
Expand Down

0 comments on commit fff62c5

Please sign in to comment.