Skip to content

Commit

Permalink
Release 4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andergmartins committed Jan 30, 2025
1 parent 1c6c8d6 commit 239c80b
Show file tree
Hide file tree
Showing 28 changed files with 159 additions and 83 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 4.3.1 - 30 Jan, 2025
## [4.3.2] - 30 Jan, 2025

### Fixed

- Fix typo in the `WorkflowEngine` class.
- Fix reference to deprecated classes and interfaces.
- Fix translation of shortcode settings in the Display settings page.

## [4.3.1] - 30 Jan, 2025

### Added

Expand Down Expand Up @@ -36,7 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Step "Conditional" renamed to "Conditional Delay".
- Changed the default step's slug to reflect the new step name and classes.
- Changed the Schedule Delay step settings to be more intuitive.
- Chagned some text in the workflow editor to be more user friendly.
- Changed some text in the workflow editor to be more user friendly.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion languages/post-expirator-future_backup_panel.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2025-01-30T14:53:36+00:00\n"
"POT-Creation-Date: 2025-01-30T20:47:08+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: post-expirator\n"
Expand Down
2 changes: 1 addition & 1 deletion languages/post-expirator-future_workflow_editor_script.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2025-01-30T14:53:36+00:00\n"
"POT-Creation-Date: 2025-01-30T20:47:07+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: post-expirator\n"
Expand Down
47 changes: 26 additions & 21 deletions languages/post-expirator.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the PublishPress Future plugin.
msgid ""
msgstr ""
"Project-Id-Version: PublishPress Future 4.3.1\n"
"Project-Id-Version: PublishPress Future 4.3.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2025-01-30T14:53:31+00:00\n"
"POT-Creation-Date: 2025-01-30T20:47:03+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: post-expirator\n"
Expand Down Expand Up @@ -981,7 +981,7 @@ msgid "Edit Workflow"
msgstr ""

#: src/Modules/Workflows/Controllers/PostType.php:53
#: src/Modules/Workflows/Models/WorkflowModel.php:455
#: src/Modules/Workflows/Models/WorkflowModel.php:456
msgid "New Workflow"
msgstr ""

Expand Down Expand Up @@ -1093,60 +1093,60 @@ msgstr ""
msgid "Workflow scheduled step"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:199
#: src/Modules/Workflows/Controllers/ScheduledActions.php:200
msgid "Unschedule workflow recurring scheduled step"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:203
#: src/Modules/Workflows/Controllers/ScheduledActions.php:204
msgid "Cleanup orphan workflow scheduled step arguments"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:208
#: src/Modules/Workflows/Controllers/ScheduledActions.php:209
msgid "Clean up completed scheduled steps older than %d days"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:278
#: src/Modules/Workflows/Controllers/ScheduledActions.php:280
msgid "Schedule step is required for this workflow."
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:281
#: src/Modules/Workflows/Controllers/ScheduledActions.php:331
#: src/Modules/Workflows/Controllers/ScheduledActions.php:283
#: src/Modules/Workflows/Controllers/ScheduledActions.php:333
msgid "Workflow:"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:284
#: src/Modules/Workflows/Controllers/ScheduledActions.php:286
msgid "Step:"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:335
#: src/Modules/Workflows/Controllers/ScheduledActions.php:355
#: src/Modules/Workflows/Controllers/ScheduledActions.php:337
#: src/Modules/Workflows/Controllers/ScheduledActions.php:357
msgid "Trigger: "
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:348
#: src/Modules/Workflows/Controllers/ScheduledActions.php:350
msgid "Post:"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:359
#: src/Modules/Workflows/Controllers/ScheduledActions.php:361
msgid "Steps:"
msgstr ""

#: src/Modules/Workflows/Controllers/ScheduledActions.php:365
#: src/Modules/Workflows/Controllers/ScheduledActions.php:368
msgid "Workflow recurring scheduled action"
msgstr ""

#. translators: %1$s: recurrence, %2$s: date
#: src/Modules/Workflows/Controllers/ScheduledActions.php:410
#: src/Modules/Workflows/Controllers/ScheduledActions.php:413
msgid "%1$s until %2$s"
msgstr ""

#. translators: %1$s: recurrence, %2$d: repeat times
#: src/Modules/Workflows/Controllers/ScheduledActions.php:420
#: src/Modules/Workflows/Controllers/ScheduledActions.php:423
msgid "%1$s for %2$d times"
msgstr ""

#. translators: %1$s: executed times, %2$d: total repeat times
#: src/Modules/Workflows/Controllers/ScheduledActions.php:430
#: src/Modules/Workflows/Controllers/ScheduledActions.php:433
msgid "[%1$s/%2$d]"
msgstr ""

Expand Down Expand Up @@ -2315,15 +2315,15 @@ msgid "View Knowledge Base"
msgstr ""

