Created
May 2, 2023 17:54
-
-
Save matadorjobs/891dc2086728563e15f6c12745ac40d5 to your computer and use it in GitHub Desktop.
Matador Docs Example: Require Resume Submission at Processing Level
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // omit opening PHP tag | |
add_filter( 'matador_application_data_raw', 'matador_docs_require_resume_submission_at_processing_level', 20 ); | |
/** | |
* Matador Docs Example: Require Resume Submission at Processing Level | |
* | |
* In the event spam bots have found a way to bypass your resume requirement, this is an added layer of validation to | |
* stop the spam from sneaking through. This will have a poor User Interface in the event you use this on forms where | |
* a resume is optional and this is a site-wide "hammer" solution, so all applications must require resume if you intend | |
* to use this. Further, this will break the "Matador Jobs Pro - Contact Form Extension" if you use it. | |
* | |
* @since 2023-05-02 | |
* | |
* @author Matador US, LP, @jeremyescott | |
* | |
* @param array $submission | |
* @return array|false | |
*/ | |
function matador_docs_require_resume_submission_at_processing_level( $submission ) { | |
if ( empty( $_FILES ) ) { | |
return false; | |
} | |
if ( ! isset( $_FILES[ 'resume' ] ) ) { | |
return false; | |
} | |
return $submission; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment