Categories::after_new_question( integer $post_id, object $post )
Description #
Things to do after creating a question.
Parameters #
- $post_idinteger (Required) Questions ID.
- $postobject (Required) Question post object.
Source #
File: addons/categories/categories.php
public function after_new_question( $post_id, $post ) { $values = anspress()->get_form( 'question' )->get_values(); if ( isset( $values['category']['value'] ) ) { wp_set_post_terms( $post_id, $values['category']['value'], 'question_category' ); } }
Expand full source code Collapse full source code View on GitHub: addons/categories/categories.php:465
Add your comment