Load league table and player list option in teams
This commit is contained in:
@@ -146,18 +146,6 @@ class SP_Templates {
|
||||
'action' => 'sportspress_output_team_staff',
|
||||
'default' => 'yes',
|
||||
),
|
||||
'lists' => array(
|
||||
'title' => __( 'Player Lists', 'sportspress' ),
|
||||
'option' => 'sportspress_team_show_lists',
|
||||
'action' => 'sportspress_output_team_lists',
|
||||
'default' => 'yes',
|
||||
),
|
||||
'tables' => array(
|
||||
'title' => __( 'League Tables', 'sportspress' ),
|
||||
'option' => 'sportspress_team_show_tables',
|
||||
'action' => 'sportspress_output_team_tables',
|
||||
'default' => 'yes',
|
||||
),
|
||||
) )
|
||||
),
|
||||
'table' => array_merge(
|
||||
|
||||
@@ -39,6 +39,7 @@ class SportsPress_League_Tables {
|
||||
add_filter( 'sportspress_shortcodes', array( $this, 'add_shortcodes' ) );
|
||||
add_filter( 'sportspress_team_settings', array( $this, 'add_settings' ) );
|
||||
add_filter( 'sportspress_team_options', array( $this, 'add_options' ) );
|
||||
add_filter( 'sportspress_after_team_template', array( $this, 'add_team_template' ), 30 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,6 +261,22 @@ class SportsPress_League_Tables {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add team template.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function add_team_template( $templates ) {
|
||||
return array_merge( $templates, array(
|
||||
'tables' => array(
|
||||
'title' => __( 'League Tables', 'sportspress' ),
|
||||
'option' => 'sportspress_team_show_tables',
|
||||
'action' => 'sportspress_output_team_tables',
|
||||
'default' => 'yes',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
|
||||
@@ -38,6 +38,7 @@ class SportsPress_Player_Lists {
|
||||
add_filter( 'sportspress_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
||||
add_filter( 'sportspress_shortcodes', array( $this, 'add_shortcodes' ) );
|
||||
add_filter( 'sportspress_player_settings', array( $this, 'add_settings' ) );
|
||||
add_filter( 'sportspress_after_team_template', array( $this, 'add_team_template' ), 20 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,6 +250,22 @@ class SportsPress_Player_Lists {
|
||||
)
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add team template.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function add_team_template( $templates ) {
|
||||
return array_merge( $templates, array(
|
||||
'lists' => array(
|
||||
'title' => __( 'Player Lists', 'sportspress' ),
|
||||
'option' => 'sportspress_team_show_lists',
|
||||
'action' => 'sportspress_output_team_lists',
|
||||
'default' => 'yes',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
|
||||
Reference in New Issue
Block a user