wpseek.com
				Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
			_truncate_post_slug is private and should not be used in themes or plugins directly.
_truncate_post_slug › WordPress Function
Seit3.6.0
Veraltetn/v
› _truncate_post_slug ( $slug, $length = 200 )
| Zugriff: | 
 | 
| Parameter: (2) | 
 | 
| Siehe: | |
| Gibt zurück: | 
 | 
| Definiert in: | 
 | 
| Codex: | 
Truncates a post slug.
Ähnliche Funktionen: wp_unique_post_slug, _transition_post_status, wp_count_posts, wp_update_post, get_private_posts_cap_sql
	Quellcode
function _truncate_post_slug( $slug, $length = 200 ) {
	if ( strlen( $slug ) > $length ) {
		$decoded_slug = urldecode( $slug );
		if ( $decoded_slug === $slug ) {
			$slug = substr( $slug, 0, $length );
		} else {
			$slug = utf8_uri_encode( $decoded_slug, $length, true );
		}
	}
	return rtrim( $slug, '-' );
}