options =& $sportspress_options; add_action( 'admin_init', array( $this, 'page_init' ), 1 ); } function page_init() { register_setting( 'sportspress_text', 'sportspress', 'sportspress_options_validate' ); add_settings_section( 'text', __( 'Text', 'sportspress' ), '', 'sportspress_text' ); $this->strings =& SP()->text->strings; foreach ( $this->strings as $string ): add_settings_field( sanitize_title( $string ), $string, array( $this, 'text_callback' ), 'sportspress_text', 'text' ); endforeach; } public function text_callback( $test ) { $string = array_shift( $this->strings ); $key = sanitize_title( $string ); $text = sportspress_array_value( sportspress_array_value( $this->options, 'text', array() ), $string, null ); ?>