From c7c0e4740460cc91753848048d248f9c14aa5749 Mon Sep 17 00:00:00 2001 From: Mohammad Jangda Date: Mon, 25 Nov 2019 00:01:15 -0500 Subject: [PATCH] Prepare 0.9.2 --- README.md | 7 + blocks/dist/custom-status.build.js | 241 +---------------------------- edit_flow.php | 4 +- readme.txt | 10 +- 4 files changed, 18 insertions(+), 244 deletions(-) diff --git a/README.md b/README.md index f48a8cab8..ddb87b31c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,9 @@ For support questions, feedback and ideas, please use the [WordPress.org forums] ## Upgrade Notice +**0.9.2** +Fixes issues with scheduling and trashing posts in block editor. + **0.9.1** Bump PHP minimum to 5.6 to match WordPress core. Plus, various bug fixes. @@ -109,6 +112,10 @@ New features, including story budget and editorial metadata, a completely rewrit ## Changelog +**0.9.1 (November 24, 2019)** +* Bug fix: Prevent issues with scheduling and trashing posts when using the block editor (https://github.com/Automattic/Edit-Flow/pull/556 -- props cojennin, davisshaver, batmoo) + + **0.9.1 (November 4, 2019)** * Bug fix: Prevent custom status from being reverted when using Gutenberg (https://github.com/Automattic/Edit-Flow/pull/521 -- props mikeyarce, batmoo) * Bug fix: Don't break post previews when using custom statuses (https://github.com/Automattic/Edit-Flow/pull/515 -- props diff --git a/blocks/dist/custom-status.build.js b/blocks/dist/custom-status.build.js index 570aabed5..c1ff8b453 100644 --- a/blocks/dist/custom-status.build.js +++ b/blocks/dist/custom-status.build.js @@ -1,241 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./blocks/src/custom-status/block.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./blocks/src/custom-status/block.js": -/*!*******************************************!*\ - !*** ./blocks/src/custom-status/block.js ***! - \*******************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editor.scss */ "./blocks/src/custom-status/editor.scss"); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_scss__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./blocks/src/custom-status/style.scss"); -/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_1__); - - -var __ = wp.i18n.__; -var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo; -var registerPlugin = wp.plugins.registerPlugin; -var _wp$data = wp.data, - subscribe = _wp$data.subscribe, - dispatch = _wp$data.dispatch, - select = _wp$data.select, - withSelect = _wp$data.withSelect, - withDispatch = _wp$data.withDispatch; -var compose = wp.compose.compose; -var SelectControl = wp.components.SelectControl; -/** - * Map Custom Statuses as options for SelectControl - */ - -var statuses = window.EditFlowCustomStatuses.map(function (s) { - return { - label: s.name, - value: s.slug - }; -}); -/** - * Hack :( - * - * @see https://github.com/WordPress/gutenberg/issues/3144 - * - * Gutenberg overrides the label of the Save button after save (i.e. "Save Draft"). But there's no way to subscribe to a "post save" message. - * - * So instead, we're keeping the button label generic ("Save"). There's a brief period where it still flips to "Save Draft" but that's something we need to work upstream to find a good fix for. - */ - -var sideEffectL10nManipulation = function sideEffectL10nManipulation() { - var node = document.querySelector('.editor-post-save-draft'); - - if (node) { - document.querySelector('.editor-post-save-draft').innerText = "".concat(__('Save')); - } -}; // Set the status to the default custom status. - - -subscribe(function () { - var postId = select('core/editor').getCurrentPostId(); // Post isn't ready yet so don't do anything. - - if (!postId) { - return; - } // For new posts, we need to force the our default custom status. - // Otherwise WordPress will force it to "Draft". - - - var isCleanNewPost = select('core/editor').isCleanNewPost(); - - if (isCleanNewPost) { - dispatch('core/editor').editPost({ - status: ef_default_custom_status - }); - return; - } // Update the "Save" button. - - - var status = select('core/editor').getEditedPostAttribute('status'); - - if (typeof status !== 'undefined' && status !== 'publish') { - sideEffectL10nManipulation(); - } -}); -/** - * Custom status component - * @param object props - */ - -var EditFlowCustomPostStati = function EditFlowCustomPostStati(_ref) { - var onUpdate = _ref.onUpdate, - status = _ref.status; - return wp.element.createElement(PluginPostStatusInfo, { - className: "edit-flow-extended-post-status edit-flow-extended-post-status-".concat(status) - }, wp.element.createElement("h4", null, status !== 'publish' ? __('Extended Post Status', 'edit-flow') : __('Extended Post Status Disabled.', 'edit-flow')), status !== 'publish' ? wp.element.createElement(SelectControl, { - label: "", - value: status, - options: statuses, - onChange: onUpdate - }) : null, wp.element.createElement("small", { - className: "edit-flow-extended-post-status-note" - }, status !== 'publish' ? __("Note: this will override all status settings above.", 'edit-flow') : __('To select a custom status, please unpublish the content first.', 'edit-flow'))); -}; - -var mapSelectToProps = function mapSelectToProps(select) { - return { - status: select('core/editor').getEditedPostAttribute('status') - }; -}; - -var mapDispatchToProps = function mapDispatchToProps(dispatch) { - return { - onUpdate: function onUpdate(status) { - dispatch('core/editor').editPost({ - status: status - }); - sideEffectL10nManipulation(); - } - }; -}; - -var plugin = compose(withSelect(mapSelectToProps), withDispatch(mapDispatchToProps))(EditFlowCustomPostStati); -/** - * Kick it off - */ - -registerPlugin('edit-flow-custom-status', { - icon: 'edit-flow', - render: plugin -}); - -/***/ }), - -/***/ "./blocks/src/custom-status/editor.scss": -/*!**********************************************!*\ - !*** ./blocks/src/custom-status/editor.scss ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), - -/***/ "./blocks/src/custom-status/style.scss": -/*!*********************************************!*\ - !*** ./blocks/src/custom-status/style.scss ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }) - -/******/ }); +!function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=1)}([,function(t,e,o){"use strict";o.r(e);o(5),o(6);var n=wp.i18n.__,r=wp.editPost.PluginPostStatusInfo,s=wp.plugins.registerPlugin,u=wp.data,i=u.subscribe,l=u.dispatch,a=u.select,c=u.withSelect,d=u.withDispatch,f=wp.compose.compose,p=wp.components.SelectControl,m=window.EditFlowCustomStatuses.map(function(t){return{label:t.name,value:t.slug}}),b=function(){document.querySelector(".editor-post-save-draft")&&(document.querySelector(".editor-post-save-draft").innerText="".concat(n("Save")))};i(function(){if(a("core/editor").getCurrentPostId())if(a("core/editor").isCleanNewPost())l("core/editor").editPost({status:ef_default_custom_status});else{var t=a("core/editor").getEditedPostAttribute("status");void 0!==t&&"publish"!==t&&b()}});s("edit-flow-custom-status",{icon:"edit-flow",render:f(c(function(t){return{status:t("core/editor").getEditedPostAttribute("status")}}),d(function(t){return{onUpdate:function(e){t("core/editor").editPost({status:e}),b()}}}))(function(t){var e=t.onUpdate,o=t.status;return wp.element.createElement(r,{className:"edit-flow-extended-post-status edit-flow-extended-post-status-".concat(o)},wp.element.createElement("h4",null,n("publish"!==o?"Extended Post Status":"Extended Post Status Disabled.","edit-flow")),"publish"!==o?wp.element.createElement(p,{label:"",value:o,options:m,onChange:e}):null,wp.element.createElement("small",{className:"edit-flow-extended-post-status-note"},n("publish"!==o?"Note: this will override all status settings above.":"To select a custom status, please unpublish the content first.","edit-flow")))})})},,,,function(t,e){},function(t,e){}]); //# sourceMappingURL=custom-status.build.js.map \ No newline at end of file diff --git a/edit_flow.php b/edit_flow.php index 0fb3fa09a..723665429 100644 --- a/edit_flow.php +++ b/edit_flow.php @@ -4,7 +4,7 @@ Plugin URI: http://editflow.org/ Description: Remixing the WordPress admin for better editorial workflow options. Author: Daniel Bachhuber, Scott Bressler, Mohammad Jangda, Automattic, and others -Version: 0.9.1 +Version: 0.9.2 Author URI: http://editflow.org/ Copyright 2009-2019 Mohammad Jangda, Daniel Bachhuber, Automattic, et al. @@ -46,7 +46,7 @@ function _ef_print_php_version_admin_notice() { } // Define contants -define( 'EDIT_FLOW_VERSION' , '0.9.1' ); +define( 'EDIT_FLOW_VERSION' , '0.9.2' ); define( 'EDIT_FLOW_ROOT' , dirname(__FILE__) ); define( 'EDIT_FLOW_FILE_PATH' , EDIT_FLOW_ROOT . '/' . basename(__FILE__) ); define( 'EDIT_FLOW_URL' , plugins_url( '/', __FILE__ ) ); diff --git a/readme.txt b/readme.txt index 8f2fe0884..3e21456b4 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: edit flow, workflow, editorial, newsroom, management, journalism, post sta Requires at least: 5.1 Requires PHP: 5.6 Tested up to: 5.3 -Stable tag: 0.9.1 +Stable tag: 0.9.2 Redefining your editorial workflow. @@ -57,6 +57,9 @@ For support questions, feedback and ideas, please use the [WordPress.org forums] == Upgrade Notice == += 0.9.2 = +Fixes issues with scheduling and trashing posts in block editor. + = 0.9.1 = Bump PHP minimum to 5.6 to match WordPress core. Plus, various bug fixes. @@ -113,7 +116,10 @@ New features, including story budget and editorial metadata, a completely rewrit == Changelog == -= 0.9.1 (November 4, 2019) += 0.9.1 (November 24, 2019) = +* Bug fix: Prevent issues with scheduling and trashing posts when using the block editor (https://github.com/Automattic/Edit-Flow/pull/556 -- props cojennin, davisshaver, batmoo) + += 0.9.1 (November 4, 2019) = * Bug fix: Prevent custom status from being reverted when using Gutenberg (https://github.com/Automattic/Edit-Flow/pull/521 -- props mikeyarce, batmoo) * Bug fix: Don't break post previews when using custom statuses (https://github.com/Automattic/Edit-Flow/pull/515 -- props rebeccahum)