WP untraillingslashit and traillingslashit Function – You misspelled

This is might be a funny post. You probably came here from google search by misspelling. Actually you are looking for reference of untrailingslashit or trailingslashit WordPress function.
You wrote the function name wrong. Every time do this mistake. Always I write untraillingslashit or traillingslashit on google, and google returns no result. Google is unable to do autocorrection of these two words.

—Google shows —

Your search – untraillingslashit – did not match any documents.

Suggestions:

  • Make sure that all words are spelled correctly.
  • Try different keywords.
  • Try more general keywords.

I am writing this post to help myself and you who always write the wrong spelling  of untrailingslashit and trailingslashit functions. Now google may shows this post in search result and I will click on this post to get the correct link of references of WordPress functions untrailingslashit() and trailingslashit().

Some more misspelling

  • untraillingslashhit
  • untriallingslashhit
  • untrialingslashhit
  • untrialingslashit
  • untailingslashit
  • untriallingslashit
  • triallingslashhit
  • trialingslashhit
  • trialingslashit
  • tailingslashit
  • triallingslashit

 

 

See the correct function references below

trailingslashit() Reference

Description

Appends a trailing slash.

Will remove trailing slash if it exists already before adding a trailing slash. This prevents double slashing a string or path.

The primary use of this is for paths and thus should be used for paths. It is not restricted to paths and offers no specific path support.

Usage


<?php trailingslashit( $string ) ?>

 

Parameters

$string
(string) (required) What to add the trailing slash to.

Default: None

Return Values

(string)
String with trailing slash added.

Examples

<?php
$path = trailingslashit( '/home/julien/bin/dotfiles' ); 
?>

 

untrailingslashit() Reference

Description

Removes trailing slash if it exists.

The primary use of this is for paths and thus should be used for paths. It is not restricted to paths and offers no specific path support.

Usage


<?php untrailingslashit( $string ); ?>

 

Parameters

$string
(string) (required) What to remove the trailing slash from.

Default: None

Return Values

(string)
String without the trailing slash.

Examples

<?php
$path = trailingslashit( '/home/julien/bin/dotfiles/' ); 
?>

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.