Skip to content

Commit

Permalink
Build after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
keesiemeijer committed Jul 1, 2020
2 parents 52ab452 + 2429bc6 commit d62dcc7
Show file tree
Hide file tree
Showing 29 changed files with 9,343 additions and 4,621 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ matrix:
- php: 7.2
env: WP_VERSION=latest WP_MULTISITE=1
- php: 7.2
env: WP_VERSION=5.2 WP_MULTISITE=0 CPTDA_WP_TS_VERSION=version
env: WP_VERSION=5.4 WP_MULTISITE=0 CPTDA_WP_TS_VERSION=version
- php: 7.2
env: WP_VERSION=5.1 WP_MULTISITE=0 CPTDA_WP_TS_VERSION=version
env: WP_VERSION=5.3 WP_MULTISITE=0 CPTDA_WP_TS_VERSION=version
- php: 7.1
env: WP_VERSION=latest WP_MULTISITE=0
- php: 7.0
Expand All @@ -34,7 +34,7 @@ before_script:
if [[ 'trunk' != "$CPTDA_WP_TS_VERSION" ]]; then
bash bin/install-wp-tests.sh wordpress_test root '' --wp-version="$WP_VERSION" --wp-ts-version="$WP_VERSION"
else
bash bin/install-wp-tests.sh wordpress_test root '' --wp-version="$WP_VERSION"
bash bin/install-wp-tests.sh wordpress_test root '' --wp-version=trunk --wp-ts-version=trunk
fi
- |
# Export Composer's global bin dir to PATH, but not on PHP 5.2:
Expand All @@ -56,8 +56,8 @@ before_script:
travis_retry composer global require "phpunit/phpunit:^6"
;;
5.6)
echo "Using PHPUnit 4.x"
travis_retry composer global require "phpunit/phpunit:^4"
echo "Using PHPUnit 5.x"
travis_retry composer global require "phpunit/phpunit:^5"
;;
*)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
Expand Down
13,365 changes: 9,020 additions & 4,345 deletions blocks/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions blocks/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "custom-post-type-date-archives-blocks",
"version": "2.7.0",
"version": "2.7.1",
"license": "GPL-2.0-or-later",
"devDependencies": {
"@wordpress/components": "^8.4.0",
"@wordpress/scripts": "^6.0.0"
"@wordpress/components": "^9.9.0",
"@wordpress/scripts": "^12.0.0"
},
"scripts": {
"test": "wp-scripts test-unit-js",
Expand Down
4 changes: 2 additions & 2 deletions custom-post-type-date-archives.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Custom Post Type Date Archives
Version: 2.7.0
Version: 2.7.1
Plugin URI: https://wordpress.org/plugins/custom-post-type-date-archives
Description: This plugin allows you to add date archives to custom post types. It also adds extra options to the archive, calendar and recent posts widget.
Author: keesiemijer
Expand Down Expand Up @@ -149,7 +149,7 @@ private function setup_constants() {

// Plugin version
if ( ! defined( 'CPT_DATE_ARCHIVES_VERSION' ) ) {
define( 'CPT_DATE_ARCHIVES_VERSION', '2.7.0' );
define( 'CPT_DATE_ARCHIVES_VERSION', '2.7.1' );
}

// Plugin Folder Path
Expand Down
2 changes: 1 addition & 1 deletion includes/assets/js/blocks/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '80191f35a26451205e2636f257842a63');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '90520892527bc6f354a12d5a744d8bca');
2 changes: 1 addition & 1 deletion includes/assets/js/blocks/index.js

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions includes/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ function cptda_get_calendar( $post_type, $initial = true, $echo = true ) {
$thismonth = zeroise( absint( $calendar['month'] ), 2 );
$last_day = $calendar['last_day'];

/* translators: Calendar caption: 1: month name, 2: 4-digit year */
/* translators: Calendar caption: 1: Month name, 2: 4-digit year. */
$calendar_caption = _x( '%1$s %2$s', 'calendar caption' );
$output = '<table id="wp-calendar">
$output = '<table id="wp-calendar" class="wp-calendar-table">
<caption>' . sprintf(
$calendar_caption,
$wp_locale->get_month( $thismonth ),
date( 'Y', $calendar['unixmonth'] )
gmdate( 'Y', $calendar['unixmonth'] )
) . '</caption>
<thead>
<tr>';
Expand All @@ -165,32 +165,6 @@ function cptda_get_calendar( $post_type, $initial = true, $echo = true ) {
$output .= '
</tr>
</thead>
<tfoot>
<tr>';

if ( $prev_year && $prev_month ) {
$output .= "\n\t\t" . '<td colspan="3" id="prev"><a href="' . cptda_get_month_archive_link( $prev_year, $prev_month, $post_type ) . '">&laquo; ' .
$wp_locale->get_month_abbrev( $wp_locale->get_month( $prev_month ) ) .
'</a></td>';
} else {
$output .= "\n\t\t" . '<td colspan="3" id="prev" class="pad">&nbsp;</td>';
}

$output .= "\n\t\t" . '<td class="pad">&nbsp;</td>';

if ( $next_year && $next_month ) {
$output .= "\n\t\t" . '<td colspan="3" id="next"><a href="' . cptda_get_month_archive_link( $next_year, $next_month, $post_type ) . '">' .
$wp_locale->get_month_abbrev( $wp_locale->get_month( $next_month ) ) .
' &raquo;</a></td>';
} else {
$output .= "\n\t\t" . '<td colspan="3" id="next" class="pad">&nbsp;</td>';
}

$output .= '
</tr>
</tfoot>
<tbody>
<tr>';

Expand Down Expand Up @@ -220,7 +194,7 @@ function cptda_get_calendar( $post_type, $initial = true, $echo = true ) {
}

$newrow = false;
$daysinmonth = (int) date( 't', $calendar['unixmonth'] );
$daysinmonth = (int) gmdate( 't', $calendar['unixmonth'] );

for ( $day = 1; $day <= $daysinmonth; ++$day ) {
if ( isset( $newrow ) && $newrow ) {
Expand Down Expand Up @@ -260,7 +234,33 @@ function cptda_get_calendar( $post_type, $initial = true, $echo = true ) {
if ( $pad != 0 && $pad != 7 ) {
$output .= "\n\t\t" . '<td class="pad" colspan="' . esc_attr( $pad ) . '">&nbsp;</td>';
}
$output .= "\n\t</tr>\n\t</tbody>\n\t</table>";

$output .= "\n\t</tr>\n\t</tbody>";
$output .= "\n\t</table>";

$output .= '<nav aria-label="' . __( 'Previous and next months' ) . '" class="wp-calendar-nav">';

if ( $prev_year && $prev_month ) {
$output .= "\n\t\t" . '<span class="wp-calendar-nav-prev"><a href="' . cptda_get_month_archive_link( $prev_year, $prev_month, $post_type ) . '">&laquo; ' .
$wp_locale->get_month_abbrev( $wp_locale->get_month( $prev_month ) ) .
'</a></span>';
} else {
$output .= "\n\t\t" . '<span class="wp-calendar-nav-prev">&nbsp;</span>';
}

$output .= "\n\t\t" . '<span class="pad">&nbsp;</span>';

if ( $next_year && $next_month ) {
$output .= "\n\t\t" . '<span class="wp-calendar-nav-next"><a href="' . cptda_get_month_archive_link( $next_year, $next_month, $post_type ) . '">' .
$wp_locale->get_month_abbrev( $wp_locale->get_month( $next_month ) ) .
' &raquo;</a></span>';
} else {
$output .= "\n\t\t" . '<span class="wp-calendar-nav-next">&nbsp;</span>';
}

$output .= '
</nav>';


$cache[ $key ] = $output;
wp_cache_set( 'cptda_get_calendar', $cache, 'calendar' );
Expand Down
18 changes: 11 additions & 7 deletions languages/custom-post-type-date-archives.pot
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (C) 2019 keesiemijer
# Copyright (C) 2020 keesiemijer
# This file is distributed under the GPL v2.
msgid ""
msgstr ""
"Project-Id-Version: Custom Post Type Date Archives 2.7.0\n"
"Project-Id-Version: Custom Post Type Date Archives 2.7.1\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/custom-post-type-date-archives\n"
"POT-Creation-Date: 2019-12-06 16:32:31+00:00\n"
"POT-Creation-Date: 2020-07-01 15:47:07+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: en\n"
Expand Down Expand Up @@ -57,10 +57,14 @@ msgstr ""
msgid "%1$s %2$d"
msgstr ""

#: includes/calendar.php:242
#: includes/calendar.php:216
msgid "Posts published on %s"
msgstr ""

#: includes/calendar.php:241
msgid "Previous and next months"
msgstr ""

#: includes/partials/admin-form.php:14
msgid "Date archives"
msgstr ""
Expand Down Expand Up @@ -419,12 +423,12 @@ msgid "https://keesiemeijer.wordpress.com"
msgstr ""

#: includes/calendar.php:143
#. translators: Calendar caption: 1: month name, 2: 4-digit year
#. translators: Calendar caption: 1: Month name, 2: 4-digit year.
msgctxt "calendar caption"
msgid "%1$s %2$s"
msgstr ""

#: includes/calendar.php:241
#: includes/calendar.php:215
msgctxt "daily archives date format"
msgid "F j, Y"
msgstr ""
Loading

0 comments on commit d62dcc7

Please sign in to comment.