Escape outputs
This commit is contained in:
@@ -23,15 +23,15 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_event_csv';
|
||||
$this->import_label = __( 'Import Events', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Events', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_date' => __( 'Date', 'sportspress' ),
|
||||
'post_time' => __( 'Time', 'sportspress' ),
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_results' => __( 'Results', 'sportspress' ),
|
||||
'sp_outcome' => __( 'Outcome', 'sportspress' ),
|
||||
'sp_player' => __( 'Players', 'sportspress' ),
|
||||
'post_date' => esc_attr__( 'Date', 'sportspress' ),
|
||||
'post_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_results' => esc_attr__( 'Results', 'sportspress' ),
|
||||
'sp_outcome' => esc_attr__( 'Outcome', 'sportspress' ),
|
||||
'sp_player' => esc_attr__( 'Players', 'sportspress' ),
|
||||
);
|
||||
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
||||
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
||||
@@ -156,7 +156,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'post_type' => 'sp_event',
|
||||
'post_status' => 'publish',
|
||||
'post_date' => $date,
|
||||
'post_title' => __( 'Event', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Event', 'sportspress' ),
|
||||
);
|
||||
|
||||
// Insert event
|
||||
@@ -338,7 +338,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
$title = get_the_title( $id );
|
||||
|
||||
// Initialize event name
|
||||
if ( __( 'Event', 'sportspress' ) === $title ) {
|
||||
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
|
||||
$title = '';
|
||||
} else {
|
||||
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
||||
@@ -494,8 +494,8 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Events need to be defined with columns in a specific order (3+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/events-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_event_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -538,7 +538,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
@@ -551,11 +551,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'values' => 'slug',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_event_performance_csv';
|
||||
$this->import_label = __( 'Import Box Score', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Box Score', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'sp_player' => __( 'Player', 'sportspress' ),
|
||||
'sp_player' => esc_attr__( 'Player', 'sportspress' ),
|
||||
);
|
||||
$performance_labels = sp_get_var_labels( 'sp_performance' );
|
||||
if ( $performance_labels && is_array( $performance_labels ) && sizeof( $performance_labels ) ) {
|
||||
@@ -178,7 +178,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
)
|
||||
);
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Box scores need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Box scores need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/event-performance-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( add_query_arg( $args, 'admin.php' ) );
|
||||
} else {
|
||||
echo '<p><a href="' . esc_url( admin_url( add_query_arg( array( 'post_type' => 'sp_event' ), 'edit.php' ) ) ) . '">' . sprintf( esc_html__( 'Select %s', 'sportspress' ), esc_html__( 'Event', 'sportspress' ) ) . '</a></p>';
|
||||
|
||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_fixture_csv';
|
||||
$this->import_label = __( 'Import Fixtures', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Fixtures', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_date' => __( 'Date', 'sportspress' ),
|
||||
'post_time' => __( 'Time', 'sportspress' ),
|
||||
'sp_venue' => __( 'Venue', 'sportspress' ),
|
||||
'sp_home' => __( 'Home', 'sportspress' ),
|
||||
'sp_away' => __( 'Away', 'sportspress' ),
|
||||
'sp_day' => __( 'Match Day', 'sportspress' ),
|
||||
'post_date' => esc_attr__( 'Date', 'sportspress' ),
|
||||
'post_time' => esc_attr__( 'Time', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Venue', 'sportspress' ),
|
||||
'sp_home' => esc_attr__( 'Home', 'sportspress' ),
|
||||
'sp_away' => esc_attr__( 'Away', 'sportspress' ),
|
||||
'sp_day' => esc_attr__( 'Match Day', 'sportspress' ),
|
||||
);
|
||||
$this->optionals = array( 'sp_day' );
|
||||
}
|
||||
@@ -122,7 +122,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'post_type' => 'sp_event',
|
||||
'post_status' => 'publish',
|
||||
'post_date' => $date,
|
||||
'post_title' => __( 'Event', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Event', 'sportspress' ),
|
||||
);
|
||||
|
||||
// Insert event
|
||||
@@ -226,7 +226,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
$title = get_the_title( $id );
|
||||
|
||||
// Initialize event name
|
||||
if ( __( 'Event', 'sportspress' ) === $title ) {
|
||||
if ( esc_attr__( 'Event', 'sportspress' ) === $title ) {
|
||||
$title = '';
|
||||
} else {
|
||||
$title .= ' ' . get_option( 'sportspress_event_teams_delimiter', 'vs' ) . ' ';
|
||||
@@ -284,8 +284,8 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Fixtures need to be defined with columns in a specific order (4+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Fixtures need to be defined with columns in a specific order (4+ columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/fixtures-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Supports CSV files generated by <a href="%s">LeagueLobster</a>.', 'sportspress' ) ), 'http://tboy.co/leaguelobster' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_fixture_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -319,11 +319,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'taxonomy' => 'sp_league',
|
||||
'name' => 'sp_league',
|
||||
'values' => 'slug',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_league', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
@@ -336,11 +336,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
'taxonomy' => 'sp_season',
|
||||
'name' => 'sp_season',
|
||||
'values' => 'slug',
|
||||
'show_option_none' => __( '— Not set —', 'sportspress' ),
|
||||
'show_option_none' => esc_attr__( '— Not set —', 'sportspress' ),
|
||||
);
|
||||
if ( ! sp_dropdown_taxonomies( $args ) ) :
|
||||
echo '<p>' . esc_html__( 'None', 'sportspress' ) . '</p>';
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
sp_taxonomy_adder( 'sp_season', 'sp_team', esc_attr__( 'Add New', 'sportspress' ) );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -23,9 +23,9 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_official_csv';
|
||||
$this->import_label = __( 'Import Officials', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Officials', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -117,7 +117,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Officials need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Officials need to be defined with columns in a specific order. <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/officials-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_official_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -23,16 +23,16 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_player_csv';
|
||||
$this->import_label = __( 'Import Players', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Players', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'sp_number' => __( 'Squad Number', 'sportspress' ),
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'sp_position' => __( 'Positions', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => __( 'Nationality', 'sportspress' ),
|
||||
'post_date' => __( 'Date of Birth', 'sportspress' ),
|
||||
'sp_number' => esc_attr__( 'Squad Number', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'sp_position' => esc_attr__( 'Positions', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
'post_date' => esc_attr__( 'Date of Birth', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -250,7 +250,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Players need to be defined with columns in a specific order (8 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Players need to be defined with columns in a specific order (8 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/players-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_player_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_staff_csv';
|
||||
$this->import_label = __( 'Import Staff', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Staff', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'sp_role' => __( 'Jobs', 'sportspress' ),
|
||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => __( 'Nationality', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'sp_role' => esc_attr__( 'Jobs', 'sportspress' ),
|
||||
'sp_team' => esc_attr__( 'Teams', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'sp_nationality' => esc_attr__( 'Nationality', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -198,7 +198,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Staff need to be defined with columns in a specific order (6 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Staff need to be defined with columns in a specific order (6 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/staff-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_staff_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->import_page = 'sp_team_csv';
|
||||
$this->import_label = __( 'Import Teams', 'sportspress' );
|
||||
$this->import_label = esc_attr__( 'Import Teams', 'sportspress' );
|
||||
$this->columns = array(
|
||||
'post_title' => __( 'Name', 'sportspress' ),
|
||||
'sp_league' => __( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => __( 'Seasons', 'sportspress' ),
|
||||
'sp_url' => __( 'Site URL', 'sportspress' ),
|
||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
||||
'sp_venue' => __( 'Home', 'sportspress' ),
|
||||
'post_title' => esc_attr__( 'Name', 'sportspress' ),
|
||||
'sp_league' => esc_attr__( 'Leagues', 'sportspress' ),
|
||||
'sp_season' => esc_attr__( 'Seasons', 'sportspress' ),
|
||||
'sp_url' => esc_attr__( 'Site URL', 'sportspress' ),
|
||||
'sp_abbreviation' => esc_attr__( 'Abbreviation', 'sportspress' ),
|
||||
'sp_venue' => esc_attr__( 'Home', 'sportspress' ),
|
||||
);
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -144,7 +144,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
function greet() {
|
||||
echo '<div class="narrow">';
|
||||
echo '<p>' . esc_html__( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( __( 'Teams need to be defined with columns in a specific order (3 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '</p>';
|
||||
echo '<p>' . sprintf( wp_kses_post( esc_attr__( 'Teams need to be defined with columns in a specific order (3 columns). <a href="%s">Click here to download a sample</a>.', 'sportspress' ) ), esc_url( plugin_dir_url( SP_PLUGIN_FILE ) ) . 'dummy-data/teams-sample.csv' ) . '</p>';
|
||||
wp_import_upload_form( 'admin.php?import=sp_team_csv&step=1' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user