date_i18n

The WordPress Core date i18n hook.

Description

add_filter( 'date_i18n', (string) $wp_maybe_decline_date ); 

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.
  1. $wp_maybe_decline_date = apply_filters( 'date_i18n', $wp_maybe_decline_date ); 
  2.  
  3. if ( !empty( $wp_maybe_decline_date ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the date_i18n callback 
  2. function filter_date_i18n( $wp_maybe_decline_date ) { 
  3. // make filter magic happen here... 
  4. return $wp_maybe_decline_date
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'date_i18n', 'filter_date_i18n', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'date_i18n', 'filter_date_i18n', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/wp-includes/default-filters.php  
  1. add_filter( 'date_i18n', 'wp_maybe_decline_date' ); 
/wp-includes/functions.php  
  1. $j = apply_filters( 'date_i18n', $j, $req_format, $i, $gmt );