getarchives_where
Filters the SQL WHERE clause for retrieving archives.
Использование
add_filter( 'getarchives_where', 'wp_kama_getarchives_where_filter', 10, 2 ); /** * Function for `getarchives_where` filter-hook. * * @param string $sql_where Portion of SQL query containing the WHERE clause. * @param array $parsed_args An array of default arguments. * * @return string */ function wp_kama_getarchives_where_filter( $sql_where, $parsed_args ){ // filter... return $sql_where; }
- $sql_where(строка)
- Portion of SQL query containing the WHERE clause.
- $parsed_args(массив)
- An array of default arguments.
Список изменений
С версии 2.2.0 | Введена. |
Где вызывается хук
wp-includes/general-template.php 2037
$where = apply_filters( 'getarchives_where', $sql_where, $parsed_args );