Escape outputs
This commit is contained in:
@@ -4,7 +4,7 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
||||
|
||||
<div class="wrap sportspress sportspress-config-wrap">
|
||||
<h2>
|
||||
<?php _e( 'Configure', 'sportspress' ); ?>
|
||||
<?php esc_html_e( 'Configure', 'sportspress' ); ?>
|
||||
</h2>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
@@ -20,18 +20,18 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Event Outcomes', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Event Outcomes', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Condition', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Abbreviation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Condition', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -50,20 +50,20 @@ $columns = get_option( 'sportspress_player_columns', 'auto' );
|
||||
<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>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="6"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="6"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_outcome' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_outcome' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_outcome' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_outcome' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -86,22 +86,22 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Event Results', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Event Results', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<legend class="screen-reader-text"><span><?php _e( 'Event Results', 'sportspress' ); ?></span></legend>
|
||||
<legend class="screen-reader-text"><span><?php esc_html_e( 'Event Results', 'sportspress' ); ?></span></legend>
|
||||
<form>
|
||||
<?php wp_nonce_field( 'sp-save-primary-result', 'sp-primary-result-nonce', false ); ?>
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th class="radio" scope="col"><?php esc_html_e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variables', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -113,9 +113,9 @@ endforeach; else :
|
||||
if ( sizeof( $data ) > 0 ) :
|
||||
$default = end( $data );
|
||||
reset( $data );
|
||||
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
||||
printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) );
|
||||
else :
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_attr_e( 'Default', 'sportspress' );
|
||||
endif;
|
||||
?>
|
||||
</label></th>
|
||||
@@ -137,21 +137,21 @@ endforeach; else :
|
||||
<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>
|
||||
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="7"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</form>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_result' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_result' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_result' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -179,29 +179,29 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Player Performance', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Player Performance', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for events.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<legend class="screen-reader-text"><span><?php _e( 'Player Performance', 'sportspress' ); ?></span></legend>
|
||||
<legend class="screen-reader-text"><span><?php esc_html_e( 'Player Performance', 'sportspress' ); ?></span></legend>
|
||||
<form>
|
||||
<?php wp_nonce_field( 'sp-save-primary-performance', 'sp-primary-performance-nonce', false ); ?>
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Format', 'sportspress' ); ?></th>
|
||||
<th class="radio" scope="col"><?php esc_html_e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php esc_html_e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Category', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Format', 'sportspress' ); ?></th>
|
||||
<?php if ( 'auto' === $columns ) { ?>
|
||||
<th scope="col">
|
||||
<?php _e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<?php esc_html_e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_html_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -209,13 +209,13 @@ endforeach; else :
|
||||
<tr>
|
||||
<th class="radio"><input type="radio" class="sp-primary-performance-option" id="sportspress_primary_performance_0" name="sportspress_primary_performance" value="0" <?php checked( $selection, 0 ); ?>></th>
|
||||
<th class="icon"> </td>
|
||||
<th colspan="<?php echo $colspan - 1; ?>"><label for="sportspress_primary_performance_0">
|
||||
<th colspan="<?php echo esc_html( $colspan - 1 ); ?>"><label for="sportspress_primary_performance_0">
|
||||
<?php
|
||||
if ( sizeof( $data ) > 0 ) :
|
||||
$default = reset( $data );
|
||||
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
||||
printf( esc_html__( 'Default (%s)', 'sportspress' ), esc_html( $default->post_title ) );
|
||||
else :
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_attr_e( 'Default', 'sportspress' );
|
||||
endif;
|
||||
?>
|
||||
</label></th>
|
||||
@@ -246,7 +246,7 @@ endforeach; else :
|
||||
$icon = ' ';
|
||||
}
|
||||
|
||||
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
||||
echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) );
|
||||
?>
|
||||
</td>
|
||||
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></td>
|
||||
@@ -266,21 +266,21 @@ endforeach; else :
|
||||
</td>
|
||||
<?php } ?>
|
||||
<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>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="<?php echo $colspan; ?>"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="<?php echo esc_attr( $colspan ); ?>"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</form>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_performance' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_performance' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_performance' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_performance' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -301,18 +301,18 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Table Columns', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for league tables.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Table Columns', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for league tables.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Sort Order', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -331,20 +331,20 @@ endforeach; else :
|
||||
<td><?php echo esc_html( sp_get_post_precision( $row->ID ) ); ?></td>
|
||||
<td><?php echo esc_html( sp_get_post_order( $row->ID ) ); ?></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>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="7"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_column' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_column' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_column' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -366,16 +366,16 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Player Metrics', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Player Metrics', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -392,20 +392,20 @@ endforeach; else :
|
||||
<td class="row-title"><?php echo esc_html( $row->post_title ); ?></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>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="4"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="4"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_metric' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_metric' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_metric' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_metric' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
@@ -432,25 +432,25 @@ endforeach; else :
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row" class="titledesc">
|
||||
<?php _e( 'Player Statistics', 'sportspress' ); ?>
|
||||
<p class="description"><?php _e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
<?php esc_html_e( 'Player Statistics', 'sportspress' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Used for player lists.', 'sportspress' ); ?></p>
|
||||
</th>
|
||||
<td class="forminp">
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Label', 'sportspress' ); ?></th>
|
||||
<th class="icon" scope="col"><?php esc_html_e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Equation', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Decimal Places', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Category', 'sportspress' ); ?></th>
|
||||
<?php if ( 'auto' === $columns ) { ?>
|
||||
<th scope="col">
|
||||
<?php _e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
<?php esc_html_e( 'Visible', 'sportspress' ); ?>
|
||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php esc_html_e( 'Display in player profile?', 'sportspress' ); ?>"></i>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'sportspress' ); ?></th>
|
||||
<th scope="col" class="edit"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -479,7 +479,7 @@ endforeach; else :
|
||||
$icon = ' ';
|
||||
}
|
||||
|
||||
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
||||
echo wp_kses_post( apply_filters( 'sportspress_performance_icon', $icon, $row->ID ) );
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo wp_kses_post( sp_get_post_equation( $row->ID ) ); ?></td>
|
||||
@@ -498,20 +498,20 @@ endforeach; else :
|
||||
</td>
|
||||
<?php } ?>
|
||||
<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>
|
||||
<td class="edit"><a class="button" href="<?php echo esc_url( get_edit_post_link( $row->ID ) ); ?>"><?php esc_html_e( 'Edit', 'sportspress' ); ?></s></td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; else :
|
||||
?>
|
||||
<tr class="alternate">
|
||||
<td colspan="<?php echo $colspan; ?>"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
||||
<td colspan="<?php echo esc_attr( $colspan ); ?>"><?php esc_html_e( 'No results found.', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_statistic' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
||||
<a class="button alignleft" href="<?php echo esc_url( admin_url( 'edit.php?post_type=sp_statistic' ) ); ?>"><?php esc_html_e( 'View All', 'sportspress' ); ?></a>
|
||||
<a class="button button-primary alignright" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=sp_statistic' ) ); ?>"><?php esc_html_e( 'Add New', 'sportspress' ); ?></a>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="wrap sportspress">
|
||||
<h2><?php _e( 'System Status', 'sportspress' ); ?></h2>
|
||||
<h2><?php esc_attr_e( 'System Status', 'sportspress' ); ?></h2>
|
||||
</div>
|
||||
<div class="updated sportspress-message">
|
||||
<p><?php _e( 'Please include this information when requesting support:', 'sportspress' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php _e( 'Get System Report', 'sportspress' ); ?></a></p>
|
||||
<p><?php esc_attr_e( 'Please include this information when requesting support:', 'sportspress' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php esc_attr_e( 'Get System Report', 'sportspress' ); ?></a></p>
|
||||
<div id="debug-report"><textarea readonly="readonly"></textarea></div>
|
||||
</div>
|
||||
<br/>
|
||||
@@ -11,45 +11,45 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Environment', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Environment', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo home_url(); ?></td>
|
||||
<td><?php esc_attr_e( 'Home URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_url( home_url() ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo site_url(); ?></td>
|
||||
<td><?php esc_attr_e( 'Site URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_url( site_url() ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'SP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'SP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( SP()->version ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php bloginfo( 'version' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Multisite Enabled', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( is_multisite() ) {
|
||||
_e( 'Yes', 'sportspress' );
|
||||
esc_attr_e( 'Yes', 'sportspress' );
|
||||
} else {
|
||||
_e( 'No', 'sportspress' );
|
||||
esc_attr_e( 'No', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Web Server Info', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Web Server Info', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'PHP Version', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( function_exists( 'phpversion' ) ) {
|
||||
@@ -58,74 +58,74 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Memory Limit', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$memory = sp_let_to_num( WP_MEMORY_LIMIT );
|
||||
|
||||
if ( $memory < 67108864 ) {
|
||||
echo '<mark class="error">' . sprintf( __( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark>';
|
||||
echo '<mark class="error">' . wp_kses_post( sprintf( esc_attr__( '%1$s - We recommend setting memory to at least 64MB. See: <a href="%2$s">Increasing memory allocated to PHP</a>', 'sportspress' ), esc_html( size_format( $memory ) ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . size_format( $memory ) . '</mark>';
|
||||
echo '<mark class="yes">' . esc_html( size_format( $memory ) ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Debug Mode', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
echo '<mark class="yes">' . __( 'Yes', 'sportspress' ) . '</mark>';
|
||||
echo '<mark class="yes">' . esc_html__( 'Yes', 'sportspress' ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="no">' . __( 'No', 'sportspress' ) . '</mark>';
|
||||
echo '<mark class="no">' . esc_html__( 'No', 'sportspress' ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'WP Language', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
if ( defined( 'WPLANG' ) && WPLANG ) {
|
||||
echo WPLANG;
|
||||
echo esc_html( WPLANG );
|
||||
} else {
|
||||
_e( 'Default', 'sportspress' );
|
||||
esc_html_e( 'Default', 'sportspress' );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo size_format( wp_max_upload_size() ); ?></td>
|
||||
<td><?php esc_attr_e( 'WP Max Upload Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( size_format( wp_max_upload_size() ) ); ?></td>
|
||||
</tr>
|
||||
<?php if ( function_exists( 'ini_get' ) ) : ?>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
|
||||
<td><?php esc_attr_e( 'PHP Post Max Size', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( size_format( sp_let_to_num( ini_get( 'post_max_size' ) ) ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo ini_get( 'max_execution_time' ); ?></td>
|
||||
<td><?php esc_attr_e( 'PHP Time Limit', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( ini_get( 'max_execution_time' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo ini_get( 'max_input_vars' ); ?></td>
|
||||
<td><?php esc_attr_e( 'PHP Max Input Vars', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( ini_get( 'max_input_vars' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo extension_loaded( 'suhosin' ) ? __( 'Yes', 'sportspress' ) : __( 'No', 'sportspress' ); ?></td>
|
||||
<td><?php esc_attr_e( 'SUHOSIN Installed', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo extension_loaded( 'suhosin' ) ? esc_html__( 'Yes', 'sportspress' ) : esc_html__( 'No', 'sportspress' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td><?php _e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Default Timezone', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$default_timezone = date_default_timezone_get();
|
||||
if ( 'UTC' !== $default_timezone ) {
|
||||
echo '<mark class="error">' . sprintf( __( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="error">' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'sportspress' ), esc_html( $default_timezone ) ) . '</mark>';
|
||||
} else {
|
||||
echo '<mark class="yes">' . sprintf( __( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . '</mark>';
|
||||
echo '<mark class="yes">' . sprintf( esc_html__( 'Default timezone is %s', 'sportspress' ), esc_html( $default_timezone ) ) . '</mark>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -134,28 +134,28 @@
|
||||
$posting = array();
|
||||
|
||||
// fsockopen/cURL
|
||||
$posting['fsockopen_curl']['name'] = __( 'fsockopen/cURL', 'sportspress' );
|
||||
$posting['fsockopen_curl']['name'] = esc_attr__( 'fsockopen/cURL', 'sportspress' );
|
||||
if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
|
||||
if ( function_exists( 'fsockopen' ) && function_exists( 'curl_init' ) ) {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen and cURL enabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen and cURL enabled.', 'sportspress' );
|
||||
} elseif ( function_exists( 'fsockopen' ) ) {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has fsockopen enabled, cURL is disabled.', 'sportspress' );
|
||||
} else {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' );
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server has cURL enabled, fsockopen is disabled.', 'sportspress' );
|
||||
}
|
||||
$posting['fsockopen_curl']['success'] = true;
|
||||
} else {
|
||||
$posting['fsockopen_curl']['note'] = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . '</mark>';
|
||||
$posting['fsockopen_curl']['note'] = esc_attr__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'sportspress' ) . '</mark>';
|
||||
$posting['fsockopen_curl']['success'] = false;
|
||||
}
|
||||
|
||||
// SOAP
|
||||
$posting['soap_client']['name'] = __( 'SOAP Client', 'sportspress' );
|
||||
$posting['soap_client']['name'] = esc_attr__( 'SOAP Client', 'sportspress' );
|
||||
if ( class_exists( 'SoapClient' ) ) {
|
||||
$posting['soap_client']['note'] = __( 'Your server has the SOAP Client class enabled.', 'sportspress' );
|
||||
$posting['soap_client']['note'] = esc_attr__( 'Your server has the SOAP Client class enabled.', 'sportspress' );
|
||||
$posting['soap_client']['success'] = true;
|
||||
} else {
|
||||
$posting['soap_client']['note'] = sprintf( __( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
|
||||
$posting['soap_client']['note'] = sprintf( esc_attr__( 'Your server does not have the <a href="%s">SOAP Client</a> class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . '</mark>';
|
||||
$posting['soap_client']['success'] = false;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<tr>
|
||||
<td><?php echo esc_html( $post['name'] ); ?>:</td>
|
||||
<td>
|
||||
<mark class="<?php echo $mark; ?>">
|
||||
<mark class="<?php echo esc_attr( $mark ); ?>">
|
||||
<?php echo wp_kses_data( $post['note'] ); ?>
|
||||
</mark>
|
||||
</td>
|
||||
@@ -179,13 +179,13 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Plugins', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Plugins', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Installed Plugins', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$active_plugins = (array) get_option( 'active_plugins', array() );
|
||||
@@ -207,7 +207,7 @@
|
||||
// link the plugin name to the plugin url if available
|
||||
$plugin_name = $plugin_data['Name'];
|
||||
if ( ! empty( $plugin_data['PluginURI'] ) ) {
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage', 'sportspress' ) . '">' . $plugin_name . '</a>';
|
||||
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage', 'sportspress' ) . '">' . $plugin_name . '</a>';
|
||||
}
|
||||
|
||||
if ( strstr( $dirname, 'sportspress' ) ) {
|
||||
@@ -236,11 +236,11 @@
|
||||
}
|
||||
|
||||
if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) ) {
|
||||
$version_string = ' – <strong style="color:red;">' . $version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';
|
||||
$version_string = ' – <strong style="color:red;">' . $version_data['version'] . ' ' . esc_attr__( 'is available', 'sportspress' ) . '</strong>';
|
||||
}
|
||||
}
|
||||
|
||||
$sp_plugins[] = $plugin_name . ' ' . __( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
|
||||
$sp_plugins[] = $plugin_name . ' ' . esc_attr__( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . esc_attr__( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,7 @@
|
||||
if ( sizeof( $sp_plugins ) == 0 ) {
|
||||
echo '-';
|
||||
} else {
|
||||
echo implode( ', <br/>', $sp_plugins );
|
||||
echo wp_kses_post( implode( ', <br/>', $sp_plugins ) );
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -258,17 +258,17 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'SP Configuration', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo get_option( 'sportspress_sport', __( 'None', 'sportspress' ) ); ?></td>
|
||||
<td><?php esc_attr_e( 'Sport', 'sportspress' ); ?>:</td>
|
||||
<td><?php echo esc_html( get_option( 'sportspress_sport', esc_attr__( 'None', 'sportspress' ) ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Event Outcomes', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -289,7 +289,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Event Results', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -310,7 +310,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Player Performance', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -331,7 +331,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Table Columns', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -352,7 +352,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Player Metrics', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -373,7 +373,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Player Statistics', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_posts = array();
|
||||
@@ -397,13 +397,13 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'SP Taxonomies', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Leagues', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -416,7 +416,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Seasons', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -429,7 +429,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Venues', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Venues', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -442,7 +442,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Positions', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Positions', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$display_terms = array();
|
||||
@@ -458,7 +458,7 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'SP Post Types', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<?php $count = wp_count_posts( $post_type ); ?>
|
||||
<?php echo $count->publish; ?> publish, <?php echo $count->future; ?> future, <?php echo $count->draft; ?> draft, <?php echo $count->private; ?> private, <?php echo $count->trash; ?> trash, <?php echo $count->{'auto-draft'}; ?> auto-draft, <?php echo $count->inherit; ?> inherit
|
||||
<?php echo esc_html( $count->publish ); ?> publish, <?php echo esc_html( $count->future ); ?> future, <?php echo esc_html( $count->draft ); ?> draft, <?php echo esc_html( $count->private ); ?> private, <?php echo esc_html( $count->trash ); ?> trash, <?php echo esc_html( $count->{'auto-draft'} ); ?> auto-draft, <?php echo esc_html( $count->inherit ); ?> inherit
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -485,7 +485,7 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Theme', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Theme', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -527,7 +527,7 @@
|
||||
?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php _e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Theme Name', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_html( $active_theme->Name );
|
||||
@@ -535,19 +535,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Theme Version', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo $active_theme->Version;
|
||||
echo esc_html( $active_theme->Version );
|
||||
|
||||
if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) ) {
|
||||
echo ' – <strong style="color:red;">' . $theme_version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';
|
||||
echo ' – <strong style="color:red;">' . esc_html( $theme_version_data['version'] ) . ' ' . esc_html__( 'is available', 'sportspress' ) . '</strong>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php _e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'Author URL', 'sportspress' ); ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
echo esc_url( $active_theme->{'Author URI'} );
|
||||
@@ -558,7 +558,7 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><?php _e( 'Templates', 'sportspress' ); ?></th>
|
||||
<th colspan="2"><?php esc_attr_e( 'Templates', 'sportspress' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
$theme_version = $this->get_file_version( $theme_file );
|
||||
|
||||
if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
|
||||
$found_files[ $plugin_name ][] = sprintf( __( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
|
||||
$found_files[ $plugin_name ][] = sprintf( esc_attr__( '<code>%1$s</code> version <strong style="color:red">%2$s</strong> is out of date. The core version is %3$s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version );
|
||||
} else {
|
||||
$found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', basename( $theme_file ) );
|
||||
}
|
||||
@@ -603,14 +603,14 @@
|
||||
if ( $found_files ) {
|
||||
foreach ( $found_files as $plugin_name => $found_plugin_files ) {
|
||||
?>
|
||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?> (<?php echo $plugin_name; ?>):</td>
|
||||
<td><?php echo implode( ', <br/>', $found_plugin_files ); ?></td>
|
||||
<td><?php esc_attr_e( 'Template Overrides', 'sportspress' ); ?> (<?php echo esc_html( $plugin_name ); ?>):</td>
|
||||
<td><?php echo wp_kses_post( implode( ', <br/>', $found_plugin_files ) ); ?></td>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<td><?php _e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||
<td><?php _e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||
<td><?php esc_attr_e( 'Template Overrides', 'sportspress' ); ?>:</td>
|
||||
<td><?php esc_attr_e( 'No overrides present in theme.', 'sportspress' ); ?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class="wrap sportspress">
|
||||
<h2><?php echo apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/modules/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . __( 'SportsPress', 'sportspress' ) . '" class="sp-settings-logo">' ); ?></h2>
|
||||
<h2><?php echo wp_kses_post( apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/modules/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . esc_attr__( 'SportsPress', 'sportspress' ) . '" class="sp-settings-logo">' ) ); ?></h2>
|
||||
<form method="post" id="mainform" action="" enctype="multipart/form-data">
|
||||
<h2 class="nav-tab-wrapper sp-nav-tab-wrapper">
|
||||
<?php
|
||||
foreach ( $tabs as $name => $label ) :
|
||||
?>
|
||||
<a href="<?php echo admin_url( 'admin.php?page=sportspress&tab=' . $name ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo esc_html( $label ); ?></a><?php endforeach; ?>
|
||||
<a href="<?php echo esc_attr( admin_url( 'admin.php?page=sportspress&tab=' . $name ) ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo esc_html( $label ); ?></a><?php endforeach; ?>
|
||||
<?php do_action( 'sportspress_settings_tabs' ); ?>
|
||||
</h2>
|
||||
<?php
|
||||
@@ -15,7 +15,7 @@
|
||||
?>
|
||||
<p class="submit">
|
||||
<?php if ( ! isset( $GLOBALS['hide_save_button'] ) ) : ?>
|
||||
<input name="save" class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'sportspress' ); ?>" />
|
||||
<input name="save" class="button-primary" type="submit" value="<?php esc_attr_e( 'Save Changes', 'sportspress' ); ?>" />
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="subtab" id="last_tab" />
|
||||
<?php wp_nonce_field( 'sportspress-settings' ); ?>
|
||||
|
||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="updated sportspress-message">
|
||||
<p><strong><?php _e( 'Welcome to SportsPress', 'sportspress' ); ?></strong> – <?php _e( "Let's get started with some basic settings.", 'sportspress' ); ?></p>
|
||||
<p><strong><?php esc_attr_e( 'Welcome to SportsPress', 'sportspress' ); ?></strong> – <?php esc_attr_e( "Let's get started with some basic settings.", 'sportspress' ); ?></p>
|
||||
<p class="submit">
|
||||
<a class="button-primary" href="
|
||||
<?php
|
||||
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
)
|
||||
);
|
||||
?>
|
||||
"><?php _e( 'Run the Setup Wizard', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="<?php echo add_query_arg( 'skip_install_sportspress', 'true' ); ?>"><?php _e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
"><?php esc_attr_e( 'Run the Setup Wizard', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="<?php echo esc_url( add_query_arg( 'skip_install_sportspress', 'true' ) ); ?>"><?php esc_attr_e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -4,5 +4,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="error">
|
||||
<p><?php _e( 'You are not allowed to edit this item.', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( 'You are not allowed to edit this item.', 'sportspress' ); ?></p>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="updated sportspress-message wc-connect">
|
||||
<p><?php _e( '<strong>Your theme has bundled outdated copies of SportsPress template files</strong> – if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( '<strong>Your theme has bundled outdated copies of SportsPress template files</strong> – if you encounter functionality issues on the frontend this could the reason. Ensure you update or remove them (in general we recommend only bundling the template files you actually need to customize). See the system report for full details.', 'sportspress' ); ?></p>
|
||||
<p class="submit"><a class="button-primary" href="
|
||||
<?php
|
||||
echo esc_url(
|
||||
@@ -17,5 +17,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
)
|
||||
);
|
||||
?>
|
||||
"><?php _e( 'System Status', 'sportspress' ); ?></a> <a class="skip button" href="<?php echo esc_url( add_query_arg( 'hide_template_files_notice', 'true' ) ); ?>"><?php _e( 'Hide this notice', 'sportspress' ); ?></a></p>
|
||||
"><?php esc_html_e( 'System Status', 'sportspress' ); ?></a> <a class="skip button" href="<?php echo esc_url( add_query_arg( 'hide_template_files_notice', 'true' ) ); ?>"><?php esc_html_e( 'Hide this notice', 'sportspress' ); ?></a></p>
|
||||
</div>
|
||||
|
||||
@@ -4,11 +4,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
}
|
||||
?>
|
||||
<div id="message" class="error sportspress-message">
|
||||
<p><?php _e( '<strong>Your theme does not declare SportsPress support</strong> – if you encounter layout issues please read our integration guide or choose a SportsPress theme :)', 'sportspress' ); ?></p>
|
||||
<p><?php _e( 'Have you tried the free Rookie theme yet?', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( '<strong>Your theme does not declare SportsPress support</strong> – if you encounter layout issues please read our integration guide or choose a SportsPress theme :)', 'sportspress' ); ?></p>
|
||||
<p><?php esc_attr_e( 'Have you tried the free Rookie theme yet?', 'sportspress' ); ?></p>
|
||||
<p class="submit">
|
||||
<a class="button-primary" href="<?php echo add_query_arg( array( 'theme' => 'rookie' ), network_admin_url( 'theme-install.php' ) ); ?>"><?php _e( 'Install Now', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="http://tboy.co/integration"><?php _e( 'Theme Integration Guide', 'sportspress' ); ?></a>
|
||||
<a class="button" href="<?php echo add_query_arg( 'hide_theme_support_notice', 'true' ); ?>"><?php _e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
<a class="button-primary" href="<?php echo esc_url( add_query_arg( array( 'theme' => 'rookie' ), network_admin_url( 'theme-install.php' ) ) ); ?>"><?php esc_attr_e( 'Install Now', 'sportspress' ); ?></a>
|
||||
<a class="button-secondary" href="http://tboy.co/integration"><?php esc_attr_e( 'Theme Integration Guide', 'sportspress' ); ?></a>
|
||||
<a class="button" href="<?php echo esc_url( add_query_arg( 'hide_theme_support_notice', 'true' ) ); ?>"><?php esc_attr_e( 'Hide this notice', 'sportspress' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user