Replace settings outputs with suitable escape functions

This commit is contained in:
Brian Miyaji
2021-11-06 20:04:07 +09:00
parent fa8e3fdd73
commit bb597b2658
10 changed files with 18 additions and 18 deletions

View File

@@ -37,8 +37,8 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
</thead>
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo esc_attr( $row->post_title ); ?></td>
<td><code><?php echo esc_attr( $row->post_name ); ?></code></td>
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
<td><code><?php echo esc_html( $row->post_name ); ?></code></td>
<td><?php echo esc_html( sp_get_post_abbreviation( $row->ID ) ); ?></td>
<td><?php echo esc_html( sp_get_post_condition( $row->ID ) ); ?></td>
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
@@ -114,7 +114,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_<?php echo esc_attr( $row->post_name ); ?>" name="sportspress_primary_result" value="<?php echo esc_attr( $row->post_name ); ?>" <?php checked( $selection, $row->post_name ); ?>></td>
<td class="row-title"><label for="sportspress_primary_result_<?php echo esc_attr( $row->post_name ); ?>"><?php echo esc_html( $row->post_title ); ?></label></td>
<td><code><?php echo esc_attr( $row->post_name ); ?>for</code>, <code><?php echo esc_attr( $row->post_name ); ?>against</code></td>
<td><code><?php echo esc_html( $row->post_name ); ?>for</code>, <code><?php echo esc_html( $row->post_name ); ?>against</code></td>
<td><?php echo esc_html( sp_get_post_equation( $row->ID ) ); ?></td>
<td><?php echo esc_html( sp_get_post_precision( $row->ID ) ); ?></td>
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
@@ -215,7 +215,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
?>
</td>
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
<td><code><?php echo esc_attr( $row->post_name ); ?></code></td>
<td><code><?php echo esc_html( $row->post_name ); ?></code></td>
<td><?php echo esc_html( sp_get_post_section( $row->ID ) ); ?></td>
<td><?php echo esc_html( sp_get_post_format( $row->ID ) ); ?></td>
<?php if ( 'auto' === $columns ) { ?>
@@ -326,7 +326,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
<td><code><?php echo esc_attr( $row->post_name ); ?></code></td>
<td><code><?php echo esc_html( $row->post_name ); ?></code></td>
<td><p class="description"><?php echo wp_kses_post( $row->post_excerpt ); ?></p></td>
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
</tr>