WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] [Plugin: uCan Post] Name and email requirements for posts

[Resolved] [Plugin: uCan Post] Name and email requirements for posts

  • Hello and thank you for your plugin. It is very near to perfect for my site. I am wondering if there is a way that I can disable the requirements to provide a name and an email when a user submits a post? I am trying to use this for a site that where submissions from guests would be anonymous and I don’t see any way to eliminate those requirements in the settings for the plugin. Thanks.

    http://wordpress.org/extend/plugins/ucan-post/

Viewing 2 replies - 1 through 2 (of 2 total)
  • find and remove these lines from the ucan-post-class.php file – or downgrade to the previous version.

    if(empty($_POST['ucan_submission_guest_name']) && !$user_ID)
            $errors[] = __('You must enter your name!', 'ucan-post');
          if((empty($_POST['ucan_submission_guest_email']) || !$this->uCan_Validate_Email_Address(stripslashes($_POST['ucan_submission_guest_email']))) && !$user_ID)
            $errors[] = __('You must enter a valid email address!', 'ucan-post');

    Thank you very much for your help. As a follow up, I also noticed that the form fields for name and email on the my guest post submission page were still there after removing the code that cartpauj told me to remove. To remove those form fields, you have to go to the “ucan-submission-form.php” file and either remove or comment out the following lines:

    <?php echo __('Name', 'ucan-post'); ?>:
            <span class="small"><?php echo __('(required - not shown publically)', 'ucan-post'); ?></span>
          </label>
          <input type="text" name="ucan_submission_guest_name" value="<?php echo stripslashes($_POST['ucan_submission_guest_name']); ?>" />
    
          <label>
            <?php echo __('Email', 'ucan-post'); ?>:
            <span class="small"><?php echo __('(required - not shown publically)', 'ucan-post'); ?></span>
          </label>
          <input type="text" name="ucan_submission_guest_email" value="<?php echo stripslashes($_POST['ucan_submission_guest_email']); ?>" />

    I hope this helps anyone out to achieve the same thing that I was, and thanks again cartpauj for your speedy help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: uCan Post] Name and email requirements for posts’ is closed to new replies.
Skip to toolbar