mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 14:06:23 +05:30
Move function & fix string
This commit is contained in:
parent
fee9418760
commit
18a6bc5cde
2 changed files with 19 additions and 19 deletions
|
|
@ -1269,6 +1269,22 @@ function get_feed($feed_url, $credit)
|
|||
}
|
||||
}
|
||||
|
||||
// return tag safe string
|
||||
function safe_tag($string)
|
||||
{
|
||||
$tags = array();
|
||||
$string = preg_replace('/[\s-]+/', ' ', $string);
|
||||
$string = explode(',', $string);
|
||||
$string = array_map('trim', $string);
|
||||
foreach ($string as $str) {
|
||||
$tags[] = $str;
|
||||
}
|
||||
$string = implode(',', $tags);
|
||||
$string = preg_replace('/[\s_]/', '-', $string);
|
||||
return $string;
|
||||
|
||||
}
|
||||
|
||||
// Create Zip files
|
||||
function Zip($source, $destination, $include_dir = false)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue