Settings page restored, AJAX hook bundled in main class

This commit is contained in:
2017-12-07 18:22:21 +01:00
parent 15f02cbe83
commit 32e6db17a0
7 changed files with 97 additions and 64 deletions

View File

@ -20,10 +20,8 @@ defined( 'ABSPATH' ) || exit;
<form action="options.php" method="post">
<?php
settings_fields( 'wplt2_settings' );
do_settings_sections( __FILE__ );
do_settings_sections( 'wplt2-settings-page' );
submit_button();
?>
<p class="submit">
<input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes">
</p>
</form>
</div>

View File

@ -108,7 +108,7 @@ defined( 'ABSPATH' ) || exit;
<label for="<?php echo esc_attr( $this->get_field_id( 'highlight_time' ) ); ?>"><?php esc_html_e( 'Highlight time [s]:', 'wplt2' ); ?></label>
</td>
<td>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'highlight_time' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'highlight_time' ) ); ?>" type="text" value="<?php echo esc_html( $highlight_time ); ?>" />
<input type="number" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'highlight_time' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'highlight_time' ) ); ?>" type="text" value="<?php echo esc_html( $highlight_time ); ?>" />
</td>
</tr>
<tr>