-
-
Save pije76/899683b9508b31bd36df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% api %} | |
{% for index, item in api %} | |
{{ item.link | url_to_hyphen | build_permalink_for 2 }} | |
{% endfor%} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function url_to_hyphen ($string) { | |
$string = str_ireplace(array('http://'), '', $string); | |
$string = str_ireplace(array('.', '/', '%20'), ' ', $string); | |
return CoreFilters::hyphenize($string); | |
} | |
h2o::addFilter('url_to_hyphen'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment