Created
February 4, 2019 17:36
-
-
Save httpstersk/e2b9aa571b7a2d13c025d8538dd3995b to your computer and use it in GitHub Desktop.
➋×➓ Check if a logged-in user can upload files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { select } = wp.data; | |
const { hasUploadPermissions } = select( 'core' ); | |
const canUpload = hasUploadPermissions(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment