//------------------ FILE RENAMING ON UPLOAD - Add rules
add_filter( 'frou_sanitize_file_name', function($filename_infs){
$current_post = get_the_id();
$filename_infs['structure']['translation']['adprice'] = get_post_meta($current_post)['cp_price'][0];
return $filename_infs;
}, 20 );
add_filter( 'frou_sanitize_file_name', function($filename_infs){
$current_post = get_the_id();
$filename_infs['structure']['translation']['adtitle'] = str_replace(' ', '_', htmlspecialchars(get_the_title($current_post)));
return $filename_infs;
}, 20 );
There are currently 1 users browsing this thread. (0 members and 1 guests)