Skip to content

Commit

Permalink
Merge pull request #721 from publishpress/release-v2.10.1
Browse files Browse the repository at this point in the history
Release v2.10.1
  • Loading branch information
olatechpro authored Jan 4, 2023
2 parents e43faeb + 929b87f commit f85aebe
Show file tree
Hide file tree
Showing 33 changed files with 3,095 additions and 3,993 deletions.
71 changes: 71 additions & 0 deletions .builder-rsync-filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
- *.code-workspace
- .babelrc
- .builder-rsync-filters
- .distignore
- .env.testing.linux.dist
- .env.testing.mac.dist
- .eslintrc.js
- .git
- .gitattributes
- .github
- .gitignore
- .idea
- .php-cs-fixer.cache
- .phpcs.xml
- .phplint-cache
- .phplint.yml
- .vscode
- .wordpress-org
- /dist
- Gruntfile.js
- README-build.md
- README.md
- RoboFile.php
- bin
- builder
- builder.yml
- builder.yml.dist
- codeception.dist.yml
- cypress
- cypress.json
- jest.config.ts
- jsconfig.json
- mix-manifest.json
- node_modules
- package-lock.json
- package.json
- phpcs.xml
- psalm.xml
- ray-dist.php
- ray.php
- screenshot-*.png
- scripts
- tailwind.config.js
- tests
- vendor/pimple/pimple/.gitignore
- vendor/pimple/pimple/.php_cs.dist
- vendor/psr/container/.gitignore
- vendor/publishpress/wordpress-reviews/phpcs.xml.dist
- vendor/publishpress/wordpress-version-notices/.gitignore
- vendor/publishpress/wordpress-version-notices/README.md
- vendor/publishpress/wordpress-version-notices/bin
- vendor/publishpress/wordpress-version-notices/codeception.dist.yml
- vendor/publishpress/wordpress-version-notices/codeception.yml
- vendor/publishpress/wordpress-version-notices/tests
- webpack.config.js
- webpack.mix.js
- .env.testing
- .env.testing.dist
- CONTRIBUTING.md
- assets_wp
- phpunit.xml
- vendor/bin
- vendor/pimple/pimple/CHANGELOG
- vendor/pimple/pimple/README.rst
- vendor/pimple/pimple/composer.json
- vendor/pimple/pimple/ext
- vendor/pimple/pimple/phpunit.xml.dist
- vendor/pimple/pimple/src/Pimple/Tests
- vendor/psr/container/composer.json
- vendor/symfony/polyfill-ctype/composer.json
- vendor/bin
32 changes: 0 additions & 32 deletions RoboFile.php

This file was deleted.

