admin_footer_textхук-фильтрWP 2.8.0

Позволяет изменить html блок с текстом "Спасибо вам за творчество с WordPress", отображаемый в админке внизу слева.

Содержимое, которое передаётся в фильтр по умолчанию для RU установки:

<span id="footer-thankyou">
	Спасибо вам за творчество с <a href="https://ru.wordpress.org/">WordPress</a>.
</span>

Использование

add_filter( 'admin_footer_text', 'wp_kama_admin_footer_text_filter' );

/**
 * Function for `admin_footer_text` filter-hook.
 * 
 * @param string $text The content that will be printed.
 *
 * @return string
 */
function wp_kama_admin_footer_text_filter( $text ){

	// filter...
	return $text;
}
$text(строка)
Содержимое, которое будет выведено на экран.

Примеры

1

#1 Изменим блок

add_filter( 'admin_footer_text', 'admin_footer_copyright' );

function admin_footer_copyright() {
	return '<span class="footer-copyright">Сайт разработан компанией "Рога и копыта".</span>';
}
0

#2 Уберем блок с благодарностью

add_filter( 'admin_footer_text', '__return_empty_string' );

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

В файле: /wp-admin/admin-footer.php
admin_footer_text
wp-admin/admin-footer.php 48
echo apply_filters( 'admin_footer_text', '<span id="footer-thankyou">' . $text . '</span>' );

Где используется хук в WordPress

Использование не найдено.