sanitize_title [ WordPress Function ]
sanitize_title ( $title, $fallback_title = '', $context = 'save' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: sanitize_term, sanitize_key, sanitize_url, sanitize_option, sanitize_file_name
Sanitizes title or use fallback title.
Specifically, HTML and PHP tags are stripped. Further actions can be added via the plugin API. If $title is empty and $fallback_title is set, the latter will be used.
Source
<?php
function sanitize_title($title, $fallback_title = '', $context = 'save') {
$raw_title = $title;
if ( 'save' == $context )
$title = remove_accents($title);
$title = apply_filters('sanitize_title', $title, $raw_title, $context);
if ( '' === $title || false === $title )
$title = $fallback_title;
return $title;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/sanitize title « WordPress Codex
Description. Sanitizes title or use fallback title. Specifically, HTML and PHP tags are stripped. Further actions can be added via the plugin API. If $title is empty ...
codex.wordpress.org - php /** * Main WordPress Formatting API. - WordPress SVN
@param string $context Optional. The operation for which the string is sanitized * @return string The sanitized string. */ function sanitize_title($title, $fallback_title ...
core.svn.wordpress.org - sanitize_title Wordpress hook details -- Adam Brown, BYU Political ...
Applied to a post title by the sanitize_title function, after stripping out HTML tags. This description was scraped automatically from the WordPress filter reference ...
adambrown.info - Issue #164: Remove sanitize_title · rg3/youtube-dl · GitHub
Sep 15, 2011 ... Currently, each extractor calls sanitize_title in it's own and even makes up its own stitle. We should do both steps in process_info for all ...
github.com