I've implemented a stop-gap function that mimics what I believe this function is supposed to be doing, but I would like to use the native libs/functions where possible.
<?php phpinfo(); require_once("/data/[ignore]/[me]/wordpress-4.7.5/wp-includes/formatting.php"); require_once("/data/[ignore]/[me]/wordpress-4.7.5//wordpress-4.7.5/wp-includes/plugin.php"); $unsanitized_string = '123 qwe ASD'; $sanitized_string = sanitize_title($unsanitized_string); echo $sanitized_string; ?>
From the documentation here I would expect the code above to return something like:
rather, it returns:
123 qwe ASD
Also, from the code enter link description here, I see that it is doing something with filters. I'm wondering if it's something about the filters that I am neglecting to consider.
sanitize_title() has been around since version 1.0 or so, I find it unlikely that something so seemingly integral would be broken. Any thoughts?
I'm relatively new to PHP and WordPress, so I'm sure you all are going to have some questions as to what my environment looks like. Rather than just dumping all of
phpinfo() into this post (seems insecure), let know me if you need to see any settings and I'll provide.
PHP Version => 7.0.19-1+deb.sury.org~xenial+2