Use i18n date function in calendar
This commit is contained in:
@@ -123,12 +123,12 @@ class SP_Calendar extends SP_Custom_Post {
|
|||||||
|
|
||||||
if ( $this->date !== 0 ):
|
if ( $this->date !== 0 ):
|
||||||
if ( $this->date == 'w' ):
|
if ( $this->date == 'w' ):
|
||||||
$args['year'] = date('Y');
|
$args['year'] = date_i18n('Y');
|
||||||
$args['w'] = date('W');
|
$args['w'] = date_i18n('W');
|
||||||
elseif ( $this->date == 'day' ):
|
elseif ( $this->date == 'day' ):
|
||||||
$args['year'] = date('Y');
|
$args['year'] = date_i18n('Y');
|
||||||
$args['day'] = date('j');
|
$args['day'] = date_i18n('j');
|
||||||
$args['monthnum'] = date('n');
|
$args['monthnum'] = date_i18n('n');
|
||||||
elseif ( $this->date == 'range' ):
|
elseif ( $this->date == 'range' ):
|
||||||
add_filter( 'posts_where', array( $this, 'range' ) );
|
add_filter( 'posts_where', array( $this, 'range' ) );
|
||||||
endif;
|
endif;
|
||||||
|
|||||||
Reference in New Issue
Block a user