(FILTER_NAME)
Filter data sources.
Использование
add_filter( '(FILTER_NAME)', 'wp_kama_FILTER_NAME_filter', 10, 2 );
/**
* Function for `(FILTER_NAME)` filter-hook.
*
* @param array $data_sources List of data sources.
* @param string $id Spec identifier.
*
* @return array
*/
function wp_kama_FILTER_NAME_filter( $data_sources, $id ){
// filter...
return $data_sources;
}
- $data_sources(массив)
- List of data sources.
- $id(строка)
- Spec identifier.
Список изменений
| С версии 8.8.0 | Введена. |
Где вызывается хук
(FILTER_NAME)
woocommerce/src/Admin/RemoteSpecs/DataSourcePoller.php 168
$data_sources = apply_filters( self::FILTER_NAME, $this->data_sources, $this->id );