diff --git a/admin/hooks/gettext.php b/admin/hooks/gettext.php
index 2263f5e5..fc1b54c3 100644
--- a/admin/hooks/gettext.php
+++ b/admin/hooks/gettext.php
@@ -21,7 +21,7 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain ) {
elseif ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff' ) ) ):
switch ( $untranslated_text ):
case 'Enter title here':
- $translated_text = __( 'Name', 'sportspress' );
+ $translated_text = __( '(Auto)', 'sportspress' );
break;
case 'Set featured image':
$translated_text = sprintf( __( 'Select %s', 'sportspress' ), __( 'Photo', 'sportspress' ) );
diff --git a/admin/hooks/the-content.php b/admin/hooks/the-content.php
index abc42dc0..1e807908 100644
--- a/admin/hooks/the-content.php
+++ b/admin/hooks/the-content.php
@@ -33,9 +33,24 @@ add_filter( 'the_content', 'sportspress_default_team_content' );
function sportspress_default_table_content( $content ) {
if ( is_singular( 'sp_table' ) && in_the_loop() ):
+ $id = get_the_ID();
+ $leagues = get_the_terms( $id, 'sp_league' );
+ $seasons = get_the_terms( $id, 'sp_season' );
+ $terms = array();
+ if ( $leagues ):
+ $league = reset( $leagues );
+ $terms[] = $league->name;
+ endif;
+ if ( $seasons ):
+ $season = reset( $seasons );
+ $terms[] = $season->name;
+ endif;
+ $title = '';
+ if ( sizeof( $terms ) )
+ $title = '
' . implode( ' — ', $terms ) . '
';
$table = sportspress_league_table();
$excerpt = has_excerpt() ? wpautop( get_the_excerpt() ) : '';
- $content = $table . $content . $excerpt;
+ $content = $title . $table . $content . $excerpt;
endif;
return $content;
}
diff --git a/admin/post-types/player.php b/admin/post-types/player.php
index 9865e157..8e8daa2a 100644
--- a/admin/post-types/player.php
+++ b/admin/post-types/player.php
@@ -81,8 +81,8 @@ function sportspress_player_details_meta( $post ) {