AnsPress_Admin::post_data_check( array $data )
Description #
[Not documented]
Parameters #
- $dataarray (Required) Post data array.
Source #
File: admin/anspress-admin.php
public static function post_data_check( $data ) { global $pagenow; if ( 'post.php' === $pagenow && 'answer' === $data['post_type'] ) { $parent_q = ap_sanitize_unslash( 'ap_q', 'p' ); $parent_q = ! empty( $parent_q ) ? $parent_q : $data['post_parent']; if ( empty( $parent_q ) ) { add_filter( 'redirect_post_location', array( __CLASS__, 'custom_post_location' ), 99 ); return; } } return $data; }
Expand full source code Collapse full source code View on GitHub: admin/anspress-admin.php:439
Add your comment