You appear to be a bot. Output may be restricted
Description
Taxonomy must not be blank
Usage
oik_diy_validate_taxonomy( $taxonomy );
Parameters
- $taxonomy
- ( string ) required – reference to the required taxonomy name which should be in slug form (must not contain capital letters or spaces) and not more than 32 characters long (database structure restriction)
Returns
voidSource
File name: oik-types/admin/oik-taxonomies.phpLines:
1 to 20 of 20
function oik_diy_validate_taxonomy( &$taxonomy ) { $valid = isset( $taxonomy ); if ( $valid ) { $taxonomy = trim( $taxonomy ); $valid = strlen( $taxonomy ) > 0; $valid &= strlen( $taxonomy ) <= 32; } if ( !$valid ) { p( "Taxonomy must not be blank and not more than 32 characters" ); } else { $sanitized_taxonomy = sanitize_key( $taxonomy ); if ( $sanitized_taxonomy != $taxonomy ) { p( "Taxonomy name should be lower case. e.g. " . strtolower( $sanitized_taxonomy ) ); $valid = false; $taxonomy = $sanitized_taxonomy; } } return $valid; }View on GitHub