ap_remove_stop_words_post_name( string $str )
Description #
Remove stop words from post name if option is enabled.
Parameters #
- $strstring (Required) Post name to filter.
Source #
File: includes/functions.php
function ap_remove_stop_words_post_name( $str ) {
$str = sanitize_title( $str );
if ( ap_opt( 'keep_stop_words' ) ) {
return $str;
}
$post_name = ap_remove_stop_words( $str );
// Check if post name is not empty.
if ( ! empty( $post_name ) ) {
return $post_name;
}
// If empty then return original without stripping stop words.
return sanitize_title( $str );
}
Expand full source code Collapse full source code View on GitHub: includes/functions.php:2109
Add your comment