Skip to content

Instantly share code, notes, and snippets.

View charlieberentsen's full-sized avatar

charlieberentsen

View GitHub Profile
<?php
add_filter( 'sanitize_file_name', 'cb_sanitize_file_name' );
/**
* {@internal Missing short description}}
*
* @link wp-includes|formatting.php
* @todo causing errors at media-new.php
*/
function cb_sanitize_file_name( $filename ) {
if ( isset( $_REQUEST['post_id'] ) )