функция
Устаревший since 0.71
the_category_ID()
Устаревшее.
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
the_category_ID( bool $display = true ): int
Описание
См. alsoget_the_category()
Оригинал (английский)
Параметры
$display
bool
необязательный
= true
Выводить ли результат.
Возвращаемое значение
int
Исходный код
wp-includes/deprecated.php:84
function the_category_ID($display = true) {
_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
// Grab the first cat in the list.
$categories = get_the_category();
$cat = $categories[0]->term_id;
if ( $display )
echo $cat;
return $cat;
}
История изменений
| Версия | Описание |
|---|---|
| 0.71 | Introduced. |

