AnsPress_Admin::trashed_post( integer $post_id )
Description #
Delete page check transient after AnsPress pages are deleted.
Parameters #
- $post_idinteger (Required) Page ID.
Source #
File: admin/anspress-admin.php
public static function trashed_post( $post_id ) { $_post = get_post( $post_id ); if ( 'page' === $_post->post_type ) { $pages_slug = array( 'base_page', 'ask_page' ); $page_ids = array(); $opt = ap_opt(); foreach ( $pages_slug as $slug ) { $page_ids[] = $opt[ $slug ]; } if ( in_array( $_post->ID, $page_ids, true ) ) { delete_transient( 'ap_pages_check' ); } } }
Expand full source code Collapse full source code View on GitHub: admin/anspress-admin.php:415
Add your comment