Skip to content

Commit

Permalink
fix: only show vendor's own uploaded media to a vendor (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored and sabbir1991 committed Sep 19, 2019
1 parent 7e07c73 commit 1869267
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1155,12 +1155,11 @@ function dokan_log( $message, $level = 'debug' ) {
* Do not show other sellers images to a seller. He can see images only by him
*
* @param array $args
*
* @return array
*/
function dokan_media_uploader_restrict( $args ) {

// bail out for admin and editor
if ( current_user_can( 'delete_pages' ) ) {
if ( current_user_can( 'manage_options' ) ) {
return $args;
}

Expand Down

0 comments on commit 1869267

Please sign in to comment.