Switch language

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




sanitize_trackback_urls [ WordPress Function ]

sanitize_trackback_urls ( $to_ping )
Parameters:
  • (string) $to_ping Space or carriage return separated URLs
Returns:
  • (string) URLs starting with the http or https protocol, separated by a carriage return.
Defined at:



Sanitize space or carriage return separated URLs that are used to send trackbacks.

Source


<?php
function sanitize_trackback_urls$to_ping ) {
    
$urls_to_ping preg_split'/\r\n\t /'trim$to_ping ), -1PREG_SPLIT_NO_EMPTY );
    foreach ( 
$urls_to_ping as $k => $url ) {
        if ( !
preg_match'#^https?://.#i'$url ) )
            unset( 
$urls_to_ping[$k] );
    }
    
$urls_to_ping array_map'esc_url_raw'$urls_to_ping );
    
$urls_to_ping implode"\n"$urls_to_ping );
    return 
apply_filters'sanitize_trackback_urls'$urls_to_ping$to_ping );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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