To answer my own question (and hopefully help somebody else who wants to do something similar):
I added the following code to the SwiftPageBuilderShortcode_recent_posts class in the dante/swift-framework/page-builder/builder/shortcodes/recent_posts.php file. I added it in the content() method at line 33.
if ($category==”target-local”){
$user_id = get_current_user_id();
$key = “location”;
$single = true;
$user_location = get_user_meta($user_id, $key, $single);
$category_array = array($user_location);
}else{
$category_array = explode(“,”, $category_slug);
}
So, if I mark a post with a category that has a “target-local” slug and if the user’s “location” metadata matches a location subcategory, those posts will be shown.
Swift Ideas team please let me know if this isn’t the best approach!