Changeset 2355111
- Timestamp:
- 08/08/2020 09:45:45 AM (6 years ago)
- Location:
- easycontent/trunk
- Files:
-
- 3 added
- 20 edited
-
app/Plugin.php (modified) (3 diffs)
-
app/Post.php (modified) (3 diffs)
-
app/api/models/Article.php (modified) (2 diffs)
-
app/db/BaseModel.php (modified) (4 diffs)
-
app/db/models/ArticlePost.php (modified) (2 diffs)
-
app/helpers/ArticleWorkflowStageUpdater.php (modified) (2 diffs)
-
app/rest/actions/GetArticleDetails.php (modified) (1 diff)
-
app/rest/actions/PublishArticle.php (modified) (1 diff)
-
app/rest/actions/PullArticle.php (modified) (1 diff)
-
app/rest/actions/PushPost.php (modified) (1 diff)
-
app/rest/actions/SetArticleWorkflowStage.php (modified) (3 diffs)
-
app/rest/actions/UnlinkPost.php (modified) (1 diff)
-
assets/css/gutenberg.min.css (added)
-
assets/css/plugin.min.css (added)
-
assets/js/admin.min.js (added)
-
assets/js/gutenberg/build/index.js (modified) (1 diff)
-
easycontent-wp.php (modified) (2 diffs)
-
languages/easycontent-wp-en_US.mo (modified) (previous)
-
languages/easycontent-wp-en_US.po (modified) (16 diffs)
-
readme.txt (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (5 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easycontent/trunk/app/Plugin.php
r2327436 r2355111 97 97 98 98 add_action( 'init', function() { 99 $gutenbergCssSrc = EASYCONTENT_URL . 'assets/css/gutenberg' . (EASYCONTENT_DEBUG ? '' : '.min') . '.css'; 100 99 101 wp_register_style( 100 102 'ec-gutenberg', 101 EASYCONTENT_URL . 'assets/css/gutenberg.css'103 $gutenbergCssSrc 102 104 ); 103 105 … … 138 140 public function enqueueAdminAssets($hookSuffix) 139 141 { 140 wp_enqueue_style( 'ec-style', EASYCONTENT_URL . 'assets/css/plugin.css', [], EASYCONTENT_PLUGIN_VERSION ); 142 $pluginCssSrc = EASYCONTENT_URL . 'assets/css/plugin' . (EASYCONTENT_DEBUG ? '' : '.min') . '.css'; 143 144 wp_enqueue_style( 'ec-style', $pluginCssSrc, [], EASYCONTENT_PLUGIN_VERSION ); 141 145 142 146 if ( 'easycontent_page_easycontent-publishing-options' === $hookSuffix … … 144 148 || 'post-new.php' === $hookSuffix 145 149 ) { 150 $src = EASYCONTENT_URL . 'assets/js/admin' . (EASYCONTENT_DEBUG ? '' : '.min') . '.js'; 151 152 // jQuery UI is used to provide backward compatibility with classic editor 146 153 wp_enqueue_style( 'ec-jquery-ui', EASYCONTENT_URL . 'assets/css/vendor/jquery-ui/jquery-ui.min.css', [], EASYCONTENT_PLUGIN_VERSION ); 147 wp_enqueue_script( 'ec-admin', EASYCONTENT_URL . 'assets/js/admin.js', ['jquery', 'jquery-ui-dialog'], EASYCONTENT_PLUGIN_VERSION );154 wp_enqueue_script( 'ec-admin', $src, ['jquery', 'jquery-ui-dialog'], EASYCONTENT_PLUGIN_VERSION ); 148 155 } 149 156 } -
easycontent/trunk/app/Post.php
r2340904 r2355111 173 173 $articleAttributes = $article->getAttributes(); 174 174 175 if ( ! ArticleDbModel::update( $articleAttributes, ['id' => $this->getArticle()->id] ) ) { 175 $updateResult = ArticleDbModel::update( 176 $articleAttributes, 177 ['id' => $this->getArticle()->id], 178 ['%d', '%d', '%s', '%s', '%d'], 179 ['%d'] 180 ); 181 182 if ( ! $updateResult ) { 176 183 throw new \Exception( __( 'Error during cache update', EASYCONTENT_TXTDOMAIN ) ); 177 184 } … … 216 223 // In this case we don't have data in DB so need to add one 217 224 218 $newArticleDbModel = ArticleDbModel::insertRow( $articleAttributes ); 225 $newArticleDbModel = ArticleDbModel::insertRow( 226 $articleAttributes, 227 ['%d', '%d', '%s', '%s', '%d'] 228 ); 219 229 220 230 if ( ! $newArticleDbModel ) { … … 231 241 // We have article data in DB and we need to update it 232 242 233 if ( ! ArticleDbModel::update( $articleAttributes, ['id' => $this->getArticle()->id] ) ) { 243 $updateResult = ArticleDbModel::update( 244 $articleAttributes, 245 ['id' => $this->getArticle()->id], 246 ['%d', '%d', '%s', '%s', '%d'], 247 ['%d'] 248 ); 249 250 if ( ! $updateResult ) { 234 251 throw new \Exception( __( 'Error during cache update', EASYCONTENT_TXTDOMAIN ), 14 ); 235 252 } -
easycontent/trunk/app/api/models/Article.php
r2285656 r2355111 237 237 238 238 if ( $cachedArticle ) { 239 ArticleDBModel::update( $fields, ['id' => $cachedArticle->id] ); 239 ArticleDBModel::update( 240 $fields, 241 ['id' => $cachedArticle->id], 242 ['%d', '%s', '%s', '%d'], 243 ['%d'] 244 ); 240 245 } else { 241 246 $fields['id'] = $this->id; 242 ArticleDBModel::insertRow( $fields );247 ArticleDBModel::insertRow( $fields, ['%d', '%s', '%s', '%d', '%d'] ); 243 248 } 244 249 … … 249 254 'post_id' => $postId, 250 255 'sync_time' => time() 251 ] );256 ], ['%d', '%d', '%d'] ); 252 257 } else { 253 ArticlePost::update( ['sync_time' => time()], ['article_id' => $this->id, 'post_id' => $postId] ); 258 ArticlePost::update( 259 ['sync_time' => time()], 260 [ 261 'article_id' => $this->id, 262 'post_id' => $postId 263 ], 264 ['%d'], 265 ['%d', '%d'] 266 ); 254 267 } 255 268 } -
easycontent/trunk/app/db/BaseModel.php
r2189682 r2355111 62 62 63 63 64 public static function insertRow(array $data )64 public static function insertRow(array $data, $format = null) 65 65 { 66 66 $insertions = []; … … 80 80 $tableName = static::tableName(); 81 81 82 $result = $wpdb->insert( $tableName, $insertions );82 $result = $wpdb->insert( $tableName, $insertions, $format ); 83 83 84 84 if ( false === $result ) { … … 90 90 91 91 92 public static function update(array $data, $where )92 public static function update(array $data, $where, $format = null, $whereFormat = null) 93 93 { 94 94 $insertions = []; … … 108 108 $tableName = static::tableName(); 109 109 110 $result = $wpdb->update( $tableName, $insertions, $where );110 $result = $wpdb->update( $tableName, $insertions, $where, $format, $whereFormat ); 111 111 112 112 return false !== $result; -
easycontent/trunk/app/db/models/ArticlePost.php
r2189682 r2355111 25 25 'post_id' => $postId, 26 26 'sync_time' => time() 27 ] );27 ], ['%d', '%d', '%d'] ); 28 28 } 29 29 … … 44 44 $tableName = static::tableName(); 45 45 46 $wpdb->update( $tableName, ['sync_time' => time()], ['article_id' => $articleId, 'post_id' => $postId], ['%d'], ['%d', '%d'] ); 46 $wpdb->update( 47 $tableName, 48 ['sync_time' => time()], 49 [ 50 'article_id' => $articleId, 51 'post_id' => $postId 52 ], 53 ['%d'], 54 ['%d', '%d'] 55 ); 47 56 } 48 57 -
easycontent/trunk/app/helpers/ArticleWorkflowStageUpdater.php
r2190570 r2355111 10 10 use GuzzleHttp\Exception\BadResponseException; 11 11 12 class ArticleWorkflowStageUpdater12 final class ArticleWorkflowStageUpdater 13 13 { 14 /** 15 * @param Post $post 16 * @param int $workflowStageId 17 * @return null|\WP_Error 18 */ 14 19 public function update(Post $post, $workflowStageId) 15 20 { … … 32 37 } 33 38 34 Article::update( ['current_workflow_stage_id' => $workflowStageId], ['id' => $relatedArticleId] ); 39 Article::update( 40 ['current_workflow_stage_id' => $workflowStageId], 41 ['id' => $relatedArticleId], 42 ['%d'], 43 ['%d'] 44 ); 35 45 36 46 return null; -
easycontent/trunk/app/rest/actions/GetArticleDetails.php
r2189682 r2355111 22 22 { 23 23 try { 24 return ( new Post( (int)$request['post_id'] ) )->getFrontendData(); 24 $payload = ( new Post( (int)$request['post_id'] ) )->getFrontendData(); 25 26 return null === $payload 27 ? new \WP_REST_Response( new \stdClass(), 404 ) 28 : new \WP_REST_Response( $payload ); 25 29 } catch (\Exception $e) { 26 30 return new \WP_Error( $e->getCode(), $e->getMessage() ); -
easycontent/trunk/app/rest/actions/PublishArticle.php
r2285656 r2355111 45 45 } 46 46 47 return new \WP_REST_Response( $post->getFrontendData() , 201 );47 return new \WP_REST_Response( $post->getFrontendData() ?: new \stdClass(), 201 ); 48 48 } catch ( \Exception $e ) { 49 49 return new \WP_Error( $e->getCode(), $e->getMessage() ); -
easycontent/trunk/app/rest/actions/PullArticle.php
r2194825 r2355111 34 34 } 35 35 36 return $post->pull();36 return new \WP_REST_Response( $post->pull() ?: new \stdClass() ); 37 37 } catch ( BadResponseException $e ) { 38 38 $ecException = new EasyContentResponseException( $e ); -
easycontent/trunk/app/rest/actions/PushPost.php
r2189682 r2355111 34 34 35 35 $post = new Post( (int)$request['post_id'] ); 36 return $post->push();36 return new \WP_REST_Response( $post->push() ?: new \stdClass() ); 37 37 } catch ( BadResponseException $e ) { 38 38 $ecException = new EasyContentResponseException( $e ); -
easycontent/trunk/app/rest/actions/SetArticleWorkflowStage.php
r2190570 r2355111 44 44 45 45 $relatedArticle = $post->getArticle(); 46 46 47 if ( ! $relatedArticle ) { 47 48 throw new \Exception( __( 'This post was not synchronized yet', EASYCONTENT_TXTDOMAIN ), 16 ); … … 49 50 50 51 $currentWorkflowStage = $relatedArticle->getCurrentWorkflowStage(); 52 51 53 if ( ! $currentWorkflowStage ) { 52 54 throw new \Exception( __( 'Data misconfiguration', EASYCONTENT_TXTDOMAIN ), 17 ); … … 55 57 if ( $currentWorkflowStage->id == $workflowStageId ) { 56 58 $plugin->log( 'Workflow stage ID was not changed. Returning...' ); 57 58 return null; 59 return new \WP_REST_Response( null, 204 ); 59 60 } 60 61 61 62 $workflowStage = WorkflowStage::findByKey( $workflowStageId ); 63 62 64 if ( ! $workflowStage ) { 63 65 throw new \Exception( __( 'This workflow stage does not exist', EASYCONTENT_TXTDOMAIN ), 18 ); 64 66 } 65 67 66 return ( new ArticleWorkflowStageUpdater() )->update( $post, $workflowStageId ); 68 $result = ( new ArticleWorkflowStageUpdater() )->update( $post, $workflowStageId ); 69 70 return is_wp_error( $result ) ? $result : new \WP_REST_Response( null, 204 ); 67 71 } catch (\Exception $e) { 68 72 $plugin->log( 'Error during setting new article workflow stage: ' . $e->getMessage() ); -
easycontent/trunk/app/rest/actions/UnlinkPost.php
r2189682 r2355111 26 26 try { 27 27 ArticlePost::deleteByPrimaryKey( (int)$request['post_id'], 'post_id' ); 28 29 return new \WP_REST_Response( null, 204 ); 28 30 } catch ( \Exception $e ) { 29 31 return new \WP_Error( $e->getCode(), $e->getMessage() ); -
easycontent/trunk/assets/js/gutenberg/build/index.js
r2194825 r2355111 1 !function(e){var t={};function n(c){if(t[c])return t[c].exports;var s=t[c]={i:c,l:!1,exports:{}};return e[c].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,c){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:c})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t,n){var c=n(5);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},s=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),s.forEach(function(t){c(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=regeneratorRuntime},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";n.r(t);var c=n(11),s=n(0),a=n(2),o=n(10),r=n(4),i=n(8),l=n(1),u="OPEN_MODAL",p="CLOSE_MODAL",d="TOGGLE_MODAL",h={PULL:"PULL",PUSH:"PUSH"};var b=Object(i.compose)(Object(l.withSelect)(function(e,t){var n=e("easycontent-wp-store"),c=n.getArticle,s=n.getModals,a=e("core/editor"),o=a.isSavingPost,r=a.isEditedPostSaveable,i=a.isEditedPostPublishable,l=a.isPostSavingLocked,u=a.isCurrentPostPublished,p=s(),d=!o()&&r()&&!l()&&!i()&&u();return{article:c(),isOpened:p[h.PUSH].isOpened,postCanBePushed:d}}),Object(l.withDispatch)(function(e,t,n){var c=n.select,s=e("easycontent-wp-store"),a=s.closeModal,o=s.pushArticle,r=c("easycontent-wp-store").isDoingAjax;return{close:function(){a(h.PUSH)},push:function(e,t){t&&!r()&&(o(e),a(h.PUSH))}}}))(function(e){var t=e.article,n=e.isOpened,c=e.postCanBePushed,o=e.close,i=e.push;return Object(s.createElement)(s.Fragment,null,n&&c&&Object(s.createElement)(r.Modal,{className:"ec-push-post-modal",onRequestClose:o,title:Object(a.__)("Push post to EasyContent.io?"),closeButtonLabel:Object(a.__)("Close")},Object(s.createElement)("p",null,t.isSynced?Object(a.__)("Are you sure you want to push this post to EasyContent? Any changes in EasyContent will be overwritten."):Object(a.__)("Push this post to EasyContent?")),Object(s.createElement)(r.Button,{isDefault:!0,onClick:o},Object(a.__)("Cancel")),Object(s.createElement)(r.Button,{isPrimary:!0,onClick:function(){return i(t.id,c)}},Object(a.__)("Push"))))}),f=Object(i.compose)(Object(l.withSelect)(function(e,t,n){return{isOpened:(0,e("easycontent-wp-store").getModals)()[h.PULL].isOpened}}),Object(l.withDispatch)(function(e,t,n){var c=n.select,s=e("easycontent-wp-store"),a=s.closeModal,o=s.pullArticle,r=c("easycontent-wp-store"),i=r.isDoingAjax,l=(0,r.getArticle)();return{close:function(){a(h.PULL)},pull:function(){!i()&&l.isSynced&&(o(),a(h.PULL))}}}))(function(e){var t=e.isOpened,n=e.close,c=e.pull;return Object(s.createElement)(s.Fragment,null,t&&Object(s.createElement)(r.Modal,{className:"ec-push-post-modal",onRequestClose:n,title:Object(a.__)("Pull post from EasyContent.io?"),closeButtonLabel:Object(a.__)("Close")},Object(s.createElement)("p",null,Object(a.__)("Are you sure you want to pull this Post from EasyContent? Any local changes will be overwritten.")),Object(s.createElement)(r.Button,{isDefault:!0,onClick:n},Object(a.__)("Cancel")),Object(s.createElement)(r.Button,{isPrimary:!0,onClick:c},Object(a.__)("Pull"))))}),O=Object(i.compose)(Object(l.withSelect)(function(e,t){var n=e("easycontent-wp-store"),c=n.getArticle,s=(n.getModals,n.getStages),a=n.isDoingAjax,o=n.isStagesSelectVisible,r=e("core/editor"),i=r.isSavingPost,l=r.isEditedPostSaveable,u=r.isEditedPostPublishable,p=r.isPostSavingLocked,d=r.isCurrentPostPublished,h=!i()&&l()&&!p()&&!u()&&d();return{article:c(),stages:s(),doingAjax:a(),isStagesSelectVisible:o(),postCanBePushed:h}}),Object(l.withDispatch)(function(e,t,n){var c=n.select,s=e("easycontent-wp-store"),a=s.openModal,o=s.showSelect,r=s.hideSelect,i=s.setNewArticleStage,l=c("easycontent-wp-store"),u=l.isDoingAjax,p=(0,l.getArticle)();return{openPullModal:function(){a(h.PULL)},openPushModal:function(){a(h.PUSH)},setArticleStage:function(e,t){if(!u()&&p.isSynced){var n=t.find(function(t){return t.id==e.target.value});i(n)}},showSelect:o,hideSelect:r}}))(function(e){var t=e.article,c=e.stages,i=e.doingAjax,l=e.postCanBePushed,u=e.openPushModal,p=e.setArticleStage,d=e.showSelect,h=e.hideSelect,O=e.isStagesSelectVisible,m=e.openPullModal,j=n(13)({active:i,"ec-widget-spinner-wrapper":!0});return Object(s.createElement)(o.PluginPostStatusInfo,null,Object(s.createElement)("div",{className:"ec-post-status-inner-wrapper"},Object(s.createElement)("div",{className:"ec-post-status-header"},"EasyContent"),Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)(r.Dashicon,{icon:"format-aside"}),Object(s.createElement)("span",{className:"status-item-name"},Object(a.__)("Item"),": "),t.isSynced?Object(s.createElement)("a",{href:t.url,target:"_blank"},t.topicName):Object(s.createElement)("span",null,Object(a.__)("N/A"))),!O&&Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)(r.Dashicon,{icon:"admin-network"}),Object(s.createElement)("span",{className:"status-item-name"},Object(a.__)("Status"),": "),t.isSynced&&t.stage?Object(s.createElement)(s.Fragment,null,Object(s.createElement)("span",{className:"ec-post-stage-color",style:{backgroundColor:"#"+t.stage.color}}),Object(s.createElement)(r.Button,{isLink:!0,onClick:d},t.stage.name)):Object(s.createElement)("span",null,Object(a.__)("N/A"))),c&&c.length>0&&O&&Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)("select",{onChange:function(e){return p(e,c)},value:t.stage.id},c.map(function(e,t){return Object(s.createElement)("option",{value:e.id},e.name)})),Object(s.createElement)(r.IconButton,{onClick:h,icon:"no",label:Object(a.__)("Cancel")})),Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)(r.Dashicon,{icon:"calendar"}),Object(s.createElement)("span",{className:"status-item-name"},Object(a.__)("Last Updated")+": "),t.lastUpdatedString?Object(s.createElement)(s.Fragment,null,t.lastUpdatedString):Object(s.createElement)(s.Fragment,null,"—")),Object(s.createElement)("div",{className:"ec-post-status-buttons"},Object(s.createElement)(r.Button,{isDefault:!0,disabled:!t.isSynced,onClick:m},Object(a.__)("Pull"))," ",Object(s.createElement)(r.Button,{isPrimary:!0,disabled:!l,onClick:u},Object(a.__)("Push"))),Object(s.createElement)("div",{className:j},Object(s.createElement)(r.Spinner,null))),Object(s.createElement)(b,null),Object(s.createElement)(f,null))}),m=n(5),j=n.n(m),g=n(3),y=n.n(g),E=n(7),S=n.n(E),P="START_AJAX_CALL",_="END_AJAX_CALL";function v(){return{type:P}}function w(){return{type:_}}function A(e,t){switch(this.state=e,this.then=function(e){return new e(this.state,t)},t.type){case P:return void(this.state=y()({},this.state,{doingAjax:!0}));case _:return void(this.state=y()({},this.state,{doingAjax:!1}))}this.reduce&&this.reduce()}var x=n(6),C=n.n(x),L=C.a.mark(D),k=C.a.mark(M),N="PUSH_ARTICLE",T="PULL_ARTICLE",U="UPDATE_ARTICLE_DATA";function D(e){var t,n;return C.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,v();case 2:return t=e?{type:N,id:e}:{type:N},c.next=5,t;case 5:if(!(n=c.sent).success){c.next=9;break}return c.next=9,{type:U,payload:n.payload};case 9:return c.next=11,w();case 11:case"end":return c.stop()}},L)}function M(){var e;return C.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v();case 2:return t.next=4,{type:T};case 4:if(!(e=t.sent).success){t.next=8;break}return t.next=8,{type:U,payload:e.payload};case 8:return t.next=10,w();case 10:case"end":return t.stop()}},k)}function B(e){return{type:U,payload:e}}function I(e,t){this.reduce=function(){switch(t.type){case U:this.state=y()({},e),this.state.article=t.payload}},A.apply(this,arguments)}var H,R=C.a.mark(X),G="SHOW_STAGES_SELECT",V="HIDE_STAGES_SELECT",F="SET_STAGES_ARRAY",q="SET_NEW_ARTICLE_STAGE",J="UPDATE_ARTICLE_STAGE_STATE";function W(){return{type:V}}function X(e){return C.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v();case 2:return t.next=4,{type:q,stage:e};case 4:if(!t.sent.success){t.next=8;break}return t.next=8,{type:J,stage:e};case 8:return t.next=10,W();case 10:return t.next=12,w();case 12:case"end":return t.stop()}},R)}function Y(e,t){this.reduce=function(){switch(t.type){case G:this.state=y()({},this.state,{stagesSelectVisible:!0});break;case V:this.state=y()({},this.state,{stagesSelectVisible:!1});break;case F:this.state=y()({},this.state,{stages:t.stages});break;case J:this.state=y()({},e),this.state.article.stage=t.stage}},A.apply(this,arguments)}var z={modals:(H={},j()(H,h.PULL,{isOpened:!1}),j()(H,h.PUSH,{isOpened:!1}),H),article:{id:0,isSynced:!1,title:"",topicName:Object(a.__)("N/A"),url:"#",content:"",stage:{id:0,name:Object(a.__)("N/A"),color:"fff"},lastUpdatedString:""},stages:[],stagesSelectVisible:!1,doingAjax:!1};var K,Q=n(9),Z=Object(l.registerStore)("easycontent-wp-store",{reducer:function(){return new function(e,t){this.reduce=function(){var e=t.modal===h.PULL?h.PUSH:h.PULL;switch(t.type){case u:this.state.modals[t.modal].isOpened||this.state.modals[e].isOpened||(this.state=y()({},this.state),this.state.modals[t.modal].isOpened=!0);break;case p:this.state.modals[t.modal].isOpened&&(this.state=y()({},this.state),this.state.modals[t.modal].isOpened=!1);break;case d:var n=!this.state.modals[t.modal].isOpened;(!this.state.modals[e].isOpened&&n||this.state.modals[t.modal].isOpened&&!n)&&(this.state=y()({},this.state),this.state.modals[t.modal].isOpened=n)}},A.apply(this,arguments)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,arguments.length>1?arguments[1]:void 0).then(Y).then(I).state},actions:{openModal:function(e){return{type:u,modal:e}},closeModal:function(e){return{type:p,modal:e}},toggleModal:function(e){return{type:d,modal:e}},pushArticle:D,pullArticle:M,showSelect:function(){return{type:G}},hideSelect:W,setNewArticleStage:X},selectors:{getArticle:function(e){return e.article},getModals:function(e){return e.modals},getStages:function(e){return e.stages},isStagesSelectVisible:function(e){return e.stagesSelectVisible},isDoingAjax:function(e){return e.doingAjax}},controls:(K={},j()(K,N,function(e){var t=Object(l.select)("core/editor").getCurrentPostId();return t=t||0,S()({method:"POST",path:"/easycontent/v1/posts/".concat(t,"/push"),cache:"no-cache"}).then(function(e){return Object(l.dispatch)("core/notices").createSuccessNotice(Object(a.__)("Post was pushed to EasyContent.io successfully")),{payload:e,success:!0}},function(e){return 404==e.code?Object(l.dispatch)("core/notices").createErrorNotice(e.message,{actions:[{onClick:function(e){S()({method:"POST",path:"/easycontent/v1/posts/".concat(t,"/unlink"),cache:"no-cache"}).then(function(e){Object(l.dispatch)("core/notices").createSuccessNotice(Object(a.__)("Post was unlinked successfully")),Z.dispatch(B(z))},function(e){Object(l.dispatch)("core/notices").createErrorNotice(e.message)})},label:"Unlink"}]}):Object(l.dispatch)("core/notices").createErrorNotice(e.message),y()({},e,{success:!1})})}),j()(K,T,function(e){var t=(0,Object(l.select)("easycontent-wp-store").getArticle)().id;return S()({method:"POST",path:"/easycontent/v1/articles/".concat(t,"/pull"),cache:"no-cache"}).then(function(e){Object(l.dispatch)("core/notices").createNotice("success",Object(a.__)("Post was pulled from EasyContent.io successfully")),Object(l.dispatch)("core/editor").editPost({title:e.title});var t=Object(l.select)("core/editor").getEditorBlocks().map(function(e){return e.clientId});return Object(l.dispatch)("core/block-editor").replaceBlocks(t,Object(Q.parse)(e.content),0),{payload:e,success:!0}},function(e){return 404==e.code?Object(l.dispatch)("core/notices").createErrorNotice(e.message,{actions:[{onClick:function(e){var t=Object(l.select)("core/editor").getCurrentPostId();t=t||0,S()({method:"POST",path:"/easycontent/v1/posts/".concat(t,"/unlink"),cache:"no-cache"}).then(function(e){Object(l.dispatch)("core/notices").createSuccessNotice(Object(a.__)("Post was unlinked successfully")),Z.dispatch(B(z))},function(e){Object(l.dispatch)("core/notices").createErrorNotice(e.message)})},label:"Unlink"}]}):Object(l.dispatch)("core/notices").createErrorNotice(e.message),y()({},e,{success:!1})})}),j()(K,q,function(e){var t=Object(l.select)("core/editor").getCurrentPostId();return t=t||0,S()({method:"PATCH",path:"/easycontent/v1/posts/".concat(t),data:{workflow_stage_id:e.stage.id},cache:"no-cache"}).then(function(e){return{payload:e,success:!0}},function(e){return Object(l.dispatch)("core/notices").createNotice("error",e.message),y()({},e,{success:!1})})}),K),resolvers:{getArticle:function(){var e=Object(l.select)("core/editor").getCurrentPostId();e&&S()({path:"/easycontent/v1/posts/".concat(e,"/article"),method:"GET",cache:"no-cache"}).then(function(e){null!==e&&Z.dispatch(B(e))})},getStages:function(){S()({path:"/easycontent/v1/stages",method:"GET",cache:"no-cache"}).then(function(e){Z.dispatch(function(e){return{type:F,stages:e}}(e))})}},initialState:z});Object(c.registerPlugin)("easycontent-gutenberg-sidebar",{render:O})},function(e,t,n){var c;1 !function(e){var t={};function n(c){if(t[c])return t[c].exports;var s=t[c]={i:c,l:!1,exports:{}};return e[c].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,c){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:c})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t,n){var c=n(5);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},s=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),s.forEach(function(t){c(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=regeneratorRuntime},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";n.r(t);var c=n(11),s=n(0),a=n(2),o=n(10),r=n(4),i=n(8),l=n(1),u="OPEN_MODAL",p="CLOSE_MODAL",d="TOGGLE_MODAL",h={PULL:"PULL",PUSH:"PUSH"};var f=Object(i.compose)(Object(l.withSelect)(function(e,t){var n=e("easycontent-wp-store"),c=n.getArticle,s=n.getModals,a=e("core/editor"),o=a.isSavingPost,r=a.isEditedPostSaveable,i=a.isAutosavingPost,l=a.isPostSavingLocked,u=a.isCurrentPostPublished,p=a.getCurrentPost,d=s(),f=!o()&&!i()&&r()&&!l()&&(u()||"draft"===p().status);return{article:c(),isOpened:d[h.PUSH].isOpened,postCanBePushed:f}}),Object(l.withDispatch)(function(e,t,n){var c=n.select,s=e("easycontent-wp-store"),a=s.closeModal,o=s.pushArticle,r=c("easycontent-wp-store").isDoingAjax;return{close:function(){a(h.PUSH)},push:function(e,t){t&&!r()&&(o(e),a(h.PUSH))}}}))(function(e){var t=e.article,n=e.isOpened,c=e.postCanBePushed,o=e.close,i=e.push;return Object(s.createElement)(s.Fragment,null,n&&c&&Object(s.createElement)(r.Modal,{className:"ec-push-post-modal",onRequestClose:o,title:Object(a.__)("Push post to EasyContent.io?"),closeButtonLabel:Object(a.__)("Close")},Object(s.createElement)("p",null,t.isSynced?Object(a.__)("Are you sure you want to push this post to EasyContent? Any changes in EasyContent will be overwritten."):Object(a.__)("Push this post to EasyContent?")),Object(s.createElement)(r.Button,{isDefault:!0,onClick:o},Object(a.__)("Cancel")),Object(s.createElement)(r.Button,{isPrimary:!0,onClick:function(){return i(t.id,c)}},Object(a.__)("Push"))))}),b=Object(i.compose)(Object(l.withSelect)(function(e,t,n){return{isOpened:(0,e("easycontent-wp-store").getModals)()[h.PULL].isOpened}}),Object(l.withDispatch)(function(e,t,n){var c=n.select,s=e("easycontent-wp-store"),a=s.closeModal,o=s.pullArticle,r=c("easycontent-wp-store"),i=r.isDoingAjax,l=(0,r.getArticle)();return{close:function(){a(h.PULL)},pull:function(){!i()&&l.isSynced&&(o(),a(h.PULL))}}}))(function(e){var t=e.isOpened,n=e.close,c=e.pull;return Object(s.createElement)(s.Fragment,null,t&&Object(s.createElement)(r.Modal,{className:"ec-push-post-modal",onRequestClose:n,title:Object(a.__)("Pull post from EasyContent.io?"),closeButtonLabel:Object(a.__)("Close")},Object(s.createElement)("p",null,Object(a.__)("Are you sure you want to pull this Post from EasyContent? Any local changes will be overwritten.")),Object(s.createElement)(r.Button,{isDefault:!0,onClick:n},Object(a.__)("Cancel")),Object(s.createElement)(r.Button,{isPrimary:!0,onClick:c},Object(a.__)("Pull"))))}),O=Object(i.compose)(Object(l.withSelect)(function(e,t){var n=e("easycontent-wp-store"),c=n.getArticle,s=(n.getModals,n.getStages),a=n.isDoingAjax,o=n.isStagesSelectVisible,r=e("core/editor"),i=r.isSavingPost,l=r.isEditedPostSaveable,u=r.isPostSavingLocked,p=r.isCurrentPostPublished,d=r.isAutosavingPost,h=r.getCurrentPost,f=!i()&&!d()&&l()&&!u()&&(p()||"draft"===h().status);return{article:c(),stages:s(),doingAjax:a(),isStagesSelectVisible:o(),postCanBePushed:f}}),Object(l.withDispatch)(function(e,t,n){var c=n.select,s=e("easycontent-wp-store"),a=s.openModal,o=s.showSelect,r=s.hideSelect,i=s.setNewArticleStage,l=c("easycontent-wp-store"),u=l.isDoingAjax,p=(0,l.getArticle)();return{openPullModal:function(){a(h.PULL)},openPushModal:function(){a(h.PUSH)},setArticleStage:function(e,t){if(!u()&&p.isSynced){var n=t.find(function(t){return t.id==e.target.value});i(n)}},showSelect:o,hideSelect:r}}))(function(e){var t=e.article,c=e.stages,i=e.doingAjax,l=e.postCanBePushed,u=e.openPushModal,p=e.setArticleStage,d=e.showSelect,h=e.hideSelect,O=e.isStagesSelectVisible,m=e.openPullModal,g=n(13)({active:i,"ec-widget-spinner-wrapper":!0});return Object(s.createElement)(o.PluginPostStatusInfo,null,Object(s.createElement)("div",{className:"ec-post-status-inner-wrapper"},Object(s.createElement)("div",{className:"ec-post-status-header"},"EasyContent"),Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)(r.Dashicon,{icon:"format-aside"}),Object(s.createElement)("span",{className:"status-item-name"},Object(a.__)("Item"),": "),t.isSynced?Object(s.createElement)("a",{href:t.url,target:"_blank"},t.topicName):Object(s.createElement)("span",null,Object(a.__)("N/A"))),!O&&Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)(r.Dashicon,{icon:"admin-network"}),Object(s.createElement)("span",{className:"status-item-name"},Object(a.__)("Status"),": "),t.isSynced&&t.stage?Object(s.createElement)(s.Fragment,null,Object(s.createElement)("span",{className:"ec-post-stage-color",style:{backgroundColor:"#"+t.stage.color}}),Object(s.createElement)(r.Button,{isLink:!0,onClick:d},t.stage.name)):Object(s.createElement)("span",null,Object(a.__)("N/A"))),c&&c.length>0&&O&&Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)("select",{onChange:function(e){return p(e,c)},value:t.stage.id},c.map(function(e,t){return Object(s.createElement)("option",{value:e.id},e.name)})),Object(s.createElement)(r.IconButton,{onClick:h,icon:"no",label:Object(a.__)("Cancel")})),Object(s.createElement)("div",{className:"ec-post-status-row"},Object(s.createElement)(r.Dashicon,{icon:"calendar"}),Object(s.createElement)("span",{className:"status-item-name"},Object(a.__)("Last Updated")+": "),t.lastUpdatedString?Object(s.createElement)(s.Fragment,null,t.lastUpdatedString):Object(s.createElement)(s.Fragment,null,"—")),Object(s.createElement)("div",{className:"ec-post-status-buttons"},Object(s.createElement)(r.Button,{isDefault:!0,disabled:!t.isSynced,onClick:m},Object(a.__)("Pull"))," ",Object(s.createElement)(r.Button,{isPrimary:!0,disabled:!l,onClick:u},Object(a.__)("Push"))),Object(s.createElement)("div",{className:g},Object(s.createElement)(r.Spinner,null))),Object(s.createElement)(f,null),Object(s.createElement)(b,null))}),m=n(5),g=n.n(m),j=n(3),y=n.n(j),E=n(7),S=n.n(E),P="START_AJAX_CALL",_="END_AJAX_CALL";function v(){return{type:P}}function w(){return{type:_}}function A(e,t){switch(this.state=e,this.then=function(e){return new e(this.state,t)},t.type){case P:return void(this.state=y()({},this.state,{doingAjax:!0}));case _:return void(this.state=y()({},this.state,{doingAjax:!1}))}this.reduce&&this.reduce()}var C=n(6),x=n.n(C),L=x.a.mark(D),k=x.a.mark(M),N="PUSH_ARTICLE",T="PULL_ARTICLE",U="UPDATE_ARTICLE_DATA";function D(e){var t,n;return x.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,v();case 2:return t=e?{type:N,id:e}:{type:N},c.next=5,t;case 5:if(!(n=c.sent).success){c.next=9;break}return c.next=9,{type:U,payload:n.payload};case 9:return c.next=11,w();case 11:case"end":return c.stop()}},L)}function M(){var e;return x.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v();case 2:return t.next=4,{type:T};case 4:if(!(e=t.sent).success){t.next=8;break}return t.next=8,{type:U,payload:e.payload};case 8:return t.next=10,w();case 10:case"end":return t.stop()}},k)}function B(e){return{type:U,payload:e}}function I(e,t){this.reduce=function(){switch(t.type){case U:this.state=y()({},e),this.state.article=t.payload}},A.apply(this,arguments)}var H,R=x.a.mark(X),G="SHOW_STAGES_SELECT",V="HIDE_STAGES_SELECT",F="SET_STAGES_ARRAY",q="SET_NEW_ARTICLE_STAGE",J="UPDATE_ARTICLE_STAGE_STATE";function W(){return{type:V}}function X(e){return x.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v();case 2:return t.next=4,{type:q,stage:e};case 4:if(!t.sent.success){t.next=8;break}return t.next=8,{type:J,stage:e};case 8:return t.next=10,W();case 10:return t.next=12,w();case 12:case"end":return t.stop()}},R)}function Y(e,t){this.reduce=function(){switch(t.type){case G:this.state=y()({},this.state,{stagesSelectVisible:!0});break;case V:this.state=y()({},this.state,{stagesSelectVisible:!1});break;case F:this.state=y()({},this.state,{stages:t.stages});break;case J:this.state=y()({},e),this.state.article.stage=t.stage}},A.apply(this,arguments)}var z={modals:(H={},g()(H,h.PULL,{isOpened:!1}),g()(H,h.PUSH,{isOpened:!1}),H),article:{id:0,isSynced:!1,title:"",topicName:Object(a.__)("N/A"),url:"#",content:"",stage:{id:0,name:Object(a.__)("N/A"),color:"fff"},lastUpdatedString:""},stages:[],stagesSelectVisible:!1,doingAjax:!1};var K,Q=n(9),Z=Object(l.registerStore)("easycontent-wp-store",{reducer:function(){return new function(e,t){this.reduce=function(){var e=t.modal===h.PULL?h.PUSH:h.PULL;switch(t.type){case u:this.state.modals[t.modal].isOpened||this.state.modals[e].isOpened||(this.state=y()({},this.state),this.state.modals[t.modal].isOpened=!0);break;case p:this.state.modals[t.modal].isOpened&&(this.state=y()({},this.state),this.state.modals[t.modal].isOpened=!1);break;case d:var n=!this.state.modals[t.modal].isOpened;(!this.state.modals[e].isOpened&&n||this.state.modals[t.modal].isOpened&&!n)&&(this.state=y()({},this.state),this.state.modals[t.modal].isOpened=n)}},A.apply(this,arguments)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,arguments.length>1?arguments[1]:void 0).then(Y).then(I).state},actions:{openModal:function(e){return{type:u,modal:e}},closeModal:function(e){return{type:p,modal:e}},toggleModal:function(e){return{type:d,modal:e}},pushArticle:D,pullArticle:M,showSelect:function(){return{type:G}},hideSelect:W,setNewArticleStage:X},selectors:{getArticle:function(e){return e.article},getModals:function(e){return e.modals},getStages:function(e){return e.stages},isStagesSelectVisible:function(e){return e.stagesSelectVisible},isDoingAjax:function(e){return e.doingAjax}},controls:(K={},g()(K,N,function(e){var t=Object(l.select)("core/editor").getCurrentPostId();return t=t||0,S()({method:"POST",path:"/easycontent/v1/posts/".concat(t,"/push"),cache:"no-cache"}).then(function(e){return Object(l.dispatch)("core/notices").createSuccessNotice(Object(a.__)("Post was pushed to EasyContent.io successfully")),{payload:e,success:!0}},function(e){return 404==e.code?Object(l.dispatch)("core/notices").createErrorNotice(e.message,{actions:[{onClick:function(e){S()({method:"POST",path:"/easycontent/v1/posts/".concat(t,"/unlink"),cache:"no-cache"}).then(function(e){Object(l.dispatch)("core/notices").createSuccessNotice(Object(a.__)("Post was unlinked successfully")),Z.dispatch(B(z))},function(e){Object(l.dispatch)("core/notices").createErrorNotice(e.message)})},label:"Unlink"}]}):Object(l.dispatch)("core/notices").createErrorNotice(e.message),y()({},e,{success:!1})})}),g()(K,T,function(e){var t=(0,Object(l.select)("easycontent-wp-store").getArticle)().id;return S()({method:"POST",path:"/easycontent/v1/articles/".concat(t,"/pull"),cache:"no-cache"}).then(function(e){Object(l.dispatch)("core/notices").createNotice("success",Object(a.__)("Post was pulled from EasyContent.io successfully")),Object(l.dispatch)("core/editor").editPost({title:e.title});var t=Object(l.select)("core/editor").getEditorBlocks().map(function(e){return e.clientId});return Object(l.dispatch)("core/block-editor").replaceBlocks(t,Object(Q.parse)(e.content),0),{payload:e,success:!0}},function(e){return 404==e.code?Object(l.dispatch)("core/notices").createErrorNotice(e.message,{actions:[{onClick:function(e){var t=Object(l.select)("core/editor").getCurrentPostId();t=t||0,S()({method:"POST",path:"/easycontent/v1/posts/".concat(t,"/unlink"),cache:"no-cache"}).then(function(e){Object(l.dispatch)("core/notices").createSuccessNotice(Object(a.__)("Post was unlinked successfully")),Z.dispatch(B(z))},function(e){Object(l.dispatch)("core/notices").createErrorNotice(e.message)})},label:"Unlink"}]}):Object(l.dispatch)("core/notices").createErrorNotice(e.message),y()({},e,{success:!1})})}),g()(K,q,function(e){var t=Object(l.select)("core/editor").getCurrentPostId();return t=t||0,S()({method:"PATCH",path:"/easycontent/v1/posts/".concat(t),data:{workflow_stage_id:e.stage.id},cache:"no-cache"}).then(function(e){return{payload:e,success:!0}},function(e){return Object(l.dispatch)("core/notices").createNotice("error",e.message),y()({},e,{success:!1})})}),K),resolvers:{getArticle:function(){var e=Object(l.select)("core/editor").getCurrentPostId();e&&S()({path:"/easycontent/v1/posts/".concat(e,"/article"),method:"GET",cache:"no-cache"}).then(function(e){null!==e&&Z.dispatch(B(e))}).catch(function(e){})},getStages:function(){S()({path:"/easycontent/v1/stages",method:"GET",cache:"no-cache"}).then(function(e){Z.dispatch(function(e){return{type:F,stages:e}}(e))})}},initialState:z});Object(c.registerPlugin)("easycontent-gutenberg-sidebar",{render:O})},function(e,t,n){var c; 2 2 /*! 3 3 Copyright (c) 2017 Jed Watson. -
easycontent/trunk/easycontent-wp.php
r2340904 r2355111 4 4 * Plugin URI: https://easycontent.io 5 5 * Description: Imports articles from EasyContent to your wordpress site and exports articles from your wordpress site to EasyContent 6 * Version: 1.0. 56 * Version: 1.0.6 7 7 * Requires at least: 5.0.7 8 8 * Requires PHP: 5.6 … … 21 21 22 22 if ( ! defined( 'EASYCONTENT_PLUGIN_VERSION' ) ) { 23 define( 'EASYCONTENT_PLUGIN_VERSION', '1.0. 5' );23 define( 'EASYCONTENT_PLUGIN_VERSION', '1.0.6' ); 24 24 } 25 25 -
easycontent/trunk/languages/easycontent-wp-en_US.po
r2189682 r2355111 2 2 msgstr "" 3 3 "Project-Id-Version: EasyContent WordPress Plugin\n" 4 "POT-Creation-Date: 20 19-10-30 15:38+0200\n"5 "PO-Revision-Date: 20 19-10-30 15:39+0200\n"4 "POT-Creation-Date: 2020-07-17 13:07+0300\n" 5 "PO-Revision-Date: 2020-07-17 13:07+0300\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 2. 2.4\n"12 "X-Generator: Poedit 2.3.1\n" 13 13 "X-Poedit-Basepath: ..\n" 14 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 "X-Poedit-KeywordsList: __;_e;_n;_n_noop \n"15 "X-Poedit-KeywordsList: __;_e;_n;_n_noop;esc_html__;esc_attr__\n" 16 16 "X-Poedit-SearchPath-0: app\n" 17 17 "X-Poedit-SearchPath-1: views\n" … … 25 25 msgstr "" 26 26 27 #: app/Attachment.php:40 app/Post.php:5 027 #: app/Attachment.php:40 app/Post.php:52 28 28 msgid "Invalid post type" 29 29 msgstr "" … … 33 33 msgstr "" 34 34 35 #: app/ListTableManager.php:12 135 #: app/ListTableManager.php:123 36 36 #, php-format 37 37 msgid "%d article has been successfully pulled from EasyContent" 38 38 msgstr "" 39 39 40 #: app/ListTableManager.php:12 740 #: app/ListTableManager.php:129 41 41 #, php-format 42 42 msgid "%d article has been successfully pushed to EasyContent" 43 43 msgstr "" 44 44 45 #: app/Post.php:3 745 #: app/Post.php:39 46 46 msgid "Invalid post ID" 47 47 msgstr "" 48 48 49 #: app/Post.php:4 449 #: app/Post.php:46 50 50 msgid "Error during post fetching" 51 51 msgstr "" 52 52 53 #: app/Post.php:1 1953 #: app/Post.php:127 54 54 msgid "Post was not synchronized. Push first!" 55 55 msgstr "" 56 56 57 #: app/Post.php:1 3557 #: app/Post.php:143 58 58 msgid "Unable to find article on EasyContent.io" 59 59 msgstr "" 60 60 61 #: app/Post.php:1 4861 #: app/Post.php:155 62 62 msgid "Error during saving remote post data" 63 63 msgstr "" 64 64 65 #: app/Post.php:1 69 app/Post.php:212 app/Post.php:22265 #: app/Post.php:183 app/Post.php:234 app/Post.php:251 66 66 msgid "Error during cache update" 67 67 msgstr "" … … 184 184 185 185 #: app/api/models/Article.php:58 app/api/models/Article.php:59 186 #: views/admin/metaboxes/post-sync.php:16 187 #: views/admin/metaboxes/post-sync.php:56 186 188 msgid "N/A" 187 189 msgstr "" … … 212 214 msgstr "" 213 215 214 #: app/db/DbController.php:12 6 app/db/DbController.php:139216 #: app/db/DbController.php:125 app/db/DbController.php:138 215 217 msgid "Error occurred, please try again later" 216 218 msgstr "" … … 245 247 msgstr "" 246 248 247 #: app/forms/handlers/RefreshAllDataFormHandler.php:4 2249 #: app/forms/handlers/RefreshAllDataFormHandler.php:48 248 250 msgid "All data has been updated" 249 251 msgstr "" 250 252 253 #: app/helpers/ArticleWorkflowStageUpdater.php:28 254 msgid "Remote article doesn't exist" 255 msgstr "" 256 251 257 #: app/helpers/TimeHelper.php:18 252 258 #, php-format … … 289 295 msgstr "" 290 296 291 #: app/ pages/PagesManager.php:25 app/pages/PagesManager.php:26292 #: app/pages/PagesManager.php: 36297 #: app/metaboxes/PostSyncMetaBox.php:14 app/pages/PagesManager.php:25 298 #: app/pages/PagesManager.php:26 app/pages/PagesManager.php:36 293 299 msgid "EasyContent" 294 300 msgstr "" … … 355 361 msgstr "" 356 362 357 #: app/rest/actions/PullArticle.php:3 0363 #: app/rest/actions/PullArticle.php:33 358 364 msgid "Invalid article ID" 365 msgstr "" 366 367 #: app/rest/actions/PullArticle.php:41 app/rest/actions/PushPost.php:41 368 #, php-format 369 msgid "" 370 "Remote article was not found in %s project. Do you want to unlink it from " 371 "this post? " 372 msgstr "" 373 374 #: app/rest/actions/PullArticle.php:42 app/rest/actions/PushPost.php:42 375 msgid "" 376 "If you unlink it and then push this post to EasyContent, a new article will " 377 "be created." 359 378 msgstr "" 360 379 … … 365 384 msgstr "" 366 385 367 #: app/rest/actions/PushPost.php:41 368 #, php-format 369 msgid "" 370 "Remote article was not found in %s project. Do you want to unlink it from " 371 "this post? " 372 msgstr "" 373 374 #: app/rest/actions/PushPost.php:42 375 msgid "" 376 "If you unlink it and then push this post to EasyContent, a new article will " 377 "be created." 378 msgstr "" 379 380 #: app/rest/actions/SetArticleWorkflowStage.php:46 386 #: app/rest/actions/SetArticleWorkflowStage.php:42 381 387 msgid "Invalid workflow stage ID" 382 388 msgstr "" 383 389 384 #: app/rest/actions/SetArticleWorkflowStage.php: 51390 #: app/rest/actions/SetArticleWorkflowStage.php:47 385 391 msgid "This post was not synchronized yet" 386 392 msgstr "" 387 393 388 #: app/rest/actions/SetArticleWorkflowStage.php:5 6394 #: app/rest/actions/SetArticleWorkflowStage.php:52 389 395 msgid "Data misconfiguration" 390 396 msgstr "" 391 397 392 #: app/rest/actions/SetArticleWorkflowStage.php:6 7398 #: app/rest/actions/SetArticleWorkflowStage.php:63 393 399 msgid "This workflow stage does not exist" 394 msgstr ""395 396 #: app/rest/actions/SetArticleWorkflowStage.php:81397 msgid "Remote article doesn't exist"398 400 msgstr "" 399 401 … … 423 425 msgstr "" 424 426 427 #: views/admin/metaboxes/post-sync.php:10 428 msgid "Item" 429 msgstr "" 430 431 #: views/admin/metaboxes/post-sync.php:24 432 #: views/admin/metaboxes/post-sync.php:55 433 #: views/admin/pages/import/table-filters.php:22 434 msgid "Status" 435 msgstr "" 436 437 #: views/admin/metaboxes/post-sync.php:31 views/admin/pages/connection.php:69 438 msgid "Change" 439 msgstr "" 440 441 #: views/admin/metaboxes/post-sync.php:62 442 msgid "Last Updated" 443 msgstr "" 444 445 #: views/admin/metaboxes/post-sync.php:73 446 #: views/admin/metaboxes/post-sync.php:77 447 msgid "Pull" 448 msgstr "" 449 450 #: views/admin/metaboxes/post-sync.php:82 451 msgid "Push" 452 msgstr "" 453 454 #: views/admin/metaboxes/post-sync.php:88 455 msgid "" 456 "Are you sure you want to push this post to EasyContent? Any changes in " 457 "EasyContent will be overwritten." 458 msgstr "" 459 460 #: views/admin/metaboxes/post-sync.php:90 461 msgid "Push this post to EasyContent?" 462 msgstr "" 463 464 #: views/admin/metaboxes/post-sync.php:96 465 msgid "" 466 "Are you sure you want to pull this Post from EasyContent? Any local changes " 467 "will be overwritten." 468 msgstr "" 469 425 470 #: views/admin/notices/db-is-not-up-to-date.php:10 426 471 msgid "Your database is not up to date!" … … 443 488 msgstr "" 444 489 445 #: views/admin/pages/connection.php:2 4490 #: views/admin/pages/connection.php:26 446 491 msgid "Set up your connection with EasyContent. You can find the instructions" 447 492 msgstr "" 448 493 449 #: views/admin/pages/connection.php:2 5494 #: views/admin/pages/connection.php:28 450 495 msgid "here" 451 496 msgstr "" 452 497 453 #: views/admin/pages/connection.php:34 454 msgid "Public API Key" 455 msgstr "" 456 457 #: views/admin/pages/connection.php:54 458 msgid "Private API Key" 459 msgstr "" 460 461 #: views/admin/pages/connection.php:73 462 msgid "How to get your API keys?" 463 msgstr "" 464 465 #: views/admin/pages/connection.php:81 466 #: views/admin/pages/publishing-options.php:147 467 #: views/admin/pages/resize-options.php:99 views/admin/pages/seo.php:42 498 #: views/admin/pages/connection.php:39 499 msgid "API Key" 500 msgstr "" 501 502 #: views/admin/pages/connection.php:61 503 msgid "Current site URL" 504 msgstr "" 505 506 #: views/admin/pages/connection.php:80 507 msgid "Please enter current site URL" 508 msgstr "" 509 510 #: views/admin/pages/connection.php:91 511 msgid "How to get your API key?" 512 msgstr "" 513 514 #: views/admin/pages/connection.php:100 515 #: views/admin/pages/publishing-options.php:148 516 #: views/admin/pages/resize-options.php:99 views/admin/pages/seo.php:45 468 517 msgid "Save Changes" 469 518 msgstr "" 470 519 471 #: views/admin/pages/connection.php: 83520 #: views/admin/pages/connection.php:103 472 521 msgid "Proceed to publishing options" 473 522 msgstr "" … … 493 542 msgstr "" 494 543 495 #: views/admin/pages/import.php:38 views/admin/pages/import.php: 57544 #: views/admin/pages/import.php:38 views/admin/pages/import.php:60 496 545 msgid "Import selected items" 497 546 msgstr "" 498 547 499 #: views/admin/pages/import.php:42 views/admin/pages/import.php:6 1548 #: views/admin/pages/import.php:42 views/admin/pages/import.php:64 500 549 msgid "On import, change EasyContent status to" 501 550 msgstr "" 502 551 503 #: views/admin/pages/import.php:45 views/admin/pages/import.php:6 4552 #: views/admin/pages/import.php:45 views/admin/pages/import.php:67 504 553 msgid "Don't change status" 505 554 msgstr "" … … 510 559 msgstr "" 511 560 512 #: views/admin/pages/import/table-filters.php:22513 msgid "Status"514 msgstr ""515 516 561 #: views/admin/pages/import/table-filters.php:24 517 562 msgid "All statuses" 518 563 msgstr "" 519 564 520 #: views/admin/pages/import/table-filters.php:3 3565 #: views/admin/pages/import/table-filters.php:34 521 566 msgid "Synchronization status" 522 567 msgstr "" 523 568 524 #: views/admin/pages/import/table-filters.php:3 5569 #: views/admin/pages/import/table-filters.php:36 525 570 msgid "All items" 526 571 msgstr "" 527 572 528 #: views/admin/pages/import/table-filters.php:3 7573 #: views/admin/pages/import/table-filters.php:38 529 574 msgid "Synced" 530 575 msgstr "" 531 576 532 #: views/admin/pages/import/table-filters.php:4 0577 #: views/admin/pages/import/table-filters.php:41 533 578 msgid "Not synced" 534 579 msgstr "" 535 580 536 #: views/admin/pages/import/table-filters.php:4 4581 #: views/admin/pages/import/table-filters.php:45 537 582 msgid "Filter" 538 583 msgstr "" … … 553 598 msgstr "" 554 599 555 #: views/admin/pages/publishing-options.php:5 2600 #: views/admin/pages/publishing-options.php:53 556 601 msgid "No users available" 557 602 msgstr "" 558 603 559 #: views/admin/pages/publishing-options.php:5 8604 #: views/admin/pages/publishing-options.php:59 560 605 msgid "Post type" 561 606 msgstr "" 562 607 563 #: views/admin/pages/publishing-options.php:6 3608 #: views/admin/pages/publishing-options.php:64 564 609 msgid "post" 565 610 msgstr "" 566 611 567 #: views/admin/pages/publishing-options.php:6 6612 #: views/admin/pages/publishing-options.php:67 568 613 msgid "page" 569 614 msgstr "" 570 615 571 #: views/admin/pages/publishing-options.php:7 3616 #: views/admin/pages/publishing-options.php:74 572 617 msgid "Post status" 573 618 msgstr "" 574 619 575 #: views/admin/pages/publishing-options.php:7 8620 #: views/admin/pages/publishing-options.php:79 576 621 msgid "publish" 577 622 msgstr "" 578 623 579 #: views/admin/pages/publishing-options.php:8 1624 #: views/admin/pages/publishing-options.php:82 580 625 msgid "draft" 581 626 msgstr "" 582 627 583 #: views/admin/pages/publishing-options.php:8 4628 #: views/admin/pages/publishing-options.php:85 584 629 msgid "pending" 585 630 msgstr "" 586 631 587 #: views/admin/pages/publishing-options.php:8 7632 #: views/admin/pages/publishing-options.php:88 588 633 msgid "private" 589 634 msgstr "" 590 635 591 #: views/admin/pages/publishing-options.php:9 4636 #: views/admin/pages/publishing-options.php:95 592 637 msgid "Comments status" 593 638 msgstr "" 594 639 595 #: views/admin/pages/publishing-options.php: 99640 #: views/admin/pages/publishing-options.php:100 596 641 msgid "open" 597 642 msgstr "" 598 643 599 #: views/admin/pages/publishing-options.php:10 2644 #: views/admin/pages/publishing-options.php:103 600 645 msgid "closed" 601 646 msgstr "" 602 647 603 #: views/admin/pages/publishing-options.php:11 1648 #: views/admin/pages/publishing-options.php:112 604 649 msgid "Map your WordPress categories to EasyContent categories (optional)" 605 650 msgstr "" 606 651 607 #: views/admin/pages/publishing-options.php:11 2652 #: views/admin/pages/publishing-options.php:113 608 653 msgid "" 609 654 "After mapping all posts with the selected EasyContent category will be " … … 612 657 msgstr "" 613 658 614 #: views/admin/pages/publishing-options.php:11 7659 #: views/admin/pages/publishing-options.php:118 615 660 msgid "WordPress category" 616 661 msgstr "" 617 662 618 #: views/admin/pages/publishing-options.php:11 8663 #: views/admin/pages/publishing-options.php:119 619 664 msgid "EasyContent category" 620 665 msgstr "" 621 666 622 #: views/admin/pages/publishing-options.php:13 0667 #: views/admin/pages/publishing-options.php:131 623 668 msgid "Assign default WP category when there is no mapping" 624 669 msgstr "" -
easycontent/trunk/readme.txt
r2340910 r2355111 4 4 Tags: easycontent, easy content, workflow, approval, collaboration, import, export, manage writers, publishing, content flow, editorial, approval process, content tool 5 5 Requires at least: 5.0.7 6 Tested up to: 5. 36 Tested up to: 5.5 7 7 Requires PHP: 5.6 8 Stable tag: 1.0. 58 Stable tag: 1.0.6 9 9 License: GPL-2.0+ 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 61 61 == Changelog == 62 62 63 = 1.0.6 = 64 * Added ability to push drafted post to EasyContent.io 65 * Better Rest API support in Gutenberg editor 66 63 67 = 1.0.5 = 64 68 * Better EasyContent.io integration -
easycontent/trunk/vendor/autoload.php
r2327436 r2355111 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 29369553b2966c8e493a5d9065972d63::getLoader();7 return ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad::getLoader(); -
easycontent/trunk/vendor/composer/autoload_real.php
r2327436 r2355111 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 29369553b2966c8e493a5d9065972d635 class ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 29369553b2966c8e493a5d9065972d63', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 29369553b2966c8e493a5d9065972d63', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad', 'loadClassLoader')); 28 28 29 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 31 31 require_once __DIR__ . '/autoload_static.php'; 32 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit 29369553b2966c8e493a5d9065972d63::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInit54aed42cfa417ec4213926972db643ad::getInitializer($loader)); 34 34 } else { 35 35 $map = require __DIR__ . '/autoload_namespaces.php'; … … 52 52 53 53 if ($useStaticLoader) { 54 $includeFiles = Composer\Autoload\ComposerStaticInit 29369553b2966c8e493a5d9065972d63::$files;54 $includeFiles = Composer\Autoload\ComposerStaticInit54aed42cfa417ec4213926972db643ad::$files; 55 55 } else { 56 56 $includeFiles = require __DIR__ . '/autoload_files.php'; 57 57 } 58 58 foreach ($includeFiles as $fileIdentifier => $file) { 59 composerRequire 29369553b2966c8e493a5d9065972d63($fileIdentifier, $file);59 composerRequire54aed42cfa417ec4213926972db643ad($fileIdentifier, $file); 60 60 } 61 61 … … 64 64 } 65 65 66 function composerRequire 29369553b2966c8e493a5d9065972d63($fileIdentifier, $file)66 function composerRequire54aed42cfa417ec4213926972db643ad($fileIdentifier, $file) 67 67 { 68 68 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
easycontent/trunk/vendor/composer/autoload_static.php
r2327436 r2355111 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 29369553b2966c8e493a5d9065972d637 class ComposerStaticInit54aed42cfa417ec4213926972db643ad 8 8 { 9 9 public static $files = array ( … … 1618 1618 { 1619 1619 return \Closure::bind(function () use ($loader) { 1620 $loader->prefixLengthsPsr4 = ComposerStaticInit 29369553b2966c8e493a5d9065972d63::$prefixLengthsPsr4;1621 $loader->prefixDirsPsr4 = ComposerStaticInit 29369553b2966c8e493a5d9065972d63::$prefixDirsPsr4;1622 $loader->classMap = ComposerStaticInit 29369553b2966c8e493a5d9065972d63::$classMap;1620 $loader->prefixLengthsPsr4 = ComposerStaticInit54aed42cfa417ec4213926972db643ad::$prefixLengthsPsr4; 1621 $loader->prefixDirsPsr4 = ComposerStaticInit54aed42cfa417ec4213926972db643ad::$prefixDirsPsr4; 1622 $loader->classMap = ComposerStaticInit54aed42cfa417ec4213926972db643ad::$classMap; 1623 1623 1624 1624 }, null, ClassLoader::class);
Note: See TracChangeset
for help on using the changeset viewer.