Added setting to hide elevation

This commit is contained in:
Justin Foell
2019-08-02 14:23:46 -05:00
parent 9bd5380043
commit 8444866558
5 changed files with 68 additions and 11 deletions
+27
View File
@@ -505,6 +505,33 @@ class WPStrava_Settings {
return null;
}
/**
* Display the Hide Elevation Checkbox.
*
* @author Justin Foell <justin@foell.org>
* @since 1.7.2
*/
public function print_hide_elevation_input() {
?>
<input type="checkbox" id="strava_hide_elevation" name="strava_hide_elevation" <?php checked( $this->hide_elevation, 'on' ); ?>/>
<?php
}
/**
* Sanitize the Hide Elevation Checkbox.
*
* @param string $checked 'on' or null.
* @return string 'on' if checked.
* @author Justin Foell <justin@foell.org>
* @since 1.7.2
*/
public function sanitize_hide_elevation( $checked ) {
if ( 'on' === $checked ) {
return $checked;
}
return null;
}
/**
* Print checkbox option to clear cache.
*