= 2.5 */ // Enable 'sanitize_svg_front_end' by default if ( !isset($bodhi_svgs_options['sanitize_svg_front_end']) ) { $bodhi_svgs_options['sanitize_svg_front_end'] = 'on'; update_option( 'bodhi_svgs_settings', $bodhi_svgs_options ); } // Allow only admins to upload SVGs by default if ( !isset($bodhi_svgs_options['restrict']) || $bodhi_svgs_options['restrict'] == "on" ) { $bodhi_svgs_options['restrict'] = array('administrator'); update_option( 'bodhi_svgs_settings', $bodhi_svgs_options ); } elseif (isset($bodhi_svgs_options['restrict']) && $bodhi_svgs_options['restrict'] == "none" ) { $bodhi_svgs_options['restrict'] = array("none"); update_option( 'bodhi_svgs_settings', $bodhi_svgs_options ); } // By default turn on "Sanitize SVG while uploading" option if ( !isset($bodhi_svgs_options['sanitize_svg']) ) { $bodhi_svgs_options['sanitize_svg'] = "on"; update_option( 'bodhi_svgs_settings', $bodhi_svgs_options ); } // By default sanitize on upload for everyone except administrator and editor roles if ( !isset($bodhi_svgs_options['sanitize_on_upload_roles']) ) { $bodhi_svgs_options['sanitize_on_upload_roles'] = array('administrator', 'editor'); update_option( 'bodhi_svgs_settings', $bodhi_svgs_options ); } elseif ( isset($bodhi_svgs_options['sanitize_on_upload_roles']) && $bodhi_svgs_options['sanitize_on_upload_roles'] == "none") { $bodhi_svgs_options['sanitize_on_upload_roles'] = array("none"); update_option( 'bodhi_svgs_settings', $bodhi_svgs_options ); }