diff --git a/admin/options/config.php b/admin/options/config.php
new file mode 100644
index 00000000..aed263d6
--- /dev/null
+++ b/admin/options/config.php
@@ -0,0 +1,175 @@
+ 'sp_column',
+ 'numberposts' => -1,
+ 'posts_per_page' => -1,
+ 'orderby' => 'menu_order',
+ 'order' => 'ASC'
+ );
+ $data = get_posts( $args );
+?>
+
+
+
+ |
+ |
+ |
+
+
+
+
+ | post_title; ?> |
+
+ ID, 'sp_equation', true );
+ if ( $equation ):
+ echo str_replace(
+ array( '$', '+', '-', '*', '/' ),
+ array( '', '+', '−', '×', '÷' ),
+ $equation
+ );
+ else:
+ echo '—';
+ endif;
+ ?>
+ |
+
+ ID, 'sp_priority', true );
+ if ( $priority ):
+ echo $priority . ' ' . str_replace(
+ array( 'DESC', 'ASC' ),
+ array( '↓', '↑' ),
+ get_post_meta ( $row->ID, 'sp_order', true )
+ );
+ else:
+ echo '—';
+ endif;
+ ?>
+ |
+
+
+
+
+ |
+
+
+
+
+ 'sp_statistic',
+ 'numberposts' => -1,
+ 'posts_per_page' => -1,
+ 'orderby' => 'menu_order',
+ 'order' => 'ASC'
+ );
+ $data = get_posts( $args );
+?>
+
+
+
+ |
+ |
+ |
+
+
+
+
+ | post_title; ?> |
+
+ ID, 'sp_equation', true );
+ if ( $equation ):
+ echo str_replace(
+ array( '$', '+', '-', '*', '/' ),
+ array( '', '+', '−', '×', '÷' ),
+ $equation
+ );
+ else:
+ echo '—';
+ endif;
+ ?>
+ |
+
+ ID, 'sp_priority', true );
+ if ( $priority ):
+ echo $priority . ' ' . str_replace(
+ array( 'DESC', 'ASC' ),
+ array( '↓', '↑' ),
+ get_post_meta ( $row->ID, 'sp_order', true )
+ );
+ else:
+ echo '—';
+ endif;
+ ?>
+ |
+
+
+
+
+ |
+
+
+
+
+ 'sp_result',
+ 'numberposts' => -1,
+ 'posts_per_page' => -1,
+ 'orderby' => 'menu_order',
+ 'order' => 'ASC'
+ );
+ $data = get_posts( $args );
+?>
+
-
-
-
+
+
+
+
+
@@ -74,7 +83,7 @@ function sportspress_validate( $input ) {
function sportspress_register_settings() {
register_setting(
- 'sportspress',
+ 'sportspress_general',
'sportspress',
'sportspress_validate'
);
@@ -83,14 +92,14 @@ function sportspress_register_settings() {
'general',
'',
'',
- 'sportspress'
+ 'sportspress_general'
);
add_settings_field(
- 'sport',
+ 'sport',
__( 'Sport', 'sportspress' ),
'sportspress_sport_callback',
- 'sportspress',
+ 'sportspress_general',
'general'
);
diff --git a/sportspress-actions.php b/sportspress-actions.php
index 2bcc08e9..c3faa82f 100644
--- a/sportspress-actions.php
+++ b/sportspress-actions.php
@@ -55,11 +55,16 @@ function sp_manage_posts_custom_column( $column, $post_id ) {
echo get_post_meta ( $post_id, 'sp_team' ) ? sp_the_posts( $post_id, 'sp_team', '', '
', $result, ( empty( $result ) ? ' — ' : ' ' ) ) : '—';
break;
case 'sp_equation':
- echo str_replace(
- array( '$', '+', '-', '*', '/' ),
- array( '', '+', '−', '×', '÷' ),
- get_post_meta ( $post_id, 'sp_equation', true )
- );
+ $equation = get_post_meta ( $post_id, 'sp_equation', true );
+ if ( $equation ):
+ echo str_replace(
+ array( '$', '+', '-', '*', '/' ),
+ array( '', '+', '−', '×', '÷' ),
+ $equation
+ );
+ else:
+ echo '—';
+ endif;
break;
case 'sp_order':
$priority = get_post_meta ( $post_id, 'sp_priority', true );
diff --git a/sportspress.php b/sportspress.php
index e0b1927b..f0d90cb8 100644
--- a/sportspress.php
+++ b/sportspress.php
@@ -31,7 +31,7 @@ include dirname( __FILE__ ) . '/sportspress-globals.php' ;
require_once dirname( __FILE__ ) . '/sportspress-functions.php';
// Settings
-include dirname( __FILE__ ) . '/sportspress-settings.php' ;
+include dirname( __FILE__ ) . '/admin/options/options.php' ;
// Custom Post Types
require_once dirname( __FILE__ ) . '/admin/post-types/separator.php';