14 changes: 10 additions & 4 deletions addons/grouping/legacy-includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,18 @@ function to_int(&$val, $key) {
/**
* Shortcode to get the author box
*
* @param array $attributes
* @param array $atts
*
* @return string
*/
function publishpress_series_groups($attributes)
function publishpress_series_groups($atts)
{

return get_series_group_list([], [], false);
$default_atts = array(
'category_ids' => '',
'series_ids' => ''
);

$args = shortcode_atts($default_atts, $atts);

return get_series_group_list($args['category_ids'], $args, false);
}
21 changes: 17 additions & 4 deletions addons/grouping/orgseries-grouping-template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,27 @@ function get_series_group_list( $group_id = array(), $args = array(), $echo = tr
$groups = get_series_groups( $group_id );
$group_out = '';

$limit_series_ids = false;
if (isset($args['series_ids']) && !empty($args['series_ids'])) {
$limit_series_ids = explode(',', $args['series_ids']);
$limit_series_ids = array_map('trim', $limit_series_ids);
}

foreach ( $groups as $group ) {
$group_out .= '<h3 id="group-title-'.$group->term_id.'" class="group-title">'.$group->name.'</h3>';
$group_out .= '<ul id="group-list-'.$group->term_id.'" class="group-list-ul">';
$has_series = false;
$group_html = '<h3 id="group-title-'.$group->term_id.'" class="group-title">'.$group->name.'</h3>';
$group_html .= '<ul id="group-list-'.$group->term_id.'" class="group-list-ul">';
$series_in_group = get_series_in_group($group->term_id, $args );
foreach ( $series_in_group as $series ) {
$group_out .= '<li id="series-'.$series.'" class="series-list-li"><a href="'.get_series_link($series).'" title="'.get_series_name($series).' permalink">'.get_series_name($series).'</a></li>';
if (!$limit_series_ids || ($limit_series_ids && in_array($series, $limit_series_ids))) {
$has_series = true;
$group_html .= '<li id="series-'.$series.'" class="series-list-li"><a href="'.get_series_link($series).'" title="'.get_series_name($series).' permalink">'.get_series_name($series).'</a></li>';
}
}
$group_out .= '</ul>';
$group_html .= '</ul>';
if ($has_series) {
$group_out .= $group_html;
}
}

if ( $echo )
Expand Down
6 changes: 4 additions & 2 deletions addons/publisher/series-part-post-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function get_table_data(){
if ($series_id) {
$arg = array(
'post_status' => 'any',
'post_type' => apply_filters('orgseries_posttype_support', array('post')),
'posts_per_page' => -1,
'no_found_rows' => true,
'tax_query' => array(
Expand Down Expand Up @@ -292,9 +293,10 @@ public function column_post_status( $post ) {
protected function column_part($item)
{
$series_id = isset($_GET['series_ID'])? (int)$_GET['series_ID'] : false;
$series_part = get_post_meta($item->ID, SERIES_PART_KEY, true);
$part_key = apply_filters('orgseries_part_key', SERIES_PART_KEY, $series_id);
$series_part = get_post_meta($item->ID, $part_key, true);

if(empty(trim($series_part))){
if (empty(trim($series_part))) {
$series_part_output = esc_html__('(Currently has no Part number)', 'organize-series');
}else{
$series_part_output = $series_part;
Expand Down
8 changes: 5 additions & 3 deletions addons/publisher/series-publish-post-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function get_table_data(){

$arg = array(
'post_status' => ['future', 'draft', 'pending'],
'post_type' => apply_filters('orgseries_posttype_support', array('post')),
'paged' => $current_page,
'posts_per_page' => $per_page,
'tax_query' => array(
Expand Down Expand Up @@ -325,11 +326,12 @@ protected function column_cb($item)
protected function column_series_part($item)
{
$series_id = isset($_GET['series_ID'])? (int)$_GET['series_ID'] : false;
$series_part = get_post_meta($item->ID, SERIES_PART_KEY, true);
$part_key = apply_filters('orgseries_part_key', SERIES_PART_KEY, $series_ID);
$series_part = get_post_meta($item->ID, $part_key, true);

if(empty(trim($series_part))){
if (empty(trim($series_part))) {
$series_part_output = esc_html__('(Currently has no Part number)', 'organize-series');
}else{
} else {
$series_part_output = $series_part;
}

Expand Down
10 changes: 9 additions & 1 deletion addons/publisher/series_issue_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ function series_issue_manager_part($series_ID, $post_IDs)
$part_key = apply_filters('orgseries_part_key', SERIES_PART_KEY, $series_ID);
delete_post_meta($post_ID, $part_key);
add_post_meta($post_ID, $part_key, '');
//update for single part
delete_post_meta($post_ID, SERIES_PART_KEY);
add_post_meta($post_ID, SERIES_PART_KEY, '');
}

// $post_IDs should have all pending posts' IDs in the series
Expand Down Expand Up @@ -142,6 +145,7 @@ function publisher_wp_set_post_series($post, $update, $post_ID = 0, $series_id =
foreach ($old_series as $o_ser) {
$part_key = apply_filters('orgseries_part_key', SERIES_PART_KEY, $o_ser);
delete_post_meta($post_ID, $part_key);
delete_post_meta($post_ID, SERIES_PART_KEY);
}
}

Expand Down Expand Up @@ -174,14 +178,18 @@ function publisher_wp_set_post_series($post, $update, $post_ID = 0, $series_id =
if ($part) {
$series_part_key = apply_filters('orgseries_part_key', SERIES_PART_KEY, $ser_id);
$s_pt = $part;
//update for multi part
delete_post_meta($post_ID, $series_part_key);
add_post_meta($post_ID, $series_part_key, $s_pt);

//update for single part
delete_post_meta($post_ID, SERIES_PART_KEY);
add_post_meta($post_ID, SERIES_PART_KEY, $s_pt);
} else {

if ($remove_part) {
$series_part_key = apply_filters('orgseries_part_key', SERIES_PART_KEY, $ser_id);
delete_post_meta($post_ID, $series_part_key);
delete_post_meta($post_ID, SERIES_PART_KEY);
} else {
set_series_order($ser_id, $post_ID, $s_pt, true);
}
Expand Down
1 change: 1 addition & 0 deletions builder.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
destination: "/home/username/Dropbox/Tmp-Packages"
128 changes: 128 additions & 0 deletions builder/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
FROM php:7.4-cli

RUN set -ex; \
\
apt-get update; \
apt-get install -y \
libyaml-dev \
g++ \
make \
autoconf \
libzip-dev \
curl \
libcurl4-openssl-dev \
wget \
bash \
coreutils \
git \
openssh-client \
patch \
subversion \
tini \
unzip \
zip \
rsync \
; \
\
mkdir -p /usr/src/php/ext/yaml; \
curl -fsSL https://pecl.php.net/get/yaml | tar xvz -C "/usr/src/php/ext/yaml" --strip 1; \
\
docker-php-ext-configure zip; \
docker-php-ext-install zip gettext yaml; \
apt-get remove -y \
g++ \
make \
autoconf\
; \
\
apt-get purge -y --auto-remove; \
rm -rf /var/lib/apt/lists/*

RUN { \
# https://www.php.net/manual/en/errorfunc.constants.php
# https://github.com/docker-library/wordpress/issues/420#issuecomment-517839670
echo 'error_reporting = E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_RECOVERABLE_ERROR'; \
echo 'display_errors = Off'; \
echo 'display_startup_errors = Off'; \
echo 'log_errors = On'; \
echo 'error_log = /dev/stderr'; \
echo 'log_errors_max_len = 1024'; \
echo 'ignore_repeated_errors = On'; \
echo 'ignore_repeated_source = Off'; \
echo 'html_errors = Off'; \
} > /usr/local/etc/php/conf.d/error-logging.ini

# Install Composer
RUN printf "# composer php cli ini settings\n\
date.timezone=UTC\n\
memory_limit=-1\n\
" > $PHP_INI_DIR/php-cli.ini

ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_HOME /tmp
ENV COMPOSER_VERSION 2.3.7

RUN set -eux ; \
# install https://github.com/mlocati/docker-php-extension-installer
curl \
--silent \
--fail \
--location \
--retry 3 \
--output /usr/local/bin/install-php-extensions \
--url https://github.com/mlocati/docker-php-extension-installer/releases/download/1.2.58/install-php-extensions \
; \
echo 182011b3dca5544a70fdeb587af44ed1760aa9a2ed37d787d0f280a99f92b008e638c37762360cd85583830a097665547849cb2293c4a0ee32c2a36ef7a349e2 /usr/local/bin/install-php-extensions | sha512sum --strict --check ; \
chmod +x /usr/local/bin/install-php-extensions ; \
# install public keys for snapshot and tag validation, see https://composer.github.io/pubkeys.html
curl \
--silent \
--fail \
--location \
--retry 3 \
--output /tmp/keys.dev.pub \
--url https://raw.githubusercontent.com/composer/composer.github.io/e7f28b7200249f8e5bc912b42837d4598c74153a/snapshots.pub \
; \
echo 572b963c4b7512a7de3c71a788772440b1996d918b1d2b5354bf8ba2bb057fadec6f7ac4852f2f8a8c01ab94c18141ce0422aec3619354b057216e0597db5ac2 /tmp/keys.dev.pub | sha512sum --strict --check ; \
curl \
--silent \
--fail \
--location \
--retry 3 \
--output /tmp/keys.tags.pub \
--url https://raw.githubusercontent.com/composer/composer.github.io/e7f28b7200249f8e5bc912b42837d4598c74153a/releases.pub \
; \
echo 47f374b8840dcb0aa7b2327f13d24ab5f6ae9e58aa630af0d62b3d0ea114f4a315c5d97b21dcad3c7ffe2f0a95db2edec267adaba3f4f5a262abebe39aed3a28 /tmp/keys.tags.pub | sha512sum --strict --check ; \
# download installer.php, see https://getcomposer.org/download/
curl \
--silent \
--fail \
--location \
--retry 3 \
--output /tmp/installer.php \
--url https://raw.githubusercontent.com/composer/getcomposer.org/f24b8f860b95b52167f91bbd3e3a7bcafe043038/web/installer \
; \
echo 3137ad86bd990524ba1dedc2038309dfa6b63790d3ca52c28afea65dcc2eaead16fb33e9a72fd2a7a8240afaf26e065939a2d472f3b0eeaa575d1e8648f9bf19 /tmp/installer.php | sha512sum --strict --check ; \
# install composer phar binary
php /tmp/installer.php \
--no-ansi \
--install-dir=/usr/bin \
--filename=composer \
--version=${COMPOSER_VERSION} \
; \
composer --ansi --version --no-interaction ; \
composer diagnose ; \
rm -f /tmp/installer.php ; \
find /tmp -type d -exec chmod -v 1777 {} +

RUN mkdir /app

VOLUME /app

WORKDIR /app

COPY scripts/build.sh /usr/local/bin/ppbuild

RUN chmod +x /usr/local/bin/ppbuild

ENTRYPOINT ["bash"]
Loading

0 comments on commit f85aebe

Please sign in to comment.