diff --git a/includes/admin/class-sp-admin-welcome.php b/includes/admin/class-sp-admin-welcome.php
index a920b69d..dd23c65a 100644
--- a/includes/admin/class-sp-admin-welcome.php
+++ b/includes/admin/class-sp-admin-welcome.php
@@ -329,7 +329,7 @@ class SP_Admin_Welcome {
intro(); ?>
-
Contribute to SportsPress.', 'sportspress' ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?>
+
Contribute to SportsPress.', 'sportspress' ) ), 'https://github.com/ThemeBoy/SportsPress/blob/master/CONTRIBUTING.md' ); ?>
contributors() ); ?>
@@ -347,7 +347,7 @@ class SP_Admin_Welcome {
intro(); ?>
-
Translate SportsPress.', 'sportspress' ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?>
+
Translate SportsPress.', 'sportspress' ) ), 'https://translate.wordpress.org/projects/wp-plugins/sportspress' ); ?>
post_title );
if ( $team_id == $current_team ) :
- echo '
';
+ echo '
';
endif;
echo '
';
endif;
@@ -102,7 +102,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
break;
case 'sp_events':
$calendar = new SP_Calendar( $post_id );
- echo sizeof( $calendar->data() );
+ echo esc_html( sizeof( $calendar->data() ) );
break;
case 'sp_layout':
echo esc_html( sp_array_value( SP()->formats->calendar, get_post_meta( $post_id, 'sp_format', true ), '—' ) );
@@ -146,7 +146,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Calendar' ) ) :
'selected' => $selected,
'values' => 'ID',
);
- wp_dropdown_pages( $args );
+ esc_html ( wp_dropdown_pages( $args ) );
}
/**
diff --git a/includes/admin/post-types/class-sp-admin-cpt-event.php b/includes/admin/post-types/class-sp-admin-cpt-event.php
index 4db3ca95..b126de95 100644
--- a/includes/admin/post-types/class-sp-admin-cpt-event.php
+++ b/includes/admin/post-types/class-sp-admin-cpt-event.php
@@ -188,11 +188,11 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
$formats = new SP_Formats();
$event_formats = $formats->event;
if ( array_key_exists( $format, $event_formats ) ) :
- echo '
';
+ echo '
';
endif;
break;
case 'sp_time':
- echo apply_filters( 'sportspress_event_time_admin', get_post_time( 'H:i', false, $post_id, true ) );
+ echo wp_kses_post( apply_filters( 'sportspress_event_time_admin', get_post_time( 'H:i', false, $post_id, true ) ) );
break;
case 'sp_team':
$teams = (array) get_post_meta( $post_id, 'sp_team', false );
@@ -207,7 +207,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
else :
$results = get_post_meta( $post_id, 'sp_results', true );
$main_result = get_option( 'sportspress_primary_result', null );
- echo '
';
+ echo '
';
echo '
';
foreach ( $teams as $team_id ) :
if ( ! $team_id ) {
@@ -236,7 +236,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
$team_results = implode( ' | ', $team_results );
endif;
- echo '
' . ( $team_result == '' ? '-' : apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) . '';
+ echo '
' . ( $team_result == '' ? '-' : wp_kses_post( apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) ) . '';
echo '
';
echo esc_html( $team->post_title );
echo '
';
@@ -245,23 +245,23 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
echo '
';
if ( current_user_can( 'edit_others_sp_events' ) ) {
?>
-
+
-
-
+
+
$selected,
'values' => 'ID',
);
- wp_dropdown_pages( $args );
+ esc_html( wp_dropdown_pages( $args ) );
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
$args = array(
@@ -312,7 +312,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Event' ) ) :
sp_dropdown_taxonomies( $args );
$selected = isset( $_REQUEST['match_day'] ) ? sanitize_text_field( $_REQUEST['match_day'] ) : null;
- echo '
';
+ echo '
';
if ( current_user_can( 'edit_others_sp_events' ) ) {
wp_nonce_field( 'sp-save-inline-results', 'sp-inline-nonce', false );
diff --git a/includes/admin/post-types/class-sp-admin-cpt-list.php b/includes/admin/post-types/class-sp-admin-cpt-list.php
index d1dc656c..7b92b7c5 100644
--- a/includes/admin/post-types/class-sp-admin-cpt-list.php
+++ b/includes/admin/post-types/class-sp-admin-cpt-list.php
@@ -72,22 +72,22 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
$select = get_post_meta( $post_id, 'sp_select', true );
if ( 'manual' == $select ) :
$players = array_filter( get_post_meta( $post_id, 'sp_player' ) );
- echo sizeof( $players );
+ echo esc_html( sizeof( $players ) );
else :
- _e( 'Auto', 'sportspress' );
+ esc_html_e( 'Auto', 'sportspress' );
endif;
break;
case 'sp_league':
- echo get_the_terms( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : __( 'All', 'sportspress' );
+ echo get_the_terms( $post_id, 'sp_league' ) ? wp_kses_post( the_terms( $post_id, 'sp_league' ) ) : esc_html__( 'All', 'sportspress' );
break;
case 'sp_season':
- echo get_the_terms( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : __( 'All', 'sportspress' );
+ echo get_the_terms( $post_id, 'sp_season' ) ? wp_kses_post( the_terms( $post_id, 'sp_season' ) ) : esc_html__( 'All', 'sportspress' );
break;
case 'sp_team':
$teams = (array) get_post_meta( $post_id, 'sp_team', false );
$teams = array_filter( $teams );
if ( empty( $teams ) ) :
- echo __( 'All', 'sportspress' );
+ echo esc_html__( 'All', 'sportspress' );
else :
foreach ( $teams as $team_id ) :
if ( ! $team_id ) {
@@ -142,7 +142,7 @@ if ( ! class_exists( 'SP_Admin_CPT_List' ) ) :
'selected' => $selected,
'values' => 'ID',
);
- wp_dropdown_pages( $args );
+ esc_html( wp_dropdown_pages( $args ) );
}
/**
diff --git a/includes/admin/post-types/class-sp-admin-cpt-performance.php b/includes/admin/post-types/class-sp-admin-cpt-performance.php
index 4f66d031..32e032c7 100644
--- a/includes/admin/post-types/class-sp-admin-cpt-performance.php
+++ b/includes/admin/post-types/class-sp-admin-cpt-performance.php
@@ -61,7 +61,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Performance' ) ) :
public function custom_columns( $column, $post_id ) {
switch ( $column ) :
case 'sp_icon':
- echo has_post_thumbnail( $post_id ) ? edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-fit-mini' ), '', '', $post_id ) : '';
+ echo has_post_thumbnail( $post_id ) ? wp_kses_post( edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-fit-mini' ), '', '', $post_id ) ) : '';
break;
case 'sp_key':
global $post;
diff --git a/includes/admin/post-types/class-sp-admin-cpt-player.php b/includes/admin/post-types/class-sp-admin-cpt-player.php
index acaede58..c62c8e5b 100755
--- a/includes/admin/post-types/class-sp-admin-cpt-player.php
+++ b/includes/admin/post-types/class-sp-admin-cpt-player.php
@@ -102,14 +102,14 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
echo esc_html( get_post_meta( $post_id, 'sp_number', true ) );
break;
case 'sp_position':
- echo get_the_terms( $post_id, 'sp_position' ) ? the_terms( $post_id, 'sp_position' ) : '—';
+ echo get_the_terms( $post_id, 'sp_position' ) ? wp_kses_post( the_terms( $post_id, 'sp_position' ) ) : '—';
break;
case 'sp_team':
$current_teams = get_post_meta( $post_id, 'sp_current_team', false );
$past_teams = get_post_meta( $post_id, 'sp_past_team', false );
$current_teams = array_filter( $current_teams );
$past_teams = array_filter( $past_teams );
- echo '
';
+ echo '
';
$teams = (array) get_post_meta( $post_id, 'sp_team', false );
$teams = array_filter( $teams );
$teams = array_unique( $teams );
@@ -124,7 +124,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
if ( $team ) :
echo esc_html( $team->post_title );
if ( in_array( $team_id, $current_teams ) ) :
- echo '
';
+ echo '
';
endif;
echo '
';
endif;
@@ -132,13 +132,13 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
endif;
break;
case 'sp_league':
- echo get_the_terms( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '—';
+ echo get_the_terms( $post_id, 'sp_league' ) ? wp_kses_post( the_terms( $post_id, 'sp_league' ) ) : '—';
break;
case 'sp_season':
- echo get_the_terms( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '—';
+ echo get_the_terms( $post_id, 'sp_season' ) ? wp_kses_post( the_terms( $post_id, 'sp_season' ) ) : '—';
break;
case 'sp_venue':
- echo get_the_terms( $post_id, 'sp_venue' ) ? the_terms( $post_id, 'sp_venue' ) : '—';
+ echo get_the_terms( $post_id, 'sp_venue' ) ? wp_kses_post( the_terms( $post_id, 'sp_venue' ) ) : '—';
break;
endswitch;
}
@@ -172,7 +172,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :
'selected' => $selected,
'values' => 'ID',
);
- wp_dropdown_pages( $args );
+ esc_html( wp_dropdown_pages( $args ) );
if ( taxonomy_exists( 'sp_league' ) ) :
$selected = isset( $_REQUEST['sp_league'] ) ? sanitize_key( $_REQUEST['sp_league'] ) : null;
@@ -244,7 +244,7 @@ if ( ! class_exists( 'SP_Admin_CPT_Player' ) ) :