Switch language

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




sanitize_key [ WordPress Function ]

sanitize_key ( $key )
Parameters:
  • (string) $key String key
Returns:
  • (string) Sanitized key
Defined at:



Sanitize a string key.

Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes and underscores are allowed.

Source


<?php
function sanitize_key$key ) {
    
$raw_key $key;
    
$key strtolower$key );
    
$key preg_replace'/[^a-z0-9_\-]/'''$key );
    return 
apply_filters'sanitize_key'$key$raw_key );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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