block_core_social_link_get_services хук-фильтрWP 6.9.0

Filter the list of available social service.

This can be used to change icons or add custom icons (additionally to variations in the editor). Icons should be directly renderable - therefore SVGs work best.

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

add_filter( 'block_core_social_link_get_services', 'wp_kama_block_core_social_link_get_services_filter' );

/**
 * Function for `block_core_social_link_get_services` filter-hook.
 * 
 * @param array $services_data The list of services. Each item is an array containing a 'name' and 'icon' key.
 *
 * @return array
 */
function wp_kama_block_core_social_link_get_services_filter( $services_data ){

	// filter...
	return $services_data;
}
$services_data(массив)
The list of services. Each item is an array containing a 'name' and 'icon' key.

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

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

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

block_core_social_link_services()
block_core_social_link_get_services
wp-includes/blocks/social-link.php 349
$services_data = apply_filters( 'block_core_social_link_get_services', $services_data );

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

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