Plugin Directory

Changeset 3232453


Ignore:
Timestamp:
01/31/2025 07:39:36 AM (14 months ago)
Author:
Tarosky
Message:

Update to version 1.2.6 from GitHub

Location:
taro-clockwork-post
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • taro-clockwork-post/tags/1.2.6/includes/meta-box.php

    r3111435 r3232453  
    1717            $date_time = get_post_meta( $post->ID, '_tscp_expires', true );
    1818            if ( ! $date_time ) {
    19                 $now = new DateTime();
    20                 $now->add( new DateInterval( sprintf( 'P1MT%sH', get_option( 'gmt_offset' ) ) ) );
     19                $now = new DateTime( 'now', wp_timezone() );
     20                $now->add( new DateInterval( 'P1M' ) );
    2121                $one_month_later = $now->format( 'Y-m-d H:i:s' );
    2222                $date_time       = apply_filters( 'tspc_default_expires', $one_month_later, $post );
     
    3838                    $month_input = '<select name="tscp-month" class="tscp-month">';
    3939                    for ( $i = 1; $i <= 12; $i++ ) {
    40                         $month_str = mysql2date( 'M', str_replace( '-00-', sprintf( '-%02d-', $i ), date_i18n( 'Y-00-d' ) ) );
     40                        $month_str = mysql2date( 'M', date_i18n( 'Y-' . sprintf( '%02d', $i ) . '-01' ) );
    4141                        // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
    42                         $month_input .= sprintf( '<option value="%02d" %s>%s</option>', $i, selected( $i, $month, false ), $month_str );
     42                        $month_input .= sprintf( '<option value="%02d" %s>%s</option>', $i, selected( $i, (int) $month, false ), $month_str );
    4343                    }
    4444                    $month_input .= '</select>';
  • taro-clockwork-post/tags/1.2.6/readme.txt

    r3207473 r3232453  
    77Requires PHP: 7.2 
    88Tested up to: 6.7 
    9 Stable tag: 1.2.5
     9Stable tag: 1.2.6
    1010License: GPLv3 or later 
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.txt 
     
    6868== Changelog ==
    6969
     70= 1.2.6 =
     71
     72* Fix month string error in Clasic editor's meta box. This happened on Any 31st day in a month.
     73
    7074= 1.2.2 =
    7175
  • taro-clockwork-post/tags/1.2.6/taro-clockwork-post.php

    r3207473 r3232453  
    55Description: You can expire post with specified date.
    66Author: TAROSKY INC. <mng_wpcom@tarosky.co.jp>
    7 Version: 1.2.5
     7Version: 1.2.6
    88Author URI: https://tarosky.co.jp
    99Text Domain: tscp
  • taro-clockwork-post/trunk/includes/meta-box.php

    r3111435 r3232453  
    1717            $date_time = get_post_meta( $post->ID, '_tscp_expires', true );
    1818            if ( ! $date_time ) {
    19                 $now = new DateTime();
    20                 $now->add( new DateInterval( sprintf( 'P1MT%sH', get_option( 'gmt_offset' ) ) ) );
     19                $now = new DateTime( 'now', wp_timezone() );
     20                $now->add( new DateInterval( 'P1M' ) );
    2121                $one_month_later = $now->format( 'Y-m-d H:i:s' );
    2222                $date_time       = apply_filters( 'tspc_default_expires', $one_month_later, $post );
     
    3838                    $month_input = '<select name="tscp-month" class="tscp-month">';
    3939                    for ( $i = 1; $i <= 12; $i++ ) {
    40                         $month_str = mysql2date( 'M', str_replace( '-00-', sprintf( '-%02d-', $i ), date_i18n( 'Y-00-d' ) ) );
     40                        $month_str = mysql2date( 'M', date_i18n( 'Y-' . sprintf( '%02d', $i ) . '-01' ) );
    4141                        // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
    42                         $month_input .= sprintf( '<option value="%02d" %s>%s</option>', $i, selected( $i, $month, false ), $month_str );
     42                        $month_input .= sprintf( '<option value="%02d" %s>%s</option>', $i, selected( $i, (int) $month, false ), $month_str );
    4343                    }
    4444                    $month_input .= '</select>';
  • taro-clockwork-post/trunk/readme.txt

    r3207473 r3232453  
    77Requires PHP: 7.2 
    88Tested up to: 6.7 
    9 Stable tag: 1.2.5
     9Stable tag: 1.2.6
    1010License: GPLv3 or later 
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.txt 
     
    6868== Changelog ==
    6969
     70= 1.2.6 =
     71
     72* Fix month string error in Clasic editor's meta box. This happened on Any 31st day in a month.
     73
    7074= 1.2.2 =
    7175
  • taro-clockwork-post/trunk/taro-clockwork-post.php

    r3207473 r3232453  
    55Description: You can expire post with specified date.
    66Author: TAROSKY INC. <mng_wpcom@tarosky.co.jp>
    7 Version: 1.2.5
     7Version: 1.2.6
    88Author URI: https://tarosky.co.jp
    99Text Domain: tscp
Note: See TracChangeset for help on using the changeset viewer.