'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'bmp' => 'image/bmp', 'tif|tiff' => 'image/tiff', 'ico' => 'image/x-icon' ); $rws_valid = wp_check_filetype( $uploaded, $rws_mimes ); return ( $rws_valid['ext'] ) ? $uploaded : '' ; } } // if ( ! function_exists( 'rws_reset_options' ) ){ // function rws_reset_options ( $values ){ // $rws_business_options_defaults = rws_business_options_defaults (); // if ( $values === 1 ){ // $blogname = str_replace(" ", "", get_option('blogname')); // $date = date("m-d-Y"); // $json_name = $blogname."-".$date; // Namming the filename will be generated. // $options = get_theme_mods(); // Get all options data, return array // $json_file = json_encode($need_options); // Encode data into json data // ob_clean(); // echo $json_file; // header("Content-Type: text/json; charset=" . get_option( 'blog_charset')); // header("Content-Disposition: attachment; filename=$json_name.json"); // exit(); // }else{ // die ( 'i died' ); // } // } // }