options =& $sportspress_options; add_action( 'admin_init', array( $this, 'page_init' ), 1 ); } function page_init() { register_setting( 'sportspress_events', 'sportspress', 'sportspress_options_validate' ); add_settings_section( 'event', __( 'Event Options', 'sportspress' ), '', 'sportspress_events' ); add_settings_field( 'results', __( 'Results', 'sportspress' ), array( $this, 'results_callback' ), 'sportspress_events', 'event' ); add_settings_field( 'outcomes', __( 'Outcomes', 'sportspress' ), array( $this, 'outcomes_callback' ), 'sportspress_events', 'event' ); } function results_callback() { $main_result = sportspress_array_value( $this->options, 'main_result', 0 ); $args = array( 'post_type' => 'sp_result', 'numberposts' => -1, 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC' ); $data = get_posts( $args ); ?>
'sp_outcome', 'numberposts' => -1, 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC' ); $data = get_posts( $args ); ?>