block_core_social_link_get_services │ filter-hook │ 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.

Usage

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(array)
The list of services. Each item is an array containing a 'name' and 'icon' key.

Changelog

Since 6.9.0 Introduced.

Where the hook is called

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 );

Where the hook is used in WordPress

Usage not found.