Explorar el Código

filters list starting refactor

Xen hace 1 año
padre
commit
af58f7c77d
Se han modificado 1 ficheros con 22 adiciones y 11 borrados
  1. 22 11
      www/index.php

+ 22 - 11
www/index.php

@@ -115,19 +115,30 @@ function clean_str($str) {
 		$item_link = "article.php?loc=" . $loc . '&a=' . $item->get_permalink();
 		
 		$up_title = strtoupper($item_title);
-		for ($i = 0 ; $i < count($title_filters); $i++)
+		if (str_contains($up_title, "SPORTS") == true)
 		{
-			if (str_contains($up_title, $title_filters[$i]) == true)
-			{
-				// 🧒 👦 👨‍👦‍👦
-				echo '<p class="sports" style="font-size: 4px;">
-					⚽ 🏀 🏈 ⚾️ 🎾 🏐 🏉 🎱 🏆 🏟 ⛹️
-					<a href="$item_link">happened</a>
-					</p>'; 
-				// Break out of 2nd-level loop.
-				continue 2;
-			}
+			// 🧒 👦 👨‍👦‍👦
+			echo '<p class="sports" style="font-size: 4px;">
+				⚽ 🏀 🏈 ⚾️ 🎾 🏐 🏉 🎱 🏆 🏟 ⛹️
+				<a href="$item_link">happened</a>
+				</p>'; 
+			// Break out of 2nd-level loop.
+			continue;
 		}
+		// for ($i = 0; $i < count($title_filters); $i++)
+		// {
+		// 	$testing = $title_filters[$i];
+		// 	if (str_contains($up_title, $testing) == true)
+		// 	{
+		// 		// 🧒 👦 👨‍👦‍👦
+		// 		echo '<p class="sports" style="font-size: 4px;">
+		// 			⚽ 🏀 🏈 ⚾️ 🎾 🏐 🏉 🎱 🏆 🏟 ⛹️
+		// 			<a href="$item_link">happened</a>
+		// 			</p>'; 
+		// 		// Break out of 2nd-level loop.
+		// 		continue 2;
+		// 	}
+		// }
 		
 		$subheadlines = clean_str($item->get_description());