You can use following code to achieve this
if ( is_user_logged_in() ) {
// Editor without media buttons
wp_editor( $content, 'editorname', array('media_buttons' => false) );
} else {
// Editor with media buttons
wp_editor( $content, 'editorname');
}
Related Posts:
- Better solution for managing media attachments with `wp_editor()`?
- Disable TinyMCE Drag and Drop
- How to change upload directory based on frontend form input name or ID?
- Upload featured image from front end using media-upload.php
- Front-End Upload media with category
- Frontend media shows “An error occurred in the upload. Please try again later.”
- Set default “Link CSS Class” in add media admin editor
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- what happens to existing media files when I switch to year/month directory structure format?
- Set limit to media upload?
- Use a separate custom table (not posts) to handle file upload data
- Add inline uploader to plugin option page
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- I want to replace a media file (pdf) with an updated version
- There’s a way to scale media (images) at 50%?
- How to get all files inserted (but not attached) to a post
- Media Uploader: get deleted files
- WordPress REST Upload Media
- front end post with multiple upload images?
- How to validate the file name of the Media File Uploads?
- upload featured image from front end using wordpress add media button
- Add/change multipart_params parameter when uploading post image
- Post Specific Uploader
- Select image sizes you want to be uploaded
- How to change “Publish” button text for specific page
- Media upload via backend doen’t work after moving site
- Setting higher upload limit
- Close the media-upload thickbox right after upload is finished?
- How can I receive the image id using the media box?
- media sideload image not working with JPG file
- How do I get allowed Media Library upload file extension list?
- Uploading dwg files to wordpress
- Images not being generated at correct size
- Use the WP media uploader dialog for uploading a form attachment (non-admin). Offering progress and drag and drop feedback
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Media Gallery Upload photo incorrect way like glitch
- WordPress uploads autocreate folder every month
- Enabling users to upload files
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- WordPress Media Uploader in page template (On Front-end)
- making media URL secured
- Is there a way to make my media files unsearchable?
- How to allow logged out users to upload media?
- Is it possible to use media_sideload_image to upload local files?
- WordPress media uploader – upload tabs not hiding
- Is it safe to allow non-admin users access to media uploader
- Attach media to post by media category
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- PHP error when trying to upload .mp3 files via Media Library [closed]
- How to fix the orientation of images when uploading via the WordPress Media Uploader? [closed]
- Uploading PDF files from the front-end
- How does WordPress decides how many sizes of an image to create?
- Flat media folder vs multiple directories
- Move media files from the root to date folder structure
- Big file upload give HTTP error
- Can you limit the size of media files being uploaded not using php.ini?
- Image upload to media library fails. Folder won’t create, database insert fail, XAMPP Windows
- Send media uploads to different directories
- Open Media Uploader Link in single post or page
- Remove Media File Items From Server That Do Not Exist in Media Library
- How to change archieve frequency of the media file in uploads folder for wordpress blog
- Cropping thumbnails to specific dimensions on front end post
- Insert attachments from custom uploader into post (regular uploader style)
- How to limit sizes for specific upload programmatically?
- Using WP-CLI “wp media import” to sync files to the media library
- Efficient way to move media folder to another folder
- Make inline uploader (plupload) on options page upload to a specific folder
- Blog suddenly can’t display .jpg
- MIME type not supporting HEIC support type in WordPress
- media file uploading
- Replicate Media Galley Edit view in Add Media View
- How to manually set an attachment in a post?
- Adding attachment custom field metadata to TinyMCE tag
- Sanitizing existing media library paths and page links from foreign characters
- Issue with upload.php with media
- Media files not loading
- Media files not loading
- media_sideload_image results in http error (500)
- How to share media between independent blogs?
- media_handle_upload on mix form fields (not required file input)
- Check if author or uploader id of the attachment(uploaded) image is match?
- WP Capabilities to Add Media, Use Media, But Not Edit Them
- Don’t show avatars in media library
- Organizing the Media Library for Cleanup
- Drag and Drop Media Not Working in Windows 10 Edge Browser
- Insert media while posting is not working with new wordpress update
- Media Library broken images
- Make custom thumbnail size image in media_sideload_image function
- Importing blog failed to download attachments from older (still online) blog
- Upload more than one media files with a post
- Large front end file uploads on cloud
- Single file upload
- Add frontend editor with media buttons for Visitors and display only their media
- Can’t upload files 1MB+ [closed]
- Updating Media Library PDF’s in bulk
- How to properly move media files and update data?