#. translators: %1$s opens a span tag, %2$s is the action name, %3$s ends a span tag, %4$s is the a span tag, %5$s is the a span tag, %6$s is the a span tag
#: src/Views/expire-column.php:69
#: src/Views/expire-column.php:73
msgid "%1$s%2$s%3$s on %5$s%4$s%6$s"
msgstr ""

#: src/Views/expire-column.php:79
#: src/Views/expire-column.php:83
msgid "Overdue action"
msgstr ""

#: src/Views/expire-column.php:111
#: src/Views/expire-column.php:115
msgid "Action was not scheduled due to a configuration issue. Please attempt to schedule it again."
msgstr ""

Expand Down Expand Up @@ -2666,6 +2666,11 @@ msgstr ""
msgid "Shortcode"
msgstr ""

#. translators: %s is a code tag that wraps the shortcode
#: src/Views/menu-display.php:400
msgid "Use the %s[futureaction]%s shortcode to show when the future action will occur. You can add this shortcode anywhere in your post content."
msgstr ""

#: src/Views/menu-display.php:410
msgid "Shortcode Wrapper"
msgstr ""
Expand Down
5 changes: 3 additions & 2 deletions post-expirator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: http://wordpress.org/extend/plugins/post-expirator/
* Description: PublishPress Future allows you to schedule automatic changes to posts, pages and other content types.
* Author: PublishPress
* Version: 4.3.1
* Version: 4.3.2
* Author URI: http://publishpress.com
* Text Domain: post-expirator
* Domain Path: /languages
Expand Down Expand Up @@ -56,7 +56,7 @@
}

if (! defined('PUBLISHPRESS_FUTURE_VERSION')) {
define('PUBLISHPRESS_FUTURE_VERSION', '4.3.1');
define('PUBLISHPRESS_FUTURE_VERSION', '4.3.2');
}

if (! defined('PUBLISHPRESS_FUTURE_PLUGIN_FILE')) {
Expand Down Expand Up @@ -133,6 +133,7 @@ function loadDependencies()
});

