Plugin Directory

Changeset 2355111


Ignore:
Timestamp:
08/08/2020 09:45:45 AM (6 years ago)
Author:
easycontent
Message:

Update 1.0.6

Location:
easycontent/trunk
Files:
3 added
20 edited

Legend:

Unmodified
Added
Removed
  • easycontent/trunk/app/Plugin.php

    r2327436 r2355111  
    9797
    9898        add_action( 'init', function() {
     99            $gutenbergCssSrc = EASYCONTENT_URL . 'assets/css/gutenberg' . (EASYCONTENT_DEBUG ? '' : '.min') . '.css';
     100
    99101            wp_register_style(
    100102                'ec-gutenberg',
    101                 EASYCONTENT_URL . 'assets/css/gutenberg.css'
     103                $gutenbergCssSrc
    102104            );
    103105
     
    138140    public function enqueueAdminAssets($hookSuffix)
    139141    {
    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 );
    141145
    142146        if ( 'easycontent_page_easycontent-publishing-options' === $hookSuffix
     
    144148            || 'post-new.php' === $hookSuffix
    145149        ) {
     150            $src = EASYCONTENT_URL . 'assets/js/admin' . (EASYCONTENT_DEBUG ? '' : '.min') . '.js';
     151
     152            // jQuery UI is used to provide backward compatibility with classic editor
    146153            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 );
    148155        }
    149156    }
  • easycontent/trunk/app/Post.php

    r2340904 r2355111  
    173173        $articleAttributes = $article->getAttributes();
    174174
    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 ) {
    176183            throw new \Exception( __( 'Error during cache update', EASYCONTENT_TXTDOMAIN ) );
    177184        }
     
    216223                // In this case we don't have data in DB so need to add one
    217224
    218                 $newArticleDbModel = ArticleDbModel::insertRow( $articleAttributes );
     225                $newArticleDbModel = ArticleDbModel::insertRow(
     226                    $articleAttributes,
     227                    ['%d', '%d', '%s', '%s', '%d']
     228                );
    219229
    220230                if ( ! $newArticleDbModel ) {
     
    231241                // We have article data in DB and we need to update it
    232242
    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 ) {
    234251                    throw new \Exception( __( 'Error during cache update', EASYCONTENT_TXTDOMAIN ), 14 );
    235252                }
  • easycontent/trunk/app/api/models/Article.php

    r2285656 r2355111  
    237237
    238238        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            );
    240245        } else {
    241246            $fields['id'] = $this->id;
    242             ArticleDBModel::insertRow( $fields );
     247            ArticleDBModel::insertRow( $fields, ['%d', '%s', '%s', '%d', '%d'] );
    243248        }
    244249
     
    249254                'post_id' => $postId,
    250255                'sync_time' => time()
    251             ] );
     256            ], ['%d', '%d', '%d'] );
    252257        } 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            );
    254267        }
    255268    }
  • easycontent/trunk/app/db/BaseModel.php

    r2189682 r2355111  
    6262
    6363
    64     public static function insertRow(array $data)
     64    public static function insertRow(array $data, $format = null)
    6565    {
    6666        $insertions = [];
     
    8080        $tableName = static::tableName();
    8181
    82         $result = $wpdb->insert( $tableName, $insertions );
     82        $result = $wpdb->insert( $tableName, $insertions, $format );
    8383
    8484        if ( false === $result ) {
     
    9090
    9191
    92     public static function update(array $data, $where)
     92    public static function update(array $data, $where, $format = null, $whereFormat = null)
    9393    {
    9494        $insertions = [];
     
    108108        $tableName = static::tableName();
    109109
    110         $result = $wpdb->update( $tableName, $insertions, $where );
     110        $result = $wpdb->update( $tableName, $insertions, $where, $format, $whereFormat );
    111111
    112112        return false !== $result;
  • easycontent/trunk/app/db/models/ArticlePost.php

    r2189682 r2355111  
    2525            'post_id' => $postId,
    2626            'sync_time' => time()
    27         ] );
     27        ], ['%d', '%d', '%d'] );
    2828    }
    2929
     
    4444        $tableName = static::tableName();
    4545
    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        );
    4756    }
    4857
  • easycontent/trunk/app/helpers/ArticleWorkflowStageUpdater.php

    r2190570 r2355111  
    1010use GuzzleHttp\Exception\BadResponseException;
    1111
    12 class ArticleWorkflowStageUpdater
     12final class ArticleWorkflowStageUpdater
    1313{
     14    /**
     15     * @param Post $post
     16     * @param int $workflowStageId
     17     * @return null|\WP_Error
     18     */
    1419    public function update(Post $post, $workflowStageId)
    1520    {
     
    3237        }
    3338
    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        );
    3545
    3646        return null;
  • easycontent/trunk/app/rest/actions/GetArticleDetails.php

    r2189682 r2355111  
    2222    {
    2323        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 );
    2529        } catch (\Exception $e) {
    2630            return new \WP_Error( $e->getCode(), $e->getMessage() );
  • easycontent/trunk/app/rest/actions/PublishArticle.php

    r2285656 r2355111  
    4545            }
    4646
    47             return new \WP_REST_Response( $post->getFrontendData(), 201 );
     47            return new \WP_REST_Response( $post->getFrontendData() ?: new \stdClass(), 201 );
    4848        } catch ( \Exception $e ) {
    4949            return new \WP_Error( $e->getCode(), $e->getMessage() );
  • easycontent/trunk/app/rest/actions/PullArticle.php

    r2194825 r2355111  
    3434            }
    3535
    36             return $post->pull();
     36            return new \WP_REST_Response( $post->pull() ?: new \stdClass() );
    3737        } catch ( BadResponseException $e ) {
    3838            $ecException = new EasyContentResponseException( $e );
  • easycontent/trunk/app/rest/actions/PushPost.php

    r2189682 r2355111  
    3434
    3535            $post = new Post( (int)$request['post_id'] );
    36             return $post->push();
     36            return new \WP_REST_Response( $post->push() ?: new \stdClass() );
    3737        } catch ( BadResponseException $e ) {
    3838            $ecException = new EasyContentResponseException( $e );
  • easycontent/trunk/app/rest/actions/SetArticleWorkflowStage.php

    r2190570 r2355111  
    4444
    4545            $relatedArticle = $post->getArticle();
     46
    4647            if ( ! $relatedArticle ) {
    4748                throw new \Exception( __( 'This post was not synchronized yet', EASYCONTENT_TXTDOMAIN ), 16 );
     
    4950
    5051            $currentWorkflowStage = $relatedArticle->getCurrentWorkflowStage();
     52
    5153            if ( ! $currentWorkflowStage ) {
    5254                throw new \Exception( __( 'Data misconfiguration', EASYCONTENT_TXTDOMAIN ), 17 );
     
    5557            if ( $currentWorkflowStage->id == $workflowStageId ) {
    5658                $plugin->log( 'Workflow stage ID was not changed. Returning...' );
    57 
    58                 return null;
     59                return new \WP_REST_Response( null, 204 );
    5960            }
    6061
    6162            $workflowStage = WorkflowStage::findByKey( $workflowStageId );
     63
    6264            if ( ! $workflowStage ) {
    6365                throw new \Exception( __( 'This workflow stage does not exist', EASYCONTENT_TXTDOMAIN ), 18 );
    6466            }
    6567
    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 );
    6771        } catch (\Exception $e) {
    6872            $plugin->log( 'Error during setting new article workflow stage: ' . $e->getMessage() );
  • easycontent/trunk/app/rest/actions/UnlinkPost.php

    r2189682 r2355111  
    2626        try {
    2727            ArticlePost::deleteByPrimaryKey( (int)$request['post_id'], 'post_id' );
     28
     29            return new \WP_REST_Response( null, 204 );
    2830        } catch ( \Exception $e ) {
    2931            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;
    22/*!
    33  Copyright (c) 2017 Jed Watson.
  • easycontent/trunk/easycontent-wp.php

    r2340904 r2355111  
    44 * Plugin URI:  https://easycontent.io
    55 * Description: Imports articles from EasyContent to your wordpress site and exports articles from your wordpress site to EasyContent
    6  * Version: 1.0.5
     6 * Version: 1.0.6
    77 * Requires at least: 5.0.7
    88 * Requires PHP: 5.6
     
    2121
    2222if ( ! defined( 'EASYCONTENT_PLUGIN_VERSION' ) ) {
    23     define( 'EASYCONTENT_PLUGIN_VERSION', '1.0.5' );
     23    define( 'EASYCONTENT_PLUGIN_VERSION', '1.0.6' );
    2424}
    2525
  • easycontent/trunk/languages/easycontent-wp-en_US.po

    r2189682 r2355111  
    22msgstr ""
    33"Project-Id-Version: EasyContent WordPress Plugin\n"
    4 "POT-Creation-Date: 2019-10-30 15:38+0200\n"
    5 "PO-Revision-Date: 2019-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"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 2.2.4\n"
     12"X-Generator: Poedit 2.3.1\n"
    1313"X-Poedit-Basepath: ..\n"
    1414"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"
    1616"X-Poedit-SearchPath-0: app\n"
    1717"X-Poedit-SearchPath-1: views\n"
     
    2525msgstr ""
    2626
    27 #: app/Attachment.php:40 app/Post.php:50
     27#: app/Attachment.php:40 app/Post.php:52
    2828msgid "Invalid post type"
    2929msgstr ""
     
    3333msgstr ""
    3434
    35 #: app/ListTableManager.php:121
     35#: app/ListTableManager.php:123
    3636#, php-format
    3737msgid "%d article has been successfully pulled from EasyContent"
    3838msgstr ""
    3939
    40 #: app/ListTableManager.php:127
     40#: app/ListTableManager.php:129
    4141#, php-format
    4242msgid "%d article has been successfully pushed to EasyContent"
    4343msgstr ""
    4444
    45 #: app/Post.php:37
     45#: app/Post.php:39
    4646msgid "Invalid post ID"
    4747msgstr ""
    4848
    49 #: app/Post.php:44
     49#: app/Post.php:46
    5050msgid "Error during post fetching"
    5151msgstr ""
    5252
    53 #: app/Post.php:119
     53#: app/Post.php:127
    5454msgid "Post was not synchronized. Push first!"
    5555msgstr ""
    5656
    57 #: app/Post.php:135
     57#: app/Post.php:143
    5858msgid "Unable to find article on EasyContent.io"
    5959msgstr ""
    6060
    61 #: app/Post.php:148
     61#: app/Post.php:155
    6262msgid "Error during saving remote post data"
    6363msgstr ""
    6464
    65 #: app/Post.php:169 app/Post.php:212 app/Post.php:222
     65#: app/Post.php:183 app/Post.php:234 app/Post.php:251
    6666msgid "Error during cache update"
    6767msgstr ""
     
    184184
    185185#: 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
    186188msgid "N/A"
    187189msgstr ""
     
    212214msgstr ""
    213215
    214 #: app/db/DbController.php:126 app/db/DbController.php:139
     216#: app/db/DbController.php:125 app/db/DbController.php:138
    215217msgid "Error occurred, please try again later"
    216218msgstr ""
     
    245247msgstr ""
    246248
    247 #: app/forms/handlers/RefreshAllDataFormHandler.php:42
     249#: app/forms/handlers/RefreshAllDataFormHandler.php:48
    248250msgid "All data has been updated"
    249251msgstr ""
    250252
     253#: app/helpers/ArticleWorkflowStageUpdater.php:28
     254msgid "Remote article doesn't exist"
     255msgstr ""
     256
    251257#: app/helpers/TimeHelper.php:18
    252258#, php-format
     
    289295msgstr ""
    290296
    291 #: app/pages/PagesManager.php:25 app/pages/PagesManager.php:26
    292 #: app/pages/PagesManager.php:36
     297#: app/metaboxes/PostSyncMetaBox.php:14 app/pages/PagesManager.php:25
     298#: app/pages/PagesManager.php:26 app/pages/PagesManager.php:36
    293299msgid "EasyContent"
    294300msgstr ""
     
    355361msgstr ""
    356362
    357 #: app/rest/actions/PullArticle.php:30
     363#: app/rest/actions/PullArticle.php:33
    358364msgid "Invalid article ID"
     365msgstr ""
     366
     367#: app/rest/actions/PullArticle.php:41 app/rest/actions/PushPost.php:41
     368#, php-format
     369msgid ""
     370"Remote article was not found in %s project. Do you want to unlink it from "
     371"this post? "
     372msgstr ""
     373
     374#: app/rest/actions/PullArticle.php:42 app/rest/actions/PushPost.php:42
     375msgid ""
     376"If you unlink it and then push this post to EasyContent, a new article will "
     377"be created."
    359378msgstr ""
    360379
     
    365384msgstr ""
    366385
    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
    381387msgid "Invalid workflow stage ID"
    382388msgstr ""
    383389
    384 #: app/rest/actions/SetArticleWorkflowStage.php:51
     390#: app/rest/actions/SetArticleWorkflowStage.php:47
    385391msgid "This post was not synchronized yet"
    386392msgstr ""
    387393
    388 #: app/rest/actions/SetArticleWorkflowStage.php:56
     394#: app/rest/actions/SetArticleWorkflowStage.php:52
    389395msgid "Data misconfiguration"
    390396msgstr ""
    391397
    392 #: app/rest/actions/SetArticleWorkflowStage.php:67
     398#: app/rest/actions/SetArticleWorkflowStage.php:63
    393399msgid "This workflow stage does not exist"
    394 msgstr ""
    395 
    396 #: app/rest/actions/SetArticleWorkflowStage.php:81
    397 msgid "Remote article doesn't exist"
    398400msgstr ""
    399401
     
    423425msgstr ""
    424426
     427#: views/admin/metaboxes/post-sync.php:10
     428msgid "Item"
     429msgstr ""
     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
     434msgid "Status"
     435msgstr ""
     436
     437#: views/admin/metaboxes/post-sync.php:31 views/admin/pages/connection.php:69
     438msgid "Change"
     439msgstr ""
     440
     441#: views/admin/metaboxes/post-sync.php:62
     442msgid "Last Updated"
     443msgstr ""
     444
     445#: views/admin/metaboxes/post-sync.php:73
     446#: views/admin/metaboxes/post-sync.php:77
     447msgid "Pull"
     448msgstr ""
     449
     450#: views/admin/metaboxes/post-sync.php:82
     451msgid "Push"
     452msgstr ""
     453
     454#: views/admin/metaboxes/post-sync.php:88
     455msgid ""
     456"Are you sure you want to push this post to EasyContent? Any changes in "
     457"EasyContent will be overwritten."
     458msgstr ""
     459
     460#: views/admin/metaboxes/post-sync.php:90
     461msgid "Push this post to EasyContent?"
     462msgstr ""
     463
     464#: views/admin/metaboxes/post-sync.php:96
     465msgid ""
     466"Are you sure you want to pull this Post from EasyContent? Any local changes "
     467"will be overwritten."
     468msgstr ""
     469
    425470#: views/admin/notices/db-is-not-up-to-date.php:10
    426471msgid "Your database is not up to date!"
     
    443488msgstr ""
    444489
    445 #: views/admin/pages/connection.php:24
     490#: views/admin/pages/connection.php:26
    446491msgid "Set up your connection with EasyContent. You can find the instructions"
    447492msgstr ""
    448493
    449 #: views/admin/pages/connection.php:25
     494#: views/admin/pages/connection.php:28
    450495msgid "here"
    451496msgstr ""
    452497
    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
     499msgid "API Key"
     500msgstr ""
     501
     502#: views/admin/pages/connection.php:61
     503msgid "Current site URL"
     504msgstr ""
     505
     506#: views/admin/pages/connection.php:80
     507msgid "Please enter current site URL"
     508msgstr ""
     509
     510#: views/admin/pages/connection.php:91
     511msgid "How to get your API key?"
     512msgstr ""
     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
    468517msgid "Save Changes"
    469518msgstr ""
    470519
    471 #: views/admin/pages/connection.php:83
     520#: views/admin/pages/connection.php:103
    472521msgid "Proceed to publishing options"
    473522msgstr ""
     
    493542msgstr ""
    494543
    495 #: views/admin/pages/import.php:38 views/admin/pages/import.php:57
     544#: views/admin/pages/import.php:38 views/admin/pages/import.php:60
    496545msgid "Import selected items"
    497546msgstr ""
    498547
    499 #: views/admin/pages/import.php:42 views/admin/pages/import.php:61
     548#: views/admin/pages/import.php:42 views/admin/pages/import.php:64
    500549msgid "On import, change EasyContent status to"
    501550msgstr ""
    502551
    503 #: views/admin/pages/import.php:45 views/admin/pages/import.php:64
     552#: views/admin/pages/import.php:45 views/admin/pages/import.php:67
    504553msgid "Don't change status"
    505554msgstr ""
     
    510559msgstr ""
    511560
    512 #: views/admin/pages/import/table-filters.php:22
    513 msgid "Status"
    514 msgstr ""
    515 
    516561#: views/admin/pages/import/table-filters.php:24
    517562msgid "All statuses"
    518563msgstr ""
    519564
    520 #: views/admin/pages/import/table-filters.php:33
     565#: views/admin/pages/import/table-filters.php:34
    521566msgid "Synchronization status"
    522567msgstr ""
    523568
    524 #: views/admin/pages/import/table-filters.php:35
     569#: views/admin/pages/import/table-filters.php:36
    525570msgid "All items"
    526571msgstr ""
    527572
    528 #: views/admin/pages/import/table-filters.php:37
     573#: views/admin/pages/import/table-filters.php:38
    529574msgid "Synced"
    530575msgstr ""
    531576
    532 #: views/admin/pages/import/table-filters.php:40
     577#: views/admin/pages/import/table-filters.php:41
    533578msgid "Not synced"
    534579msgstr ""
    535580
    536 #: views/admin/pages/import/table-filters.php:44
     581#: views/admin/pages/import/table-filters.php:45
    537582msgid "Filter"
    538583msgstr ""
     
    553598msgstr ""
    554599
    555 #: views/admin/pages/publishing-options.php:52
     600#: views/admin/pages/publishing-options.php:53
    556601msgid "No users available"
    557602msgstr ""
    558603
    559 #: views/admin/pages/publishing-options.php:58
     604#: views/admin/pages/publishing-options.php:59
    560605msgid "Post type"
    561606msgstr ""
    562607
    563 #: views/admin/pages/publishing-options.php:63
     608#: views/admin/pages/publishing-options.php:64
    564609msgid "post"
    565610msgstr ""
    566611
    567 #: views/admin/pages/publishing-options.php:66
     612#: views/admin/pages/publishing-options.php:67
    568613msgid "page"
    569614msgstr ""
    570615
    571 #: views/admin/pages/publishing-options.php:73
     616#: views/admin/pages/publishing-options.php:74
    572617msgid "Post status"
    573618msgstr ""
    574619
    575 #: views/admin/pages/publishing-options.php:78
     620#: views/admin/pages/publishing-options.php:79
    576621msgid "publish"
    577622msgstr ""
    578623
    579 #: views/admin/pages/publishing-options.php:81
     624#: views/admin/pages/publishing-options.php:82
    580625msgid "draft"
    581626msgstr ""
    582627
    583 #: views/admin/pages/publishing-options.php:84
     628#: views/admin/pages/publishing-options.php:85
    584629msgid "pending"
    585630msgstr ""
    586631
    587 #: views/admin/pages/publishing-options.php:87
     632#: views/admin/pages/publishing-options.php:88
    588633msgid "private"
    589634msgstr ""
    590635
    591 #: views/admin/pages/publishing-options.php:94
     636#: views/admin/pages/publishing-options.php:95
    592637msgid "Comments status"
    593638msgstr ""
    594639
    595 #: views/admin/pages/publishing-options.php:99
     640#: views/admin/pages/publishing-options.php:100
    596641msgid "open"
    597642msgstr ""
    598643
    599 #: views/admin/pages/publishing-options.php:102
     644#: views/admin/pages/publishing-options.php:103
    600645msgid "closed"
    601646msgstr ""
    602647
    603 #: views/admin/pages/publishing-options.php:111
     648#: views/admin/pages/publishing-options.php:112
    604649msgid "Map your WordPress categories to EasyContent categories (optional)"
    605650msgstr ""
    606651
    607 #: views/admin/pages/publishing-options.php:112
     652#: views/admin/pages/publishing-options.php:113
    608653msgid ""
    609654"After mapping all posts with the selected EasyContent category will be "
     
    612657msgstr ""
    613658
    614 #: views/admin/pages/publishing-options.php:117
     659#: views/admin/pages/publishing-options.php:118
    615660msgid "WordPress category"
    616661msgstr ""
    617662
    618 #: views/admin/pages/publishing-options.php:118
     663#: views/admin/pages/publishing-options.php:119
    619664msgid "EasyContent category"
    620665msgstr ""
    621666
    622 #: views/admin/pages/publishing-options.php:130
     667#: views/admin/pages/publishing-options.php:131
    623668msgid "Assign default WP category when there is no mapping"
    624669msgstr ""
  • easycontent/trunk/readme.txt

    r2340910 r2355111  
    44Tags:               easycontent, easy content, workflow, approval, collaboration, import, export, manage writers, publishing, content flow, editorial, approval process, content tool
    55Requires at least:  5.0.7
    6 Tested up to:       5.3
     6Tested up to:       5.5
    77Requires PHP:       5.6
    8 Stable tag:         1.0.5
     8Stable tag:         1.0.6
    99License:            GPL-2.0+
    1010License URI:        http://www.gnu.org/licenses/gpl-2.0.html
     
    6161== Changelog ==
    6262
     63= 1.0.6 =
     64* Added ability to push drafted post to EasyContent.io
     65* Better Rest API support in Gutenberg editor
     66
    6367= 1.0.5 =
    6468* Better EasyContent.io integration
  • easycontent/trunk/vendor/autoload.php

    r2327436 r2355111  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit29369553b2966c8e493a5d9065972d63::getLoader();
     7return ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad::getLoader();
  • easycontent/trunk/vendor/composer/autoload_real.php

    r2327436 r2355111  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit29369553b2966c8e493a5d9065972d63
     5class ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit29369553b2966c8e493a5d9065972d63', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInit29369553b2966c8e493a5d9065972d63', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit54aed42cfa417ec4213926972db643ad', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require_once __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInit29369553b2966c8e493a5d9065972d63::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit54aed42cfa417ec4213926972db643ad::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5252
    5353        if ($useStaticLoader) {
    54             $includeFiles = Composer\Autoload\ComposerStaticInit29369553b2966c8e493a5d9065972d63::$files;
     54            $includeFiles = Composer\Autoload\ComposerStaticInit54aed42cfa417ec4213926972db643ad::$files;
    5555        } else {
    5656            $includeFiles = require __DIR__ . '/autoload_files.php';
    5757        }
    5858        foreach ($includeFiles as $fileIdentifier => $file) {
    59             composerRequire29369553b2966c8e493a5d9065972d63($fileIdentifier, $file);
     59            composerRequire54aed42cfa417ec4213926972db643ad($fileIdentifier, $file);
    6060        }
    6161
     
    6464}
    6565
    66 function composerRequire29369553b2966c8e493a5d9065972d63($fileIdentifier, $file)
     66function composerRequire54aed42cfa417ec4213926972db643ad($fileIdentifier, $file)
    6767{
    6868    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • easycontent/trunk/vendor/composer/autoload_static.php

    r2327436 r2355111  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit29369553b2966c8e493a5d9065972d63
     7class ComposerStaticInit54aed42cfa417ec4213926972db643ad
    88{
    99    public static $files = array (
     
    16181618    {
    16191619        return \Closure::bind(function () use ($loader) {
    1620             $loader->prefixLengthsPsr4 = ComposerStaticInit29369553b2966c8e493a5d9065972d63::$prefixLengthsPsr4;
    1621             $loader->prefixDirsPsr4 = ComposerStaticInit29369553b2966c8e493a5d9065972d63::$prefixDirsPsr4;
    1622             $loader->classMap = ComposerStaticInit29369553b2966c8e493a5d9065972d63::$classMap;
     1620            $loader->prefixLengthsPsr4 = ComposerStaticInit54aed42cfa417ec4213926972db643ad::$prefixLengthsPsr4;
     1621            $loader->prefixDirsPsr4 = ComposerStaticInit54aed42cfa417ec4213926972db643ad::$prefixDirsPsr4;
     1622            $loader->classMap = ComposerStaticInit54aed42cfa417ec4213926972db643ad::$classMap;
    16231623
    16241624        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.