How to customize bpcp-file-dialog.php?
-
Hi,
I want to customize bpcp-file-dialog.php in order to set different error messages for uploading files in the portfolio.
I specifically want to edit this part:
if ( is_wp_error( $attachment_id ) ) { $types = __('jpg, jpeg, jpe, png, gif', 'bp-portfolio'); if($_GET["type"] == 'song' ) $types = __('mp3, m4a, m4b, ra, ram, ogg, oga, mid, midi, wav, wma, wax, mka', 'bp-portfolio'); $html = $this->core_alerts(sprintf(__('%s has failed to upload due to an error. Sorry, this file type is not permitted. Please upload one of the following file types: %s.','bp-portfolio'), $_FILES['file']['name'], $types ),'error'); echo 'jQuery("#upload_photo_attachment_message").html('.json_encode($html).');'; return false; }
Is there a way to do that?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to customize bpcp-file-dialog.php?’ is closed to new replies.