AnsPress_Admin::modify_answer_title( array $data )

Description #

Modify answer title before saving, in wp-admin.

Parameters #

  • $data
    array (Required) Raw post data.

Source #

File: admin/anspress-admin.php

	public static function modify_answer_title( $data ) {
		if ( 'answer' === $data['post_type'] ) {
			$data['post_title'] = get_the_title( $data['post_parent'] );
		}

		return $data;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment