The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Issue [Solved] Can't do image only

5 Posts
2 Users
1 Reactions
1,325 Views
Posts: 17
 Mau
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@mau)
Eminent Member
Joined: 3 years ago
[#6726]

I want users to be able to upload an image. Text should be optional. I put in settings minimum required words and letters as 0 but still if I only try to upload an image as user it says that a required field is missing


4 Replies
Asti
Posts: 8225
 Asti
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@asti)
Illustrious Member
Joined: 8 years ago

Hi @mau,

You should add the hook code below in the active theme fucntions.php file: 

add_filter( 'allow_empty_comment', function ($allow, $data) {
  return true;
}, 10 , 2 );

This article should be helpful for you: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Besides adding the hook code, you should also make sure the values of the following options are set to 0:

  • Comment Text Length
  • Reply Text Length

Posts: 17
 Mau
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@mau)
Eminent Member
Joined: 3 years ago

Hi Asti, 

 

Thank you so much, it is working! I left a 5star review on the plugin page for this. 

Another question: 

 

Do you also have a code for making the image a required field?


2 Replies
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8225
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@mau,

Thank you so much, it is working! I left a 5star review on the plugin page for this.

Thank you, very much! We really appreciate it. 

Do you also have a code for making the image a required field?

I'll ask the developers and let you know soon. 


Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8225
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Please find a response from the developers. 

You can use the code below: 

add_filter('wpdiscuz_mu_allowed_extensions', function($extensions){
    return $extensions .=' required ';
});

Put the code in the active theme fucntions.php file. 

The code simply doesn't allow posting a comment if the attachment is missing. It doesn't display any notices. 

For deeper customizations, you can contact us via sales[at]gvectors.com email address. We have plugin customization and custom addon development services at the gVectors Team. They can assess the work and create it for you.