generalize get_polygon_layers() to get_vector_layer_by_type() and
get_selected_polygons() to get_features()