date_i18n
The WordPress Core date i18n hook.
Description
Parameters (1)
- 0. $wp_maybe_decline_date (string) =>
'wp_maybe_decline_date'
- The
wp
maybe decline date.
Usage
- To run the hook, copy the example below.
- $wp_maybe_decline_date = apply_filters( 'date_i18n', $wp_maybe_decline_date );
- if ( !empty( $wp_maybe_decline_date ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the date_i18n callback
- function filter_date_i18n( $wp_maybe_decline_date ) {
- // make filter magic happen here...
- return $wp_maybe_decline_date;
- };
- // add the filter
- add_filter( 'date_i18n', 'filter_date_i18n', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'date_i18n', 'filter_date_i18n', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/default-filters.php
- add_filter( 'date_i18n', 'wp_maybe_decline_date' );