|
|
|
@ -1,22 +1,24 @@
|
|
|
|
|
<?php
|
|
|
|
|
$sample_searches_tags_reserved = ["we're here"];
|
|
|
|
|
$sample_searches_plain = ["Australia"];
|
|
|
|
|
$sample_searches_tags = ["privacy", "linux"];
|
|
|
|
|
$sample_searches_tags_reserved = ["new", "we're here"];
|
|
|
|
|
$sample_searches_plain = ["language", "Australia"];
|
|
|
|
|
$sample_searches_tags = ["official", "privacy", "android", "crypto"];
|
|
|
|
|
$sample_searches_languages = [["en", "🇬🇧"], ["zh", "🇨🇳"]];
|
|
|
|
|
|
|
|
|
|
$sample_searches = [];
|
|
|
|
|
|
|
|
|
|
foreach ($sample_searches_tags_reserved as $sample_search) {
|
|
|
|
|
$sample_searches[] = array("type" => "tag-reserved", "text" => "#$sample_search", "search" => "#$sample_search");
|
|
|
|
|
foreach ($sample_searches_tags_reserved as $tag) {
|
|
|
|
|
$search = str_replace(" ", "-", $tag);
|
|
|
|
|
$sample_searches[] = array("type" => "tag-reserved", "text" => "#$tag", "search" => "#$search");
|
|
|
|
|
}
|
|
|
|
|
foreach ($sample_searches_tags as $sample_search) {
|
|
|
|
|
$sample_searches[] = array("type" => "tag", "text" => "#$sample_search", "search" => "#$sample_search");
|
|
|
|
|
foreach ($sample_searches_tags as $tag) {
|
|
|
|
|
$search = str_replace(" ", "-", $tag);
|
|
|
|
|
$sample_searches[] = array("type" => "tag", "text" => "#$tag", "search" => "#$search");
|
|
|
|
|
}
|
|
|
|
|
foreach ($sample_searches_plain as $sample_search) {
|
|
|
|
|
$sample_searches[] = array("type" => "plain", "text" => $sample_search, "search" => $sample_search);
|
|
|
|
|
foreach ($sample_searches_plain as $text) {
|
|
|
|
|
$sample_searches[] = array("type" => "plain", "text" => $text, "search" => $text);
|
|
|
|
|
}
|
|
|
|
|
foreach ($sample_searches_languages as $sample_search) {
|
|
|
|
|
$sample_searches[] = array("type" => "language", "text" => $sample_search[1], "search" => "lang:" . $sample_search[0]);
|
|
|
|
|
foreach ($sample_searches_languages as $language_array) {
|
|
|
|
|
$sample_searches[] = array("type" => "language", "text" => $language_array[1], "search" => "lang:" . $language_array[0]);
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|