WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 340 | * |
| 341 | * This can be used to change icons or add custom icons (additionally to variations in the editor). |
| 342 | * Icons should be directly renderable - therefore SVGs work best. |
| 343 | * |
| 344 | * @since 6.9.0 |
| 345 | * |
| 346 | * @param array $services_data The list of services. Each item is an array containing a 'name' and 'icon' key. |
| 347 | * @return array The list of social services. |
| 348 | */ |
| 349 | $services_data = apply_filters( 'block_core_social_link_get_services', $services_data ); |
| 350 | |
| 351 | if ( ! empty( $service ) |
| 352 | && ! empty( $field ) |
| 353 | && isset( $services_data[ $service ] ) |
| 354 | && ( 'icon' === $field || 'name' === $field ) |
| 355 | ) { |
| 356 | return $services_data[ $service ][ $field ]; |
| 357 | } elseif ( ! empty( $service ) && isset( $services_data[ $service ] ) ) { |
| 358 | return $services_data[ $service ]; |