Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




clean_url [ WordPress Function ]

clean_url ( $url, $protocols = null, $context = 'display' )
Parameters:
  • (string) $url The URL to be cleaned.
  • (array) $protocols Optional. An array of acceptable protocols.
  • (string) $context Optional. How the URL will be used. Default is 'display'.
See:
  • Alias
Returns:
  • (string) The cleaned $url after the 'clean_url' filter is applied.
Defined at:



Checks and cleans a URL.

A number of characters are removed from the URL. If the URL is for displaying (the default behaviour) ampersands are also replaced. The 'clean_url' filter is applied to the returned cleaned URL.

Source


<?php
function clean_url$url$protocols null$context 'display' ) {
    if ( 
$context == 'db' )
        
_deprecated_function'clean_url( $context = \'db\' )''3.0''esc_url_raw()' );
    else
        
_deprecated_function__FUNCTION__'3.0''esc_url()' );
    return 
esc_url$url$protocols$context );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics