Created
February 17, 2021 18:05
-
-
Save rahularyan/ea63057eb6e6ccac287a6bba4b31af21 to your computer and use it in GitHub Desktop.
Allow question title to be more than 100 characters
This file contains 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 | |
/** | |
* This hook will make question title to be more than 100 characters. | |
* | |
* @param array $form Form arguments. | |
* @return array | |
*/ | |
function my_ap_make_question_description_optional( $form ) { | |
$validate = $form['fields']['post_title']['validate']; | |
$validate['max_length'] = 200; | |
// Update existing value. | |
$form['fields']['post_title']['validate'] = $validate; | |
return $form; | |
} | |
add_filter( 'ap_question_form_fields', 'my_ap_question_title_more_than_100' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment