|
|
|
@@ -55,81 +55,79 @@
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
<?php if ( 'team' == get_option( 'sportspress_mode', 'team' ) ) { ?>
|
|
|
|
<table class="form-table">
|
|
|
|
<table class="form-table">
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
$selection = get_option( 'sportspress_primary_result', 0 );
|
|
|
|
$selection = get_option( 'sportspress_primary_result', 0 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$args = array(
|
|
|
|
$args = array(
|
|
|
|
'post_type' => 'sp_result',
|
|
|
|
'post_type' => 'sp_result',
|
|
|
|
'numberposts' => -1,
|
|
|
|
'numberposts' => -1,
|
|
|
|
'posts_per_page' => -1,
|
|
|
|
'posts_per_page' => -1,
|
|
|
|
'orderby' => 'menu_order',
|
|
|
|
'orderby' => 'menu_order',
|
|
|
|
'order' => 'ASC'
|
|
|
|
'order' => 'ASC'
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$data = get_posts( $args );
|
|
|
|
$data = get_posts( $args );
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
<tr valign="top">
|
|
|
|
<tr valign="top">
|
|
|
|
<th scope="row" class="titledesc">
|
|
|
|
<th scope="row" class="titledesc">
|
|
|
|
<?php _e( 'Team Results', 'sportspress' ) ?>
|
|
|
|
<?php _e( 'Event Results', 'sportspress' ) ?>
|
|
|
|
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
|
|
|
<p class="description"><?php _e( 'Used for events.', 'sportspress' ); ?></p>
|
|
|
|
</th>
|
|
|
|
</th>
|
|
|
|
<td class="forminp">
|
|
|
|
<td class="forminp">
|
|
|
|
<legend class="screen-reader-text"><span><?php _e( 'Team Results', 'sportspress' ) ?></span></legend>
|
|
|
|
<legend class="screen-reader-text"><span><?php _e( 'Event Results', 'sportspress' ) ?></span></legend>
|
|
|
|
<form>
|
|
|
|
<form>
|
|
|
|
<?php wp_nonce_field( 'sp-save-primary-result', 'sp-config-nonce', false ); ?>
|
|
|
|
<?php wp_nonce_field( 'sp-save-primary-result', 'sp-config-nonce', false ); ?>
|
|
|
|
<table class="widefat sp-admin-config-table">
|
|
|
|
<table class="widefat sp-admin-config-table">
|
|
|
|
<thead>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
|
|
|
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col" class="edit"></th>
|
|
|
|
<th scope="col" class="edit"></th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tfoot>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<th class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_0" name="sportspress_primary_result" value="0" <?php checked( $selection, 0 ); ?>></th>
|
|
|
|
|
|
|
|
<th colspan="4"><label for="sportspress_primary_result_0">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
if ( sizeof( $data ) > 0 ):
|
|
|
|
|
|
|
|
$default = end( $data );
|
|
|
|
|
|
|
|
reset( $data );
|
|
|
|
|
|
|
|
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
_e( 'Default', 'sportspress' );
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
</label></th>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tfoot>
|
|
|
|
|
|
|
|
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
|
|
|
|
|
|
|
<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 $row->post_name; ?>" name="sportspress_primary_result" value="<?php echo $row->post_name; ?>" <?php checked( $selection, $row->post_name ); ?>></td>
|
|
|
|
|
|
|
|
<td class="row-title"><label for="sportspress_primary_result_<?php echo $row->post_name; ?>"><?php echo $row->post_title; ?></label></td>
|
|
|
|
|
|
|
|
<td><?php echo $row->post_name; ?>for, <?php echo $row->post_name; ?>against</td>
|
|
|
|
|
|
|
|
<td><p class="description"><?php echo $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>
|
|
|
|
|
|
|
|
<?php $i++; endforeach; else: ?>
|
|
|
|
|
|
|
|
<tr class="alternate">
|
|
|
|
|
|
|
|
<td colspan="5"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<?php endif; ?>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
<tfoot>
|
|
|
|
</form>
|
|
|
|
<tr>
|
|
|
|
<div class="tablenav bottom">
|
|
|
|
<th class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_0" name="sportspress_primary_result" value="0" <?php checked( $selection, 0 ); ?>></th>
|
|
|
|
<a class="button alignleft" href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php _e( 'View All', 'sportspress' ); ?></a>
|
|
|
|
<th colspan="4"><label for="sportspress_primary_result_0">
|
|
|
|
<a class="button button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_result' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
|
|
|
<?php
|
|
|
|
<br class="clear">
|
|
|
|
if ( sizeof( $data ) > 0 ):
|
|
|
|
</div>
|
|
|
|
$default = end( $data );
|
|
|
|
</td>
|
|
|
|
reset( $data );
|
|
|
|
</tr>
|
|
|
|
printf( __( 'Default (%s)', 'sportspress' ), $default->post_title );
|
|
|
|
</tbody>
|
|
|
|
else:
|
|
|
|
</table>
|
|
|
|
_e( 'Default', 'sportspress' );
|
|
|
|
<?php } ?>
|
|
|
|
endif;
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
</label></th>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tfoot>
|
|
|
|
|
|
|
|
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
|
|
|
|
|
|
|
<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 $row->post_name; ?>" name="sportspress_primary_result" value="<?php echo $row->post_name; ?>" <?php checked( $selection, $row->post_name ); ?>></td>
|
|
|
|
|
|
|
|
<td class="row-title"><label for="sportspress_primary_result_<?php echo $row->post_name; ?>"><?php echo $row->post_title; ?></label></td>
|
|
|
|
|
|
|
|
<td><?php echo $row->post_name; ?>for, <?php echo $row->post_name; ?>against</td>
|
|
|
|
|
|
|
|
<td><p class="description"><?php echo $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>
|
|
|
|
|
|
|
|
<?php $i++; endforeach; else: ?>
|
|
|
|
|
|
|
|
<tr class="alternate">
|
|
|
|
|
|
|
|
<td colspan="5"><?php _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>
|
|
|
|
|
|
|
|
<br class="clear">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
<table class="form-table">
|
|
|
|
<table class="form-table">
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
@@ -181,64 +179,62 @@
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
<?php if ( 'team' == get_option( 'sportspress_mode', 'team' ) ) { ?>
|
|
|
|
<table class="form-table">
|
|
|
|
<table class="form-table">
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
$args = array(
|
|
|
|
$args = array(
|
|
|
|
'post_type' => 'sp_column',
|
|
|
|
'post_type' => 'sp_column',
|
|
|
|
'numberposts' => -1,
|
|
|
|
'numberposts' => -1,
|
|
|
|
'posts_per_page' => -1,
|
|
|
|
'posts_per_page' => -1,
|
|
|
|
'orderby' => 'menu_order',
|
|
|
|
'orderby' => 'menu_order',
|
|
|
|
'order' => 'ASC'
|
|
|
|
'order' => 'ASC'
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$data = get_posts( $args );
|
|
|
|
$data = get_posts( $args );
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
<tr valign="top">
|
|
|
|
<tr valign="top">
|
|
|
|
<th scope="row" class="titledesc">
|
|
|
|
<th scope="row" class="titledesc">
|
|
|
|
<?php _e( 'Table Columns', 'sportspress' ) ?>
|
|
|
|
<?php _e( 'Table Columns', 'sportspress' ) ?>
|
|
|
|
<p class="description"><?php _e( 'Used for league tables.', 'sportspress' ); ?></p>
|
|
|
|
<p class="description"><?php _e( 'Used for league tables.', 'sportspress' ); ?></p>
|
|
|
|
</th>
|
|
|
|
</th>
|
|
|
|
<td class="forminp">
|
|
|
|
<td class="forminp">
|
|
|
|
<table class="widefat sp-admin-config-table">
|
|
|
|
<table class="widefat sp-admin-config-table">
|
|
|
|
<thead>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Key', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Key', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Rounding', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Rounding', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
|
|
|
<th scope="col" class="edit"></th>
|
|
|
|
<th scope="col" class="edit"></th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
|
|
|
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
|
|
|
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
|
|
|
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
|
|
|
<td class="row-title"><?php echo $row->post_title; ?></td>
|
|
|
|
<td class="row-title"><?php echo $row->post_title; ?></td>
|
|
|
|
<td><?php echo $row->post_name; ?></td>
|
|
|
|
<td><?php echo $row->post_name; ?></td>
|
|
|
|
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
|
|
|
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
|
|
|
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
|
|
|
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
|
|
|
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
|
|
|
|
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
|
|
|
|
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
|
|
|
<td><p class="description"><?php echo $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 get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<?php $i++; endforeach; else: ?>
|
|
|
|
<?php $i++; endforeach; else: ?>
|
|
|
|
<tr class="alternate">
|
|
|
|
<tr class="alternate">
|
|
|
|
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
|
|
|
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
<div class="tablenav bottom">
|
|
|
|
<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 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 button-primary alignright" href="<?php echo admin_url( 'post-new.php?post_type=sp_column' ); ?>"><?php _e( 'Add New', 'sportspress' ); ?></a>
|
|
|
|
<br class="clear">
|
|
|
|
<br class="clear">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</fieldset>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<table class="form-table">
|
|
|
|
<table class="form-table">
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
|