admin管理员组文章数量:1122846
I am using a front-end submission form for users to contribute posts to my platform. Users can upload text and images via the content area.
However, I would like to simplify the interface by limiting the 'Add Media' upload modal. Currently the modal, that allows users to insert images / media into the posts, shows a sidebar with media, image and audio galleries, and further, once a file was selected, users can see the Media Library and can edit the metadata (title, etc) in the Media Library tab.
Is there a way of modifying the popup modal 'Add Media', to simply let users select a single file from their local machine, and insert the file into the content area, without showing the Media Library etc.
I would still like to use the 'Add Media' upload, as from my understanding, it includes some security features, but I don't want users to see the modal popup, and instead just select a file which will be inserted into the post.
Also, the same for the drag and drop function, without using the modal or simplifying the modal.
This is my current code in the template:
// the content
echo aui()->textarea( array(
'id' => 'template_post_content',
'name' => 'template_post_content',
'placeholder' => __( 'content ...', 'uwp-frontend-post' ),
'label' => __( 'Content', 'uwp-frontend-post' ),
'title' => __( 'Content', 'uwp-frontend-post' ),
'value' => $post_content,
'required' => true,
'rows' => '5',
'wysiwyg' => array(
'wpautop' => true,
'media_buttons' => true,
'teeny' => true,
'quicktags' => false,
'tinymce' => true,
'drag_drop_upload' => true
)
) );
Thank you in advance for your help :)
本文标签: uploadsSimplifying 39Add Media39 Modal in frontend Content Editor
版权声明:本文标题:uploads - Simplifying 'Add Media' Modal in front-end Content Editor 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736306062a1932817.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论