And also to add pictures to the descriptions.
You can turn on the full tinyMCE editor by adding the code below in your theme functions.php file
add_filter( "adverts_form_load", "customize_adverts_add" );
function customize_adverts_add( $form ) {
if( $form['name'] != "advert" ) {
return $form;
}
foreach( $form["field"] as $key => $field ) {
if( $field["name"] == "post_content" ) {
$form["field"][$key]["mode"] = "tinymce-full";
}
}
return $form;
}
The file uploads will be possible only for users with file_upload capability, you can enable this capability for any user using a plugin like Members, but keep in mind that if you are allowing anyone to post an Ad in the frontend then this is a potential security issue.
Thanks, Greg 🙂
Is it possible to remove the “Upload picture function” on the tinymce-full?
And to have another “Add picture function” without the security issues?
I am afraid this is not really possible, note that the security issue is that any user has upload_files capability, the image editor itself is not insecure on its own.
Either way replacing it with some custom image uploader will be quite a lot of work as this is pretty complicated functionality. For images it is just best to use the Adverts Gallery.