We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7fef1d commit 30f4b16Copy full SHA for 30f4b16
src/Base/Models/PortalLinkGenerator.php
@@ -65,6 +65,16 @@ private function getShowOnPortalURL(): string
65
return '';
66
}
67
68
+ // Filter out terms where slug is not numeric
69
+ $terms = array_filter($terms, function($term) {
70
+ return is_numeric($term->slug);
71
+ });
72
+
73
+ // Sort terms by slug (blog ID)
74
+ usort($terms, function($a, $b) {
75
+ return intval($a->slug) <=> intval($b->slug);
76
77
78
$portalURL = reset($terms);
79
80
if (isset($_GET['source'])) {
0 commit comments