pretty url stage 6

This commit is contained in:
iBNu Maksum
2025-02-05 14:13:21 +07:00
parent 2469aa6b99
commit 05aa1499ab
43 changed files with 639 additions and 536 deletions

View File

@ -110,6 +110,12 @@ class Text
return $result;
}
/**
* ...$data means it can take any number of arguments.
* it can url($var1, $var2, $var3) or url($var1)
* and variable will be merge with implode
* @return string the URL with all the arguments combined.
*/
public static function url(...$data){
global $config;
$url = implode("", $data);
@ -125,4 +131,14 @@ class Text
return U . $url;
}
}
// this will return & or ?
public static function isQA(){
global $config;
if ($config['url_canonical'] == 'yes') {
return '?';
} else {
return '&';
}
}
}