acf_decode_term()
acf_decode_term
Decodes a "taxonomy:slug" string into an array of taxonomy and slug.
Хуков нет.
Возвращает
Строку.
Использование
acf_decode_term( $string );
- $string(обязательный)
- .
Список изменений
| С версии 5.7.4 | Введена. |
Код acf_decode_term() acf decode term ACF 6.4.2
function acf_decode_term( $string ) {
if ( is_string( $string ) && strpos( $string, ':' ) ) {
list( $taxonomy, $slug ) = explode( ':', $string );
return compact( 'taxonomy', 'slug' );
}
return false;
}