add_action('init', function () {
$container = null;
try {
loadDependencies();

Expand Down
14 changes: 11 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requires at least: 6.7
Requires PHP: 7.4
Tested up to: 6.7
License: GPLv2 or later
Stable tag: 4.3.1
Stable tag: 4.3.2

PublishPress Future can make scheduled changes to your content. You can unpublish posts, move posts to a new status, update the categories, and more.

Expand Down Expand Up @@ -173,7 +173,15 @@ Yes, the PublishPress Future plugin allows you to schedule automatic changes to

The full changelog can be found on [GitHub](https://github.com/publishpress/PublishPress-Future/blob/main/CHANGELOG.md).

## 4.3.1 - 30 Jan, 2025
## [4.3.2] - 30 Jan, 2025

### Fixed

- Fix typo in the `WorkflowEngine` class.
- Fix reference to deprecated classes and interfaces.
- Fix translation of shortcode settings in the Display settings page.

## [4.3.1] - 30 Jan, 2025

### Added

Expand Down Expand Up @@ -206,7 +214,7 @@ The full changelog can be found on [GitHub](https://github.com/publishpress/Publ
- Step "Conditional" renamed to "Conditional Delay".
- Changed the default step's slug to reflect the new step name and classes.
- Changed the Schedule Delay step settings to be more intuitive.
- Chagned some text in the workflow editor to be more user friendly.
- Changed some text in the workflow editor to be more user friendly.

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function filterActionSchedulerAdminNotice($html, $action, $notification)
}
}

if ($hook === WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_NODE) {
if ($hook === WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_STEP) {
$html = __('Executed workflow scheduled step', 'post-expirator');
}

Expand Down
15 changes: 9 additions & 6 deletions src/Modules/Workflows/Controllers/ScheduledActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function showTitleInHookColumn($title, $row)
$hook = $actionModel->getHook();

switch ($hook) {
case WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_NODE:
case WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_STEP:
$step = $this->getStepFromActionId($row['ID']);

if (empty($step)) {
Expand All @@ -195,6 +195,7 @@ public function showTitleInHookColumn($title, $row)

break;

case WorkflowsHooksAbstract::ACTION_UNSCHEDULE_RECURRING_STEP_ACTION:
case WorkflowsHooksAbstract::ACTION_UNSCHEDULE_RECURRING_NODE_ACTION:
$title = __('Unschedule workflow recurring scheduled step', 'post-expirator');
break;
Expand Down Expand Up @@ -235,6 +236,7 @@ public function showArgsInArgsColumn($html, $row)

switch ($hook) {
case WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_NODE:
case WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_STEP:
if (ScheduledActionModel::argsAreOnNewFormat((array) $args)) {
$scheduledStepModel = new WorkflowScheduledStepModel();
$scheduledStepModel->loadByActionId($actionId);
Expand Down Expand Up @@ -289,11 +291,11 @@ public function showArgsInArgsColumn($html, $row)

$next = $step['next'] ?? [];

$nodeType = $this->stepTypesModel->getNodeType($step['node']['data']['name']);
$stepType = $this->stepTypesModel->getStepType($step['node']['data']['name']);

$sourceHandles = [];
if (! is_null($nodeType)) {
$handlesSchema = $nodeType->getHandleSchema();
if (! is_null($stepType)) {
$handlesSchema = $stepType->getHandleSchema();

foreach ($handlesSchema['source'] as $handle) {
$sourceHandles[$handle['id']] = $handle['label'];
Expand All @@ -312,7 +314,7 @@ public function showArgsInArgsColumn($html, $row)
}

if (empty($stepLabel)) {
$stepNodeType = $this->stepTypesModel->getNodeType($nextStep['node']['data']['name']);
$stepNodeType = $this->stepTypesModel->getStepType($nextStep['node']['data']['name']);
if (is_object($stepNodeType)) {
$stepLabel = $stepNodeType->getLabel();
}
Expand Down Expand Up @@ -361,6 +363,7 @@ public function showArgsInArgsColumn($html, $row)
$html = $argsText;
break;

case WorkflowsHooksAbstract::ACTION_UNSCHEDULE_RECURRING_STEP_ACTION:
case WorkflowsHooksAbstract::ACTION_UNSCHEDULE_RECURRING_NODE_ACTION:
$html = __('Workflow recurring scheduled action', 'post-expirator');
break;
Expand Down Expand Up @@ -558,7 +561,7 @@ public function storeWorkflowCompactedArgsForStoredAction($actionId)
$actionModel = new ScheduledActionModel();
$actionModel->loadByActionId($actionId);

if ($actionModel->getHook() !== WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_NODE) {
if ($actionModel->getHook() !== WorkflowsHooksAbstract::ACTION_ASYNC_EXECUTE_STEP) {
return;
}

Expand Down
18 changes: 14 additions & 4 deletions src/Modules/Workflows/Domain/Engine/WorkflowEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use PublishPress\Future\Modules\Workflows\Models\WorkflowScheduledStepModel;
use PublishPress\Future\Modules\Workflows\Models\WorkflowsModel;
use PublishPress\Future\Modules\Workflows\Module;
use PublishPress\Future\Modules\Workflows\Interfaces\stepRunnerInterface;
use PublishPress\Future\Modules\Workflows\Interfaces\TriggerRunnerInterface;
use PublishPress\Future\Modules\Workflows\Interfaces\RuntimeVariablesHandlerInterface;
use PublishPress\Future\Modules\Workflows\Interfaces\StepTypesModelInterface;
use PublishPress\Future\Modules\Workflows\Interfaces\WorkflowModelInterface;
Expand Down Expand Up @@ -84,16 +84,26 @@ public function __construct(
$this->hooks->doAction(HooksAbstract::ACTION_WORKFLOW_ENGINE_LOAD);

$this->hooks->addAction(
HooksAbstract::ACTION_EXECUTE_NODE,
HooksAbstract::ACTION_EXECUTE_STEP,
[$this, 'executeStepRoutine']
);

$this->hooks->addAction(
HooksAbstract::ACTION_ASYNC_EXECUTE_NODE,
HooksAbstract::ACTION_ASYNC_EXECUTE_STEP,
[$this, "executeAsyncStepRoutine"],
10
);

$this->hooks->addAction(
HooksAbstract::ACTION_UNSCHEDULE_RECURRING_STEP_ACTION,
[$this, "unscheduleRecurringStepAction"],
10,
2
);

/**
* We are keeping the old constant for compatibility with old actions scheduled by the old constant.
*/
$this->hooks->addAction(
HooksAbstract::ACTION_UNSCHEDULE_RECURRING_NODE_ACTION,
[$this, "unscheduleRecurringStepAction"],
Expand Down Expand Up @@ -180,7 +190,7 @@ public function start()
continue;
}

/** @var stepRunnerInterface $triggerRunner */
/** @var TriggerRunnerInterface $triggerRunner */
$triggerRunner = call_user_func($this->stepRunnerFactory, $triggerName);

if (is_null($triggerRunner)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class AddPostTermRunner implements StepRunnerInterface
{
/**
* @var NodeRunnerProcessorInterface
* @var StepProcessorInterface
*/
private $stepProcessor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class SetPostTermRunner implements StepRunnerInterface
{
/**
* @var Step
* @var StepProcessorInterface
*/
private $stepProcessor;

Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Workflows/Domain/Steps/Processors/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ private function cancelFutureRecurringActions(int $workflowId, string $stepId):
{
$this->cron->scheduleSingleAction(
time() + self::UNSCHEDULE_FUTURE_ACTION_DELAY,
HooksAbstract::ACTION_UNSCHEDULE_RECURRING_NODE_ACTION,
HooksAbstract::ACTION_UNSCHEDULE_RECURRING_STEP_ACTION,
[
'workflowId' => $workflowId,
'stepId' => $stepId,
Expand Down
Loading

0 comments on commit 239c80b

Please sign in to comment.