Inventory_Presser_Customize_Admin_Dashboard::delete_all_data_and_deactivate()


Source

File: includes/class-customize-admin-dashboard.php

			 * This function is being called via AJAX and the
			 * post_id is incoming, so get the post
			 */
			$post = get_post( intval( $_POST['post_ID'] ) );
		}

		if( INVP::POST_TYPE != $post->post_type )
		{
			return '';
		}

		$attachments = get_children( array(
			'post_parent'    => $post->ID,
			'post_type'      => 'attachment',
			'posts_per_page' => -1,
		) );
		$counts = array(
			'image' => 0,
			'video' => 0,
			'text'  => 0,
			'PDF'   => 0,
			'other' => 0,
		);
		foreach( $attachments as $attachment )