private function get_category( $post_id ) {
		$category_data = get_the_category( $post_id );
		$category_arr  = [];
		foreach ( $category_data as $cat ) {
			array_push( $category_arr, $cat->term_id );
		}

		return $category_arr;
	}
private function get_category( $post_id ) {
		$category_data = get_the_category( $post_id );
		$category_arr  = [];
		foreach ( $category_data as $cat ) {
			array_push( $category_arr, $cat->term_id );
		}

		return $category_arr;
	}
private function get_category ( $ post_id ) { $ category_data = get_the_category ( $ post_id ) ; $ category_arr = [ ] ; foreach ( $ category_data as $ cat ) { array_push ( $ category_arr , $ cat -> term_id ) ; } return $ category_arr ; }
Get Categories of a post.

@param $post_id ID of the post.

@return array
Get Categories of a post .