diff --git a/includes/safe-svg-settings.php b/includes/safe-svg-settings.php index 34c1559..05239b7 100644 --- a/includes/safe-svg-settings.php +++ b/includes/safe-svg-settings.php @@ -25,7 +25,15 @@ public function __construct() { */ public function settings_init() { register_setting( 'media', 'safe_svg_upload_roles', [ $this, 'sanitize_safe_svg_roles' ] ); - register_setting( 'media', 'safe_svg_large_svg', [ $this, 'sanitize_safe_svg_large_svg' ] ); + register_setting( + 'media', + 'safe_svg_large_svg', + [ + 'type' => 'integer', + 'default' => 0, + 'sanitize_callback' => 'absint', + ] + ); add_settings_section( 'safe_svg_settings', @@ -44,7 +52,7 @@ public function settings_init() { add_settings_field( 'safe_svg_large_svg', - __( 'Large SVG Files', 'safe-svg' ), + __( 'Large Files', 'safe-svg' ), [ $this, 'safe_svg_large_svg_cb' ], 'media', 'safe_svg_settings' @@ -177,8 +185,9 @@ public function update_capability( $new_roles, $old_roles ) { public function safe_svg_large_svg_cb() { ?> +

sanitizer->setAllowHugeFiles( true ); }