Move text settings to dedicated tab
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin
|
||||
* @version 0.7
|
||||
* @version 0.8
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -36,7 +36,7 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
*/
|
||||
public function get_settings() {
|
||||
|
||||
$settings = array(
|
||||
return apply_filters( 'sportspress_event_settings', array(
|
||||
|
||||
array( 'title' => __( 'Player Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'player_options' ),
|
||||
|
||||
@@ -83,25 +83,7 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'list_options' ),
|
||||
|
||||
array( 'title' => __( 'Text', 'sportspress' ), 'type' => 'title', 'desc' => __( 'The following options affect how words are displayed on the frontend.', 'sportspress' ), 'id' => 'text_options' ),
|
||||
|
||||
);
|
||||
|
||||
$strings = sp_get_text_options();
|
||||
|
||||
foreach ( sp_array_value( $strings, 'player', array() ) as $key => $value ):
|
||||
$settings[] = array(
|
||||
'title' => $value,
|
||||
'id' => 'sportspress_player_' . $key . '_text',
|
||||
'default' => '',
|
||||
'placeholder' => $value,
|
||||
'type' => 'text',
|
||||
);
|
||||
endforeach;
|
||||
|
||||
$settings[] = array( 'type' => 'sectionend', 'id' => 'text_options' );
|
||||
|
||||
return apply_filters( 'sportspress_event_settings', $settings ); // End player settings
|
||||
)); // End player settings
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user