Version Description
- 2020-12-17
Download this release
Release Info
Developer | codeinwp |
Plugin | Revive Old Posts – Auto Post to Social Media |
Version | 8.6.4 |
Comparing to | |
See all releases |
Code changes from version 8.6.3 to 8.6.4
- CHANGELOG.md +8 -0
- assets/js/build/dashboard.js +2 -3
- assets/js/build/dashboard.min.js +1 -1
- includes/admin/class-rop-admin.php +35 -2
- includes/admin/services/class-rop-facebook-service.php +99 -100
- includes/admin/services/class-rop-gmb-service.php +6 -1
- includes/admin/services/class-rop-linkedin-service.php +55 -22
- includes/admin/services/class-rop-pinterest-service.php +4 -1
- includes/admin/services/class-rop-tumblr-service.php +4 -2
- includes/admin/services/class-rop-twitter-service.php +3 -1
- includes/admin/services/class-rop-vk-service.php +6 -0
- includes/class-rop-i18n.php +4 -1
- includes/class-rop.php +1 -1
- readme.md +43 -3
- readme.txt +43 -3
- themeisle-hash.json +1 -1
- tweet-old-post.php +10 -4
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +5 -5
CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v8.6.3 - 2020-12-08
|
3 |
**Changes:**
|
4 |
* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
|
1 |
|
2 |
+
### v8.6.4 - 2020-12-17
|
3 |
+
**Changes:**
|
4 |
+
* Change: Show admin notices only to users with 'manage_options' capability.
|
5 |
+
* Change: Skip sharing on websites where 'wp_get_environment_type()' doesn't return 'production'
|
6 |
+
* Change Pro: Fallback to article post share when no featured image is set and "Share as Image Post" option is checked in Post format settings.
|
7 |
+
* Change Pro: Limit the LinkedIn refresh token notification to 5 emails max.
|
8 |
+
* Info: Tested on WP 5.6
|
9 |
+
|
10 |
### v8.6.3 - 2020-12-08
|
11 |
**Changes:**
|
12 |
* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
|
assets/js/build/dashboard.js
CHANGED
@@ -34937,8 +34937,7 @@ module.exports = {
|
|
34937 |
//
|
34938 |
// <countdown :current_time="current_time"/>
|
34939 |
//
|
34940 |
-
// <div id="staging-status" v-if="staging">
|
34941 |
-
// {{labels.staging_status}}
|
34942 |
// </div>
|
34943 |
// <div v-if="!haveAccounts" class="rop-spacer"></div>
|
34944 |
// <div v-if="haveAccounts">
|
@@ -43529,7 +43528,7 @@ module.exports = "\n\t<div class=\"toast rop-next-share-time\" v-if=\"isOn && ac
|
|
43529 |
/* 312 */
|
43530 |
/***/ (function(module, exports) {
|
43531 |
|
43532 |
-
module.exports = "\n <div>\n <div class=\"columns panel-header\">\n <div class=\"column header-logo vertical-align\" v-if=\"is_preloading_over > 0\">\n <div>\n <img :src=\"plugin_logo\" class=\"plugin-logo avatar avatar-lg\"/>\n <h1 class=\"plugin-title d-inline-block\">Revive Old Posts</h1><span class=\"powered d-inline-block\"> {{labels.by}} <a\n href=\"https://revive.social\" target=\"_blank\"><b>Revive.Social</b></a></span>\n </div>\n </div>\n <toast/>\n <div v-if=\" is_rest_api_error \" class=\"toast toast-error rop-api-not-available\" v-html=\"labels.api_not_available\">\n </div>\n <div v-if=\" is_fb_domain_notice \" class=\"toast toast-primary\">\n <button class=\"btn btn-clear float-right\" @click=\"close_fb_domain_notice()\"></button>\n <div v-html=\"labels.rop_facebook_domain_toast\"></div>\n </div>\n <div class=\"sidebar sidebar-top card rop-container-start\">\n\n <!-- Next post count down -->\n <countdown :current_time=\"current_time\"/>\n <!-- -->\n\n <button class=\"btn btn-sm\" :class=\"btn_class\"\n :data-tooltip=\"labels.active_account_warning\"\n @click=\"togglePosting()\" :disabled=\"!haveAccountsActive\">\n <i class=\"fa fa-play\" v-if=\"!is_loading && !start_status\"></i>\n <i class=\"fa fa-stop\" v-else-if=\"!is_loading && start_status\"></i>\n <i class=\"fa fa-spinner fa-spin\" v-else></i>\n {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n </div>\n </div>\n\n <div class=\"columns\">\n <div class=\"panel column col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12\">\n <div class=\"panel-nav\" style=\"padding: 8px;\" v-if=\"is_preloading_over > 0\">\n <ul class=\"tab \">\n <li class=\"tab-item c-hand\" v-for=\"tab in displayTabs\"\n :class=\"{ active: tab.isActive }\" v-bind:id=\"tab.name.replace(' ', '').toLowerCase()\">\n <a :class=\" ( tab.slug === 'logs' && logs_no > 0 ) ? ' badge-logs badge' : '' \"\n :data-badge=\"logs_no\"\n @click=\"switchTab( tab.slug )\">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n <component :is=\"page.template\" :type=\"page.view\"></component>\n </div>\n\n <div class=\"sidebar column col-3 col-xs-12 col-sm-12 col-md-12 col-lg-12\"\n :class=\"'rop-license-plan-'+license\" v-if=\"is_preloading_over > 0\">\n\n <div class=\"card rop-container-start\">\n <button id=\"rop_start_stop_btn\" class=\"btn\" :class=\"btn_class\"\n :data-tooltip=\"labels.active_account_warning\"\n @click=\"togglePosting()\" :disabled=\"!haveAccountsActive\">\n <i class=\"fa fa-play\" v-if=\"!is_loading && !start_status\"></i>\n <i class=\"fa fa-stop\" v-else-if=\"!is_loading && start_status\"></i>\n <i class=\"fa fa-spinner fa-spin\" v-else></i>\n {{labels.click}} {{labels.to}} {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n\n <div class=\"sharing-box\" :class=\"status_color_class\">{{ status_label_display }}</div>\n\n <countdown :current_time=\"current_time\"/>\n\n <div id=\"staging-status\" v-if=\"staging\"
|
43533 |
|
43534 |
/***/ })
|
43535 |
/******/ ]);
|
34937 |
//
|
34938 |
// <countdown :current_time="current_time"/>
|
34939 |
//
|
34940 |
+
// <div id="staging-status" v-if="staging" v-html="labels.staging_status">
|
|
|
34941 |
// </div>
|
34942 |
// <div v-if="!haveAccounts" class="rop-spacer"></div>
|
34943 |
// <div v-if="haveAccounts">
|
43528 |
/* 312 */
|
43529 |
/***/ (function(module, exports) {
|
43530 |
|
43531 |
+
module.exports = "\n <div>\n <div class=\"columns panel-header\">\n <div class=\"column header-logo vertical-align\" v-if=\"is_preloading_over > 0\">\n <div>\n <img :src=\"plugin_logo\" class=\"plugin-logo avatar avatar-lg\"/>\n <h1 class=\"plugin-title d-inline-block\">Revive Old Posts</h1><span class=\"powered d-inline-block\"> {{labels.by}} <a\n href=\"https://revive.social\" target=\"_blank\"><b>Revive.Social</b></a></span>\n </div>\n </div>\n <toast/>\n <div v-if=\" is_rest_api_error \" class=\"toast toast-error rop-api-not-available\" v-html=\"labels.api_not_available\">\n </div>\n <div v-if=\" is_fb_domain_notice \" class=\"toast toast-primary\">\n <button class=\"btn btn-clear float-right\" @click=\"close_fb_domain_notice()\"></button>\n <div v-html=\"labels.rop_facebook_domain_toast\"></div>\n </div>\n <div class=\"sidebar sidebar-top card rop-container-start\">\n\n <!-- Next post count down -->\n <countdown :current_time=\"current_time\"/>\n <!-- -->\n\n <button class=\"btn btn-sm\" :class=\"btn_class\"\n :data-tooltip=\"labels.active_account_warning\"\n @click=\"togglePosting()\" :disabled=\"!haveAccountsActive\">\n <i class=\"fa fa-play\" v-if=\"!is_loading && !start_status\"></i>\n <i class=\"fa fa-stop\" v-else-if=\"!is_loading && start_status\"></i>\n <i class=\"fa fa-spinner fa-spin\" v-else></i>\n {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n </div>\n </div>\n\n <div class=\"columns\">\n <div class=\"panel column col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12\">\n <div class=\"panel-nav\" style=\"padding: 8px;\" v-if=\"is_preloading_over > 0\">\n <ul class=\"tab \">\n <li class=\"tab-item c-hand\" v-for=\"tab in displayTabs\"\n :class=\"{ active: tab.isActive }\" v-bind:id=\"tab.name.replace(' ', '').toLowerCase()\">\n <a :class=\" ( tab.slug === 'logs' && logs_no > 0 ) ? ' badge-logs badge' : '' \"\n :data-badge=\"logs_no\"\n @click=\"switchTab( tab.slug )\">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n <component :is=\"page.template\" :type=\"page.view\"></component>\n </div>\n\n <div class=\"sidebar column col-3 col-xs-12 col-sm-12 col-md-12 col-lg-12\"\n :class=\"'rop-license-plan-'+license\" v-if=\"is_preloading_over > 0\">\n\n <div class=\"card rop-container-start\">\n <button id=\"rop_start_stop_btn\" class=\"btn\" :class=\"btn_class\"\n :data-tooltip=\"labels.active_account_warning\"\n @click=\"togglePosting()\" :disabled=\"!haveAccountsActive\">\n <i class=\"fa fa-play\" v-if=\"!is_loading && !start_status\"></i>\n <i class=\"fa fa-stop\" v-else-if=\"!is_loading && start_status\"></i>\n <i class=\"fa fa-spinner fa-spin\" v-else></i>\n {{labels.click}} {{labels.to}} {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n\n <div class=\"sharing-box\" :class=\"status_color_class\">{{ status_label_display }}</div>\n\n <countdown :current_time=\"current_time\"/>\n\n <div id=\"staging-status\" v-if=\"staging\" v-html=\"labels.staging_status\">\n </div>\n <div v-if=\"!haveAccounts\" class=\"rop-spacer\"></div>\n <div v-if=\"haveAccounts\">\n <upsell-sidebar></upsell-sidebar>\n </div>\n <a v-if=\"license >= 1\" href=\"https://revive.social/pro-support/\" target=\"_blank\" class=\"btn rop-sidebar-action-btns\">{{labels.rop_support}}</a>\n <a v-if=\"license < 1\" href=\"https://revive.social/support/\" target=\"_blank\" class=\"btn rop-sidebar-action-btns\">{{labels.rop_support}}</a>\n <a v-if=\"haveAccounts\" href=\"https://docs.revive.social/\" target=\"_blank\"\n class=\"btn rop-sidebar-action-btns\">{{labels.rop_docs}}</a>\n <a v-if=\"haveAccounts\"\n href=\"https://wordpress.org/support/plugin/tweet-old-post/reviews/?rate=5#new-post\"\n target=\"_blank\" class=\"btn rop-sidebar-action-btns\">{{labels.review_it}}</a>\n </div>\n\n </div>\n </div>\n </div>\n";
|
43532 |
|
43533 |
/***/ })
|
43534 |
/******/ ]);
|
assets/js/build/dashboard.min.js
CHANGED
@@ -23,4 +23,4 @@ var ot=2;a.reject=function(t){return new a(function(e,n){n(t)})},a.resolve=funct
|
|
23 |
* Copyright 2018 John Madhavan-Reese
|
24 |
* Released under the MIT license
|
25 |
*/
|
26 |
-
!function(r,o){s=[n(0)],a=o,void 0!==(i="function"==typeof a?a.apply(e,s):a)&&(t.exports=i),r&&(r.momentDurationFormatSetup=r.moment?o(r.moment):o)}(this,function(t){function e(t,e){return!(e.length>t.length)&&-1!==t.indexOf(e)}function n(t){for(var e="";t;)e+="0",t-=1;return e}function a(t){for(var e=t.split("").reverse(),n=0,a=!0;a&&n<e.length;)n?"9"===e[n]?e[n]="0":(e[n]=(parseInt(e[n],10)+1).toString(),a=!1):(parseInt(e[n],10)<5&&(a=!1),e[n]="0"),n+=1;return a&&e.push("1"),e.reverse().join("")}function s(t,e){var n=f(L(e).sort(),function(t){return t+":"+e[t]}).join(","),a=t+"+"+n;return s.cache[a]||(s.cache[a]=Intl.NumberFormat(t,e)),s.cache[a]}function i(t,e,r){var o=e.useToLocaleString,d=e.useGrouping,l=d&&e.grouping.slice(),c=e.maximumSignificantDigits,u=e.minimumIntegerDigits||1,_=e.fractionDigits||0,m=e.groupingSeparator,f=e.decimalSeparator;if(o&&r){var p={minimumIntegerDigits:u,useGrouping:d};if(_&&(p.maximumFractionDigits=_,p.minimumFractionDigits=_),c&&t>0&&(p.maximumSignificantDigits=c),O){if(!P){var h=b({},e);h.useGrouping=!1,h.decimalSeparator=".",t=parseFloat(i(t,h),10)}return s(r,p).format(t)}if(!A){var h=b({},e);h.useGrouping=!1,h.decimalSeparator=".",t=parseFloat(i(t,h),10)}return t.toLocaleString(r,p)}var v;v=c?t.toPrecision(c+1):t.toFixed(_+1);var y,g,M,L=v.split("e");M=L[1]||"",L=L[0].split("."),g=L[1]||"",y=L[0]||"";var k=y.length,Y=g.length,w=k+Y,D=y+g;(c&&w===c+1||!c&&Y===_+1)&&(D=a(D),D.length===w+1&&(k+=1),Y&&(D=D.slice(0,-1)),y=D.slice(0,k),g=D.slice(k)),c&&(g=g.replace(/0*$/,""));var T=parseInt(M,10);T>0?g.length<=T?(g+=n(T-g.length),y+=g,g=""):(y+=g.slice(0,T),g=g.slice(T)):T<0&&(g=n(Math.abs(T)-y.length)+y+g,y="0"),c||(g=g.slice(0,_),g.length<_&&(g+=n(_-g.length)),y.length<u&&(y=n(u-y.length)+y));var x="";if(d){L=y;for(var S;L.length;)l.length&&(S=l.shift()),x&&(x=m+x),x=L.slice(-S)+x,L=L.slice(0,-S)}else x=y;return g&&(x=x+f+g),x}function r(t,e){return t.label.length>e.label.length?-1:t.label.length<e.label.length?1:0}function o(t,e){var n=[];return m(L(e),function(a){if("_durationLabels"===a.slice(0,15)){var s=a.slice(15).toLowerCase();m(L(e[a]),function(i){i.slice(0,1)===t&&n.push({type:s,key:i,label:e[a][i]})})}}),n}function d(t,e,n){return 1===e&&null===n?t:t+t}function l(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t){return"[object Object]"===Object.prototype.toString.call(t)}function u(t,e){for(var n=t.length;n-=1;)if(e(t[n]))return t[n]}function _(t,e){var n,a=0,s=t&&t.length||0;for("function"!=typeof e&&(n=e,e=function(t){return t===n});a<s;){if(e(t[a]))return t[a];a+=1}}function m(t,e){var n=0,a=t.length;if(t&&a)for(;n<a;){if(!1===e(t[n],n))return;n+=1}}function f(t,e){var n=0,a=t.length,s=[];if(!t||!a)return s;for(;n<a;)s[n]=e(t[n],n),n+=1;return s}function p(t,e){return f(t,function(t){return t[e]})}function h(t){var e=[];return m(t,function(t){t&&e.push(t)}),e}function v(t){var e=[];return m(t,function(t){_(e,t)||e.push(t)}),e}function y(t,e){var n=[];return m(t,function(t){m(e,function(e){t===e&&n.push(t)})}),v(n)}function g(t,e){var n=[];return m(t,function(a,s){if(!e(a))return n=t.slice(s),!1}),n}function M(t,e){return g(t.slice().reverse(),e).reverse()}function b(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function L(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}function k(t,e){var n=0,a=t.length;if(!t||!a)return!1;for(;n<a;){if(!0===e(t[n],n))return!0;n+=1}return!1}function Y(t){var e=[];return m(t,function(t){e=e.concat(t)}),e}function w(t){return"3.6"===t(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function D(t){var e=!0;return e=e&&"1"===t(1,"en",{minimumIntegerDigits:1}),e=e&&"01"===t(1,"en",{minimumIntegerDigits:2}),!!(e=e&&"001"===t(1,"en",{minimumIntegerDigits:3}))&&(e=e&&"100"===t(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}),e=e&&"100.0"===t(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}),e=e&&"99.99"===t(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}),!!(e=e&&"99.990"===t(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&(e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:1}),e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:2}),e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:3}),e=e&&"99.99"===t(99.99,"en",{maximumSignificantDigits:4}),!!(e=e&&"99.99"===t(99.99,"en",{maximumSignificantDigits:5}))&&(e=e&&"1,000"===t(1e3,"en",{useGrouping:!0}),!!(e=e&&"1000"===t(1e3,"en",{useGrouping:!1})))))}function T(){var t,e=[].slice.call(arguments),n={};if(m(e,function(e,a){if(!a){if(!l(e))throw"Expected array as the first argument to durationsFormat.";t=e}return"string"==typeof e||"function"==typeof e?void(n.template=e):"number"==typeof e?void(n.precision=e):void(c(e)&&b(n,e))}),!t||!t.length)return[];n.returnMomentTypes=!0;var a=f(t,function(t){return t.format(n)}),s=y($,v(p(Y(a),"type"))),i=n.largest;return i&&(s=s.slice(0,i)),n.returnMomentTypes=!1,n.outputTypes=s,f(t,function(t){return t.format(n)})}function x(){var n=[].slice.call(arguments),a=b({},this.format.defaults),s=this.asMilliseconds(),d=this.asMonths();"function"==typeof this.isValid&&!1===this.isValid()&&(s=0,d=0);var u=s<0,Y=t.duration(Math.abs(s),"milliseconds"),w=t.duration(Math.abs(d),"months");m(n,function(t){return"string"==typeof t||"function"==typeof t?void(a.template=t):"number"==typeof t?void(a.precision=t):void(c(t)&&b(a,t))});var D={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},T={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};a.types=$;var x=function(t){return _($,function(e){return T[e].test(t)})},S=new RegExp(f($,function(t){return T[t].source}).join("|"),"g");a.duration=this;var j="function"==typeof a.template?a.template.apply(a):a.template,A=a.outputTypes,P=a.returnMomentTypes,F=a.largest,W=[];A||(l(a.stopTrim)&&(a.stopTrim=a.stopTrim.join("")),a.stopTrim&&m(a.stopTrim.match(S),function(t){var e=x(t);"escape"!==e&&"general"!==e&&W.push(e)}));var N=t.localeData();N||(N={}),m(L(C),function(t){if("function"==typeof C[t])return void(N[t]||(N[t]=C[t]));N["_"+t]||(N["_"+t]=C[t])}),m(L(N._durationTimeTemplates),function(t){j=j.replace("_"+t+"_",N._durationTimeTemplates[t])});var I=a.userLocale||t.locale(),z=a.useLeftUnits,R=a.usePlural,J=a.precision,V=a.forceLength,U=a.useGrouping,G=a.trunc,q=a.useSignificantDigits&&J>0,B=q?a.precision:0,K=B,X=a.minValue,Z=!1,Q=a.maxValue,tt=!1,et=a.useToLocaleString,nt=a.groupingSeparator,at=a.decimalSeparator,st=a.grouping;et=et&&(H||O);var it=a.trim;l(it)&&(it=it.join(" ")),null===it&&(F||Q||q)&&(it="all"),null!==it&&!0!==it&&"left"!==it&&"right"!==it||(it="large"),!1===it&&(it="");var rt=function(t){return t.test(it)},ot=/large/,dt=/small/,lt=/both/,ct=/mid/,ut=/^all|[^sm]all/,_t=/final/,mt=F>0||k([ot,lt,ut],rt),ft=k([dt,lt,ut],rt),pt=k([ct,ut],rt),ht=k([_t,ut],rt),vt=f(j.match(S),function(t,e){var n=x(t);return"*"===t.slice(0,1)&&(t=t.slice(1),"escape"!==n&&"general"!==n&&W.push(n)),{index:e,length:t.length,text:"",token:"escape"===n?t.replace(T.escape,"$1"):t,type:"escape"===n||"general"===n?null:n}}),yt={index:0,length:0,token:"",text:"",type:null},gt=[];z&&vt.reverse(),m(vt,function(t){if(t.type)return(yt.type||yt.text)&>.push(yt),void(yt=t);z?yt.text=t.token+yt.text:yt.text+=t.token}),(yt.type||yt.text)&>.push(yt),z&>.reverse();var Mt=y($,v(h(p(gt,"type"))));if(!Mt.length)return p(gt,"text").join("");Mt=f(Mt,function(t,e){var n,s=e+1===Mt.length,i=!e;n="years"===t||"months"===t?w.as(t):Y.as(t);var r=Math.floor(n),o=n-r,d=_(gt,function(e){return t===e.type});return i&&Q&&n>Q&&(tt=!0),s&&X&&Math.abs(a.duration.as(t))<X&&(Z=!0),i&&null===V&&d.length>1&&(V=!0),Y.subtract(r,t),w.subtract(r,t),{rawValue:n,wholeValue:r,decimalValue:s?o:0,isSmallest:s,isLargest:i,type:t,tokenLength:d.length}});var bt=G?Math.floor:Math.round,Lt=function(t,e){var n=Math.pow(10,e);return bt(t*n)/n},kt=!1,Yt=!1,wt=function(t,e){var n={useGrouping:U,groupingSeparator:nt,decimalSeparator:at,grouping:st,useToLocaleString:et};return q&&(B<=0?(t.rawValue=0,t.wholeValue=0,t.decimalValue=0):(n.maximumSignificantDigits=B,t.significantDigits=B)),tt&&!Yt&&(t.isLargest?(t.wholeValue=Q,t.decimalValue=0):(t.wholeValue=0,t.decimalValue=0)),Z&&!Yt&&(t.isSmallest?(t.wholeValue=X,t.decimalValue=0):(t.wholeValue=0,t.decimalValue=0)),t.isSmallest||t.significantDigits&&t.significantDigits-t.wholeValue.toString().length<=0?J<0?t.value=Lt(t.wholeValue,J):0===J?t.value=bt(t.wholeValue+t.decimalValue):q?(t.value=G?Lt(t.rawValue,B-t.wholeValue.toString().length):t.rawValue,t.wholeValue&&(B-=t.wholeValue.toString().length)):(n.fractionDigits=J,t.value=G?t.wholeValue+Lt(t.decimalValue,J):t.wholeValue+t.decimalValue):q&&t.wholeValue?(t.value=Math.round(Lt(t.wholeValue,t.significantDigits-t.wholeValue.toString().length)),B-=t.wholeValue.toString().length):t.value=t.wholeValue,t.tokenLength>1&&(V||kt)&&(n.minimumIntegerDigits=t.tokenLength,Yt&&n.maximumSignificantDigits<t.tokenLength&&delete n.maximumSignificantDigits),!kt&&(t.value>0||""===it||_(W,t.type)||_(A,t.type))&&(kt=!0),t.formattedValue=i(t.value,n,I),n.useGrouping=!1,n.decimalSeparator=".",t.formattedValueEn=i(t.value,n,"en"),2===t.tokenLength&&"milliseconds"===t.type&&(t.formattedValueMS=i(t.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),t};if(Mt=f(Mt,wt),Mt=h(Mt),Mt.length>1){var Dt=function(t){return _(Mt,function(e){return e.type===t})};m(E,function(t){var e=Dt(t.type);e&&m(t.targets,function(t){var n=Dt(t.type);n&&parseInt(e.formattedValueEn,10)===t.value&&(e.rawValue=0,e.wholeValue=0,e.decimalValue=0,n.rawValue+=1,n.wholeValue+=1,n.decimalValue=0,n.formattedValueEn=n.wholeValue.toString(),Yt=!0)})})}return Yt&&(kt=!1,B=K,Mt=f(Mt,wt),Mt=h(Mt)),!A||tt&&!a.trim?(mt&&(Mt=g(Mt,function(t){return!t.isSmallest&&!t.wholeValue&&!_(W,t.type)})),F&&Mt.length&&(Mt=Mt.slice(0,F)),ft&&Mt.length>1&&(Mt=M(Mt,function(t){return!t.wholeValue&&!_(W,t.type)&&!t.isLargest})),pt&&(Mt=f(Mt,function(t,e){return e>0&&e<Mt.length-1&&!t.wholeValue?null:t}),Mt=h(Mt)),!ht||1!==Mt.length||Mt[0].wholeValue||!G&&Mt[0].isSmallest&&Mt[0].rawValue<X||(Mt=[])):(Mt=f(Mt,function(t){return _(A,function(e){return t.type===e})?t:null}),Mt=h(Mt)),P?Mt:(m(gt,function(t){var n=D[t.type],a=_(Mt,function(e){return e.type===t.type});if(n&&a){var s=a.formattedValueEn.split(".");s[0]=parseInt(s[0],10),s[1]?s[1]=parseFloat("0."+s[1],10):s[1]=null;var i=N.durationPluralKey(n,s[0],s[1]),d=o(n,N),l=!1,c={};m(N._durationLabelTypes,function(n){var a=_(d,function(t){return t.type===n.type&&t.key===i});a&&(c[a.type]=a.label,e(t.text,n.string)&&(t.text=t.text.replace(n.string,a.label),l=!0))}),R&&!l&&(d.sort(r),m(d,function(n){if(c[n.type]!==n.label){if(e(t.text,n.label))return t.text=t.text.replace(n.label,c[n.type]),!1}else if(e(t.text,n.label))return!1}))}}),gt=f(gt,function(t){if(!t.type)return t.text;var e=_(Mt,function(e){return e.type===t.type});if(!e)return"";var n="";return z&&(n+=t.text),(u&&tt||!u&&Z)&&(n+="< ",tt=!1,Z=!1),(u&&Z||!u&&tt)&&(n+="> ",tt=!1,Z=!1),u&&(e.value>0||""===it||_(W,e.type)||_(A,e.type))&&(n+="-",u=!1),"milliseconds"===t.type&&e.formattedValueMS?n+=e.formattedValueMS:n+=e.formattedValue,z||(n+=t.text),n}),gt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function S(){var t=this.duration,e=function(e){return t._data[e]},n=_(this.types,e),a=u(this.types,e);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===a)return"d __";case"weeks":return n===a?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===a)return"M __";case"years":return n===a?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function j(t){if(!t)throw"Moment Duration Format init cannot find moment instance.";t.duration.format=T,t.duration.fn.format=x,t.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:S,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},t.updateLocale("en",C)}var H=!1,A=!1,O=!1,P=!1,$="escape years months weeks days hours minutes seconds milliseconds general".split(" "),E=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];s.cache={};var C={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:d},F=function(t,e,n){return t.toLocaleString(e,n)};H=function(){try{(0).toLocaleString("i")}catch(t){return"RangeError"===t.name}return!1}()&&D(F),A=H&&w(F);var W=function(t,e,n){if("undefined"!=typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(e,n).format(t)};return O=D(W),P=O&&w(W),j(t),j})},function(t,e){t.exports='\n\t<div class="toast rop-next-share-time" v-if="isOn && accounts_no > 0">\n\t\t<span v-if="diff_seconds>0"> <b><i\n\t\t\t\tclass="fa fa-fast-forward"></i> {{labels.next_share}}</b> {{labels.in}}</span>\n\t\t<small v-if="timediff !== \'\'">{{timediff}}</small>\n\t</div>\n'},function(t,e){t.exports='\n <div>\n <div class="columns panel-header">\n <div class="column header-logo vertical-align" v-if="is_preloading_over > 0">\n <div>\n <img :src="plugin_logo" class="plugin-logo avatar avatar-lg"/>\n <h1 class="plugin-title d-inline-block">Revive Old Posts</h1><span class="powered d-inline-block"> {{labels.by}} <a\n href="https://revive.social" target="_blank"><b>Revive.Social</b></a></span>\n </div>\n </div>\n <toast/>\n <div v-if=" is_rest_api_error " class="toast toast-error rop-api-not-available" v-html="labels.api_not_available">\n </div>\n <div v-if=" is_fb_domain_notice " class="toast toast-primary">\n <button class="btn btn-clear float-right" @click="close_fb_domain_notice()"></button>\n <div v-html="labels.rop_facebook_domain_toast"></div>\n </div>\n <div class="sidebar sidebar-top card rop-container-start">\n\n \x3c!-- Next post count down --\x3e\n <countdown :current_time="current_time"/>\n \x3c!-- --\x3e\n\n <button class="btn btn-sm" :class="btn_class"\n :data-tooltip="labels.active_account_warning"\n @click="togglePosting()" :disabled="!haveAccountsActive">\n <i class="fa fa-play" v-if="!is_loading && !start_status"></i>\n <i class="fa fa-stop" v-else-if="!is_loading && start_status"></i>\n <i class="fa fa-spinner fa-spin" v-else></i>\n {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n </div>\n </div>\n\n <div class="columns">\n <div class="panel column col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">\n <div class="panel-nav" style="padding: 8px;" v-if="is_preloading_over > 0">\n <ul class="tab ">\n <li class="tab-item c-hand" v-for="tab in displayTabs"\n :class="{ active: tab.isActive }" v-bind:id="tab.name.replace(\' \', \'\').toLowerCase()">\n <a :class=" ( tab.slug === \'logs\' && logs_no > 0 ) ? \' badge-logs badge\' : \'\' "\n :data-badge="logs_no"\n @click="switchTab( tab.slug )">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n <component :is="page.template" :type="page.view"></component>\n </div>\n\n <div class="sidebar column col-3 col-xs-12 col-sm-12 col-md-12 col-lg-12"\n :class="\'rop-license-plan-\'+license" v-if="is_preloading_over > 0">\n\n <div class="card rop-container-start">\n <button id="rop_start_stop_btn" class="btn" :class="btn_class"\n :data-tooltip="labels.active_account_warning"\n @click="togglePosting()" :disabled="!haveAccountsActive">\n <i class="fa fa-play" v-if="!is_loading && !start_status"></i>\n <i class="fa fa-stop" v-else-if="!is_loading && start_status"></i>\n <i class="fa fa-spinner fa-spin" v-else></i>\n {{labels.click}} {{labels.to}} {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n\n <div class="sharing-box" :class="status_color_class">{{ status_label_display }}</div>\n\n <countdown :current_time="current_time"/>\n\n <div id="staging-status" v-if="staging">\n {{labels.staging_status}}\n </div>\n <div v-if="!haveAccounts" class="rop-spacer"></div>\n <div v-if="haveAccounts">\n <upsell-sidebar></upsell-sidebar>\n </div>\n <a v-if="license >= 1" href="https://revive.social/pro-support/" target="_blank" class="btn rop-sidebar-action-btns">{{labels.rop_support}}</a>\n <a v-if="license < 1" href="https://revive.social/support/" target="_blank" class="btn rop-sidebar-action-btns">{{labels.rop_support}}</a>\n <a v-if="haveAccounts" href="https://docs.revive.social/" target="_blank"\n class="btn rop-sidebar-action-btns">{{labels.rop_docs}}</a>\n <a v-if="haveAccounts"\n href="https://wordpress.org/support/plugin/tweet-old-post/reviews/?rate=5#new-post"\n target="_blank" class="btn rop-sidebar-action-btns">{{labels.review_it}}</a>\n </div>\n\n </div>\n </div>\n </div>\n'}]);
|
23 |
* Copyright 2018 John Madhavan-Reese
|
24 |
* Released under the MIT license
|
25 |
*/
|
26 |
+
!function(r,o){s=[n(0)],a=o,void 0!==(i="function"==typeof a?a.apply(e,s):a)&&(t.exports=i),r&&(r.momentDurationFormatSetup=r.moment?o(r.moment):o)}(this,function(t){function e(t,e){return!(e.length>t.length)&&-1!==t.indexOf(e)}function n(t){for(var e="";t;)e+="0",t-=1;return e}function a(t){for(var e=t.split("").reverse(),n=0,a=!0;a&&n<e.length;)n?"9"===e[n]?e[n]="0":(e[n]=(parseInt(e[n],10)+1).toString(),a=!1):(parseInt(e[n],10)<5&&(a=!1),e[n]="0"),n+=1;return a&&e.push("1"),e.reverse().join("")}function s(t,e){var n=f(L(e).sort(),function(t){return t+":"+e[t]}).join(","),a=t+"+"+n;return s.cache[a]||(s.cache[a]=Intl.NumberFormat(t,e)),s.cache[a]}function i(t,e,r){var o=e.useToLocaleString,d=e.useGrouping,l=d&&e.grouping.slice(),c=e.maximumSignificantDigits,u=e.minimumIntegerDigits||1,_=e.fractionDigits||0,m=e.groupingSeparator,f=e.decimalSeparator;if(o&&r){var p={minimumIntegerDigits:u,useGrouping:d};if(_&&(p.maximumFractionDigits=_,p.minimumFractionDigits=_),c&&t>0&&(p.maximumSignificantDigits=c),O){if(!P){var h=b({},e);h.useGrouping=!1,h.decimalSeparator=".",t=parseFloat(i(t,h),10)}return s(r,p).format(t)}if(!A){var h=b({},e);h.useGrouping=!1,h.decimalSeparator=".",t=parseFloat(i(t,h),10)}return t.toLocaleString(r,p)}var v;v=c?t.toPrecision(c+1):t.toFixed(_+1);var y,g,M,L=v.split("e");M=L[1]||"",L=L[0].split("."),g=L[1]||"",y=L[0]||"";var k=y.length,Y=g.length,w=k+Y,D=y+g;(c&&w===c+1||!c&&Y===_+1)&&(D=a(D),D.length===w+1&&(k+=1),Y&&(D=D.slice(0,-1)),y=D.slice(0,k),g=D.slice(k)),c&&(g=g.replace(/0*$/,""));var T=parseInt(M,10);T>0?g.length<=T?(g+=n(T-g.length),y+=g,g=""):(y+=g.slice(0,T),g=g.slice(T)):T<0&&(g=n(Math.abs(T)-y.length)+y+g,y="0"),c||(g=g.slice(0,_),g.length<_&&(g+=n(_-g.length)),y.length<u&&(y=n(u-y.length)+y));var x="";if(d){L=y;for(var S;L.length;)l.length&&(S=l.shift()),x&&(x=m+x),x=L.slice(-S)+x,L=L.slice(0,-S)}else x=y;return g&&(x=x+f+g),x}function r(t,e){return t.label.length>e.label.length?-1:t.label.length<e.label.length?1:0}function o(t,e){var n=[];return m(L(e),function(a){if("_durationLabels"===a.slice(0,15)){var s=a.slice(15).toLowerCase();m(L(e[a]),function(i){i.slice(0,1)===t&&n.push({type:s,key:i,label:e[a][i]})})}}),n}function d(t,e,n){return 1===e&&null===n?t:t+t}function l(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t){return"[object Object]"===Object.prototype.toString.call(t)}function u(t,e){for(var n=t.length;n-=1;)if(e(t[n]))return t[n]}function _(t,e){var n,a=0,s=t&&t.length||0;for("function"!=typeof e&&(n=e,e=function(t){return t===n});a<s;){if(e(t[a]))return t[a];a+=1}}function m(t,e){var n=0,a=t.length;if(t&&a)for(;n<a;){if(!1===e(t[n],n))return;n+=1}}function f(t,e){var n=0,a=t.length,s=[];if(!t||!a)return s;for(;n<a;)s[n]=e(t[n],n),n+=1;return s}function p(t,e){return f(t,function(t){return t[e]})}function h(t){var e=[];return m(t,function(t){t&&e.push(t)}),e}function v(t){var e=[];return m(t,function(t){_(e,t)||e.push(t)}),e}function y(t,e){var n=[];return m(t,function(t){m(e,function(e){t===e&&n.push(t)})}),v(n)}function g(t,e){var n=[];return m(t,function(a,s){if(!e(a))return n=t.slice(s),!1}),n}function M(t,e){return g(t.slice().reverse(),e).reverse()}function b(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function L(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}function k(t,e){var n=0,a=t.length;if(!t||!a)return!1;for(;n<a;){if(!0===e(t[n],n))return!0;n+=1}return!1}function Y(t){var e=[];return m(t,function(t){e=e.concat(t)}),e}function w(t){return"3.6"===t(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function D(t){var e=!0;return e=e&&"1"===t(1,"en",{minimumIntegerDigits:1}),e=e&&"01"===t(1,"en",{minimumIntegerDigits:2}),!!(e=e&&"001"===t(1,"en",{minimumIntegerDigits:3}))&&(e=e&&"100"===t(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}),e=e&&"100.0"===t(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}),e=e&&"99.99"===t(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}),!!(e=e&&"99.990"===t(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&(e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:1}),e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:2}),e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:3}),e=e&&"99.99"===t(99.99,"en",{maximumSignificantDigits:4}),!!(e=e&&"99.99"===t(99.99,"en",{maximumSignificantDigits:5}))&&(e=e&&"1,000"===t(1e3,"en",{useGrouping:!0}),!!(e=e&&"1000"===t(1e3,"en",{useGrouping:!1})))))}function T(){var t,e=[].slice.call(arguments),n={};if(m(e,function(e,a){if(!a){if(!l(e))throw"Expected array as the first argument to durationsFormat.";t=e}return"string"==typeof e||"function"==typeof e?void(n.template=e):"number"==typeof e?void(n.precision=e):void(c(e)&&b(n,e))}),!t||!t.length)return[];n.returnMomentTypes=!0;var a=f(t,function(t){return t.format(n)}),s=y($,v(p(Y(a),"type"))),i=n.largest;return i&&(s=s.slice(0,i)),n.returnMomentTypes=!1,n.outputTypes=s,f(t,function(t){return t.format(n)})}function x(){var n=[].slice.call(arguments),a=b({},this.format.defaults),s=this.asMilliseconds(),d=this.asMonths();"function"==typeof this.isValid&&!1===this.isValid()&&(s=0,d=0);var u=s<0,Y=t.duration(Math.abs(s),"milliseconds"),w=t.duration(Math.abs(d),"months");m(n,function(t){return"string"==typeof t||"function"==typeof t?void(a.template=t):"number"==typeof t?void(a.precision=t):void(c(t)&&b(a,t))});var D={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},T={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};a.types=$;var x=function(t){return _($,function(e){return T[e].test(t)})},S=new RegExp(f($,function(t){return T[t].source}).join("|"),"g");a.duration=this;var j="function"==typeof a.template?a.template.apply(a):a.template,A=a.outputTypes,P=a.returnMomentTypes,F=a.largest,W=[];A||(l(a.stopTrim)&&(a.stopTrim=a.stopTrim.join("")),a.stopTrim&&m(a.stopTrim.match(S),function(t){var e=x(t);"escape"!==e&&"general"!==e&&W.push(e)}));var N=t.localeData();N||(N={}),m(L(C),function(t){if("function"==typeof C[t])return void(N[t]||(N[t]=C[t]));N["_"+t]||(N["_"+t]=C[t])}),m(L(N._durationTimeTemplates),function(t){j=j.replace("_"+t+"_",N._durationTimeTemplates[t])});var I=a.userLocale||t.locale(),z=a.useLeftUnits,R=a.usePlural,J=a.precision,V=a.forceLength,U=a.useGrouping,G=a.trunc,q=a.useSignificantDigits&&J>0,B=q?a.precision:0,K=B,X=a.minValue,Z=!1,Q=a.maxValue,tt=!1,et=a.useToLocaleString,nt=a.groupingSeparator,at=a.decimalSeparator,st=a.grouping;et=et&&(H||O);var it=a.trim;l(it)&&(it=it.join(" ")),null===it&&(F||Q||q)&&(it="all"),null!==it&&!0!==it&&"left"!==it&&"right"!==it||(it="large"),!1===it&&(it="");var rt=function(t){return t.test(it)},ot=/large/,dt=/small/,lt=/both/,ct=/mid/,ut=/^all|[^sm]all/,_t=/final/,mt=F>0||k([ot,lt,ut],rt),ft=k([dt,lt,ut],rt),pt=k([ct,ut],rt),ht=k([_t,ut],rt),vt=f(j.match(S),function(t,e){var n=x(t);return"*"===t.slice(0,1)&&(t=t.slice(1),"escape"!==n&&"general"!==n&&W.push(n)),{index:e,length:t.length,text:"",token:"escape"===n?t.replace(T.escape,"$1"):t,type:"escape"===n||"general"===n?null:n}}),yt={index:0,length:0,token:"",text:"",type:null},gt=[];z&&vt.reverse(),m(vt,function(t){if(t.type)return(yt.type||yt.text)&>.push(yt),void(yt=t);z?yt.text=t.token+yt.text:yt.text+=t.token}),(yt.type||yt.text)&>.push(yt),z&>.reverse();var Mt=y($,v(h(p(gt,"type"))));if(!Mt.length)return p(gt,"text").join("");Mt=f(Mt,function(t,e){var n,s=e+1===Mt.length,i=!e;n="years"===t||"months"===t?w.as(t):Y.as(t);var r=Math.floor(n),o=n-r,d=_(gt,function(e){return t===e.type});return i&&Q&&n>Q&&(tt=!0),s&&X&&Math.abs(a.duration.as(t))<X&&(Z=!0),i&&null===V&&d.length>1&&(V=!0),Y.subtract(r,t),w.subtract(r,t),{rawValue:n,wholeValue:r,decimalValue:s?o:0,isSmallest:s,isLargest:i,type:t,tokenLength:d.length}});var bt=G?Math.floor:Math.round,Lt=function(t,e){var n=Math.pow(10,e);return bt(t*n)/n},kt=!1,Yt=!1,wt=function(t,e){var n={useGrouping:U,groupingSeparator:nt,decimalSeparator:at,grouping:st,useToLocaleString:et};return q&&(B<=0?(t.rawValue=0,t.wholeValue=0,t.decimalValue=0):(n.maximumSignificantDigits=B,t.significantDigits=B)),tt&&!Yt&&(t.isLargest?(t.wholeValue=Q,t.decimalValue=0):(t.wholeValue=0,t.decimalValue=0)),Z&&!Yt&&(t.isSmallest?(t.wholeValue=X,t.decimalValue=0):(t.wholeValue=0,t.decimalValue=0)),t.isSmallest||t.significantDigits&&t.significantDigits-t.wholeValue.toString().length<=0?J<0?t.value=Lt(t.wholeValue,J):0===J?t.value=bt(t.wholeValue+t.decimalValue):q?(t.value=G?Lt(t.rawValue,B-t.wholeValue.toString().length):t.rawValue,t.wholeValue&&(B-=t.wholeValue.toString().length)):(n.fractionDigits=J,t.value=G?t.wholeValue+Lt(t.decimalValue,J):t.wholeValue+t.decimalValue):q&&t.wholeValue?(t.value=Math.round(Lt(t.wholeValue,t.significantDigits-t.wholeValue.toString().length)),B-=t.wholeValue.toString().length):t.value=t.wholeValue,t.tokenLength>1&&(V||kt)&&(n.minimumIntegerDigits=t.tokenLength,Yt&&n.maximumSignificantDigits<t.tokenLength&&delete n.maximumSignificantDigits),!kt&&(t.value>0||""===it||_(W,t.type)||_(A,t.type))&&(kt=!0),t.formattedValue=i(t.value,n,I),n.useGrouping=!1,n.decimalSeparator=".",t.formattedValueEn=i(t.value,n,"en"),2===t.tokenLength&&"milliseconds"===t.type&&(t.formattedValueMS=i(t.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),t};if(Mt=f(Mt,wt),Mt=h(Mt),Mt.length>1){var Dt=function(t){return _(Mt,function(e){return e.type===t})};m(E,function(t){var e=Dt(t.type);e&&m(t.targets,function(t){var n=Dt(t.type);n&&parseInt(e.formattedValueEn,10)===t.value&&(e.rawValue=0,e.wholeValue=0,e.decimalValue=0,n.rawValue+=1,n.wholeValue+=1,n.decimalValue=0,n.formattedValueEn=n.wholeValue.toString(),Yt=!0)})})}return Yt&&(kt=!1,B=K,Mt=f(Mt,wt),Mt=h(Mt)),!A||tt&&!a.trim?(mt&&(Mt=g(Mt,function(t){return!t.isSmallest&&!t.wholeValue&&!_(W,t.type)})),F&&Mt.length&&(Mt=Mt.slice(0,F)),ft&&Mt.length>1&&(Mt=M(Mt,function(t){return!t.wholeValue&&!_(W,t.type)&&!t.isLargest})),pt&&(Mt=f(Mt,function(t,e){return e>0&&e<Mt.length-1&&!t.wholeValue?null:t}),Mt=h(Mt)),!ht||1!==Mt.length||Mt[0].wholeValue||!G&&Mt[0].isSmallest&&Mt[0].rawValue<X||(Mt=[])):(Mt=f(Mt,function(t){return _(A,function(e){return t.type===e})?t:null}),Mt=h(Mt)),P?Mt:(m(gt,function(t){var n=D[t.type],a=_(Mt,function(e){return e.type===t.type});if(n&&a){var s=a.formattedValueEn.split(".");s[0]=parseInt(s[0],10),s[1]?s[1]=parseFloat("0."+s[1],10):s[1]=null;var i=N.durationPluralKey(n,s[0],s[1]),d=o(n,N),l=!1,c={};m(N._durationLabelTypes,function(n){var a=_(d,function(t){return t.type===n.type&&t.key===i});a&&(c[a.type]=a.label,e(t.text,n.string)&&(t.text=t.text.replace(n.string,a.label),l=!0))}),R&&!l&&(d.sort(r),m(d,function(n){if(c[n.type]!==n.label){if(e(t.text,n.label))return t.text=t.text.replace(n.label,c[n.type]),!1}else if(e(t.text,n.label))return!1}))}}),gt=f(gt,function(t){if(!t.type)return t.text;var e=_(Mt,function(e){return e.type===t.type});if(!e)return"";var n="";return z&&(n+=t.text),(u&&tt||!u&&Z)&&(n+="< ",tt=!1,Z=!1),(u&&Z||!u&&tt)&&(n+="> ",tt=!1,Z=!1),u&&(e.value>0||""===it||_(W,e.type)||_(A,e.type))&&(n+="-",u=!1),"milliseconds"===t.type&&e.formattedValueMS?n+=e.formattedValueMS:n+=e.formattedValue,z||(n+=t.text),n}),gt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function S(){var t=this.duration,e=function(e){return t._data[e]},n=_(this.types,e),a=u(this.types,e);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===a)return"d __";case"weeks":return n===a?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===a)return"M __";case"years":return n===a?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function j(t){if(!t)throw"Moment Duration Format init cannot find moment instance.";t.duration.format=T,t.duration.fn.format=x,t.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:S,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},t.updateLocale("en",C)}var H=!1,A=!1,O=!1,P=!1,$="escape years months weeks days hours minutes seconds milliseconds general".split(" "),E=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];s.cache={};var C={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:d},F=function(t,e,n){return t.toLocaleString(e,n)};H=function(){try{(0).toLocaleString("i")}catch(t){return"RangeError"===t.name}return!1}()&&D(F),A=H&&w(F);var W=function(t,e,n){if("undefined"!=typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(e,n).format(t)};return O=D(W),P=O&&w(W),j(t),j})},function(t,e){t.exports='\n\t<div class="toast rop-next-share-time" v-if="isOn && accounts_no > 0">\n\t\t<span v-if="diff_seconds>0"> <b><i\n\t\t\t\tclass="fa fa-fast-forward"></i> {{labels.next_share}}</b> {{labels.in}}</span>\n\t\t<small v-if="timediff !== \'\'">{{timediff}}</small>\n\t</div>\n'},function(t,e){t.exports='\n <div>\n <div class="columns panel-header">\n <div class="column header-logo vertical-align" v-if="is_preloading_over > 0">\n <div>\n <img :src="plugin_logo" class="plugin-logo avatar avatar-lg"/>\n <h1 class="plugin-title d-inline-block">Revive Old Posts</h1><span class="powered d-inline-block"> {{labels.by}} <a\n href="https://revive.social" target="_blank"><b>Revive.Social</b></a></span>\n </div>\n </div>\n <toast/>\n <div v-if=" is_rest_api_error " class="toast toast-error rop-api-not-available" v-html="labels.api_not_available">\n </div>\n <div v-if=" is_fb_domain_notice " class="toast toast-primary">\n <button class="btn btn-clear float-right" @click="close_fb_domain_notice()"></button>\n <div v-html="labels.rop_facebook_domain_toast"></div>\n </div>\n <div class="sidebar sidebar-top card rop-container-start">\n\n \x3c!-- Next post count down --\x3e\n <countdown :current_time="current_time"/>\n \x3c!-- --\x3e\n\n <button class="btn btn-sm" :class="btn_class"\n :data-tooltip="labels.active_account_warning"\n @click="togglePosting()" :disabled="!haveAccountsActive">\n <i class="fa fa-play" v-if="!is_loading && !start_status"></i>\n <i class="fa fa-stop" v-else-if="!is_loading && start_status"></i>\n <i class="fa fa-spinner fa-spin" v-else></i>\n {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n </div>\n </div>\n\n <div class="columns">\n <div class="panel column col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">\n <div class="panel-nav" style="padding: 8px;" v-if="is_preloading_over > 0">\n <ul class="tab ">\n <li class="tab-item c-hand" v-for="tab in displayTabs"\n :class="{ active: tab.isActive }" v-bind:id="tab.name.replace(\' \', \'\').toLowerCase()">\n <a :class=" ( tab.slug === \'logs\' && logs_no > 0 ) ? \' badge-logs badge\' : \'\' "\n :data-badge="logs_no"\n @click="switchTab( tab.slug )">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n <component :is="page.template" :type="page.view"></component>\n </div>\n\n <div class="sidebar column col-3 col-xs-12 col-sm-12 col-md-12 col-lg-12"\n :class="\'rop-license-plan-\'+license" v-if="is_preloading_over > 0">\n\n <div class="card rop-container-start">\n <button id="rop_start_stop_btn" class="btn" :class="btn_class"\n :data-tooltip="labels.active_account_warning"\n @click="togglePosting()" :disabled="!haveAccountsActive">\n <i class="fa fa-play" v-if="!is_loading && !start_status"></i>\n <i class="fa fa-stop" v-else-if="!is_loading && start_status"></i>\n <i class="fa fa-spinner fa-spin" v-else></i>\n {{labels.click}} {{labels.to}} {{( start_status ? labels.stop : labels.start )}} {{labels.sharing}}\n </button>\n\n <div class="sharing-box" :class="status_color_class">{{ status_label_display }}</div>\n\n <countdown :current_time="current_time"/>\n\n <div id="staging-status" v-if="staging" v-html="labels.staging_status">\n </div>\n <div v-if="!haveAccounts" class="rop-spacer"></div>\n <div v-if="haveAccounts">\n <upsell-sidebar></upsell-sidebar>\n </div>\n <a v-if="license >= 1" href="https://revive.social/pro-support/" target="_blank" class="btn rop-sidebar-action-btns">{{labels.rop_support}}</a>\n <a v-if="license < 1" href="https://revive.social/support/" target="_blank" class="btn rop-sidebar-action-btns">{{labels.rop_support}}</a>\n <a v-if="haveAccounts" href="https://docs.revive.social/" target="_blank"\n class="btn rop-sidebar-action-btns">{{labels.rop_docs}}</a>\n <a v-if="haveAccounts"\n href="https://wordpress.org/support/plugin/tweet-old-post/reviews/?rate=5#new-post"\n target="_blank" class="btn rop-sidebar-action-btns">{{labels.review_it}}</a>\n </div>\n\n </div>\n </div>\n </div>\n'}]);
|
includes/admin/class-rop-admin.php
CHANGED
@@ -135,6 +135,10 @@ class Rop_Admin {
|
|
135 |
*/
|
136 |
public function bitly_shortener_upgrade_notice() {
|
137 |
|
|
|
|
|
|
|
|
|
138 |
if ( ! $this->check_shortener_service( 'bit.ly' ) ) {
|
139 |
return;
|
140 |
}
|
@@ -414,7 +418,18 @@ class Rop_Admin {
|
|
414 |
* @return bool true/false
|
415 |
* @since 8.0.4
|
416 |
*/
|
417 |
-
public static function rop_site_is_staging() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
|
419 |
$rop_known_staging = array(
|
420 |
'IS_WPE_SNAPSHOT',
|
@@ -967,6 +982,11 @@ class Rop_Admin {
|
|
967 |
$logger = new Rop_Logger();
|
968 |
$service_factory = new Rop_Services_Factory();
|
969 |
$settings = new Rop_Settings_Model();
|
|
|
|
|
|
|
|
|
|
|
970 |
|
971 |
$queue_stack = $queue->build_queue_publish_now( $post_id, $accounts_data, $is_future_post, $settings->get_true_instant_share() );
|
972 |
$logger->info( 'Fetching publish now queue', array( 'queue' => $queue_stack ) );
|
@@ -983,7 +1003,12 @@ class Rop_Admin {
|
|
983 |
$post_data = $queue->prepare_post_object( $post_id, $account );
|
984 |
$custom_instant_share_message = $message;
|
985 |
if ( ! empty( $custom_instant_share_message ) ) {
|
986 |
-
|
|
|
|
|
|
|
|
|
|
|
987 |
}
|
988 |
$logger->info( 'Posting', array( 'extra' => $post_data ) );
|
989 |
$service->share( $post_data, $account_data );
|
@@ -1198,6 +1223,10 @@ class Rop_Admin {
|
|
1198 |
return;
|
1199 |
}
|
1200 |
|
|
|
|
|
|
|
|
|
1201 |
$user_id = get_current_user_id();
|
1202 |
|
1203 |
if ( get_user_meta( $user_id, 'rop-wp-cron-notice-dismissed' ) ) {
|
@@ -1337,6 +1366,10 @@ class Rop_Admin {
|
|
1337 |
*/
|
1338 |
public function rop_cron_event_status_notice() {
|
1339 |
|
|
|
|
|
|
|
|
|
1340 |
$user_id = get_current_user_id();
|
1341 |
|
1342 |
if ( get_user_meta( $user_id, 'rop-cron-event-status-notice-dismissed' ) ) {
|
135 |
*/
|
136 |
public function bitly_shortener_upgrade_notice() {
|
137 |
|
138 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
139 |
+
return;
|
140 |
+
}
|
141 |
+
|
142 |
if ( ! $this->check_shortener_service( 'bit.ly' ) ) {
|
143 |
return;
|
144 |
}
|
418 |
* @return bool true/false
|
419 |
* @since 8.0.4
|
420 |
*/
|
421 |
+
public static function rop_site_is_staging( $post_id = '' ) {
|
422 |
+
|
423 |
+
if ( get_post_type( $post_id ) === 'revive-network-share' ) {
|
424 |
+
return apply_filters( 'rop_dont_work_on_staging', false ); // Allow Revive Network shares to go through by default
|
425 |
+
}
|
426 |
+
|
427 |
+
// This would also cover local wp installations
|
428 |
+
if ( function_exists( 'wp_get_environment_type' ) ) {
|
429 |
+
if ( wp_get_environment_type() !== 'production' ) {
|
430 |
+
return apply_filters( 'rop_dont_work_on_staging', true );
|
431 |
+
}
|
432 |
+
}
|
433 |
|
434 |
$rop_known_staging = array(
|
435 |
'IS_WPE_SNAPSHOT',
|
982 |
$logger = new Rop_Logger();
|
983 |
$service_factory = new Rop_Services_Factory();
|
984 |
$settings = new Rop_Settings_Model();
|
985 |
+
$pro_format_helper = false;
|
986 |
+
|
987 |
+
if ( class_exists( 'Rop_Pro_Post_Format_Helper' ) ) {
|
988 |
+
$pro_format_helper = new Rop_Pro_Post_Format_Helper;
|
989 |
+
}
|
990 |
|
991 |
$queue_stack = $queue->build_queue_publish_now( $post_id, $accounts_data, $is_future_post, $settings->get_true_instant_share() );
|
992 |
$logger->info( 'Fetching publish now queue', array( 'queue' => $queue_stack ) );
|
1003 |
$post_data = $queue->prepare_post_object( $post_id, $account );
|
1004 |
$custom_instant_share_message = $message;
|
1005 |
if ( ! empty( $custom_instant_share_message ) ) {
|
1006 |
+
|
1007 |
+
if ( $pro_format_helper !== false ) {
|
1008 |
+
$post_data['content'] = $pro_format_helper->rop_replace_magic_tags( $custom_instant_share_message, $post_id );
|
1009 |
+
} else {
|
1010 |
+
$post_data['content'] = $custom_instant_share_message;
|
1011 |
+
}
|
1012 |
}
|
1013 |
$logger->info( 'Posting', array( 'extra' => $post_data ) );
|
1014 |
$service->share( $post_data, $account_data );
|
1223 |
return;
|
1224 |
}
|
1225 |
|
1226 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1227 |
+
return;
|
1228 |
+
}
|
1229 |
+
|
1230 |
$user_id = get_current_user_id();
|
1231 |
|
1232 |
if ( get_user_meta( $user_id, 'rop-wp-cron-notice-dismissed' ) ) {
|
1366 |
*/
|
1367 |
public function rop_cron_event_status_notice() {
|
1368 |
|
1369 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
1370 |
+
return;
|
1371 |
+
}
|
1372 |
+
|
1373 |
$user_id = get_current_user_id();
|
1374 |
|
1375 |
if ( get_user_meta( $user_id, 'rop-cron-event-status-notice-dismissed' ) ) {
|
includes/admin/services/class-rop-facebook-service.php
CHANGED
@@ -456,7 +456,9 @@ class Rop_Facebook_Service extends Rop_Services_Abstract {
|
|
456 |
* @throws \Facebook\Exceptions\FacebookSDKException Facebook library exception.
|
457 |
*/
|
458 |
public function share( $post_details, $args = array() ) {
|
459 |
-
|
|
|
|
|
460 |
return false;
|
461 |
}
|
462 |
|
@@ -474,8 +476,28 @@ class Rop_Facebook_Service extends Rop_Services_Abstract {
|
|
474 |
}
|
475 |
|
476 |
$post_id = $post_details['post_id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
477 |
|
478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
|
480 |
if ( ! isset( $args['id'] ) || ! isset( $args['access_token'] ) ) {
|
481 |
$this->logger->alert_error( 'Unable to authenticate to facebook, no access_token/id provided. ' );
|
@@ -487,7 +509,7 @@ class Rop_Facebook_Service extends Rop_Services_Abstract {
|
|
487 |
$this->logger->alert_success(
|
488 |
sprintf(
|
489 |
'Successfully shared %s to %s on %s ',
|
490 |
-
html_entity_decode( get_the_title( $post_id ) ),
|
491 |
$args['user'],
|
492 |
$post_details['service']
|
493 |
)
|
@@ -502,133 +524,110 @@ class Rop_Facebook_Service extends Rop_Services_Abstract {
|
|
502 |
}
|
503 |
|
504 |
/**
|
505 |
-
* Method for preparing post to share with Facebook service.
|
506 |
*
|
507 |
-
* @since 8.
|
508 |
* @access private
|
509 |
*
|
510 |
* @param array $post_details The post details to be published by the service.
|
511 |
*
|
512 |
* @return array
|
513 |
-
* @throws \Facebook\Exceptions\FacebookSDKException Facebook library exception.
|
514 |
*/
|
515 |
-
private function
|
516 |
-
$post_id = $post_details['post_id'];
|
517 |
-
|
518 |
-
/**
|
519 |
-
*
|
520 |
-
* TODO Add in the post format tab, for facebook, an posting behaviour option,
|
521 |
-
* where we should allow user to choose how the posting with image will work, as regular post or photo post.
|
522 |
-
*/
|
523 |
-
|
524 |
-
// Fb connected via Revive Social App
|
525 |
-
$installed_with_app = get_option( 'rop_facebook_via_rs_app' );
|
526 |
|
527 |
-
|
528 |
|
529 |
-
|
530 |
-
if ( get_post_type( $post_id ) === 'attachment' ) {
|
531 |
|
532 |
-
|
533 |
-
if ( strpos( get_post_mime_type( $post_id ), 'video' ) !== false ) {
|
534 |
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
'type' => 'post',
|
541 |
-
);
|
542 |
-
}
|
543 |
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
'type' => 'photo',
|
556 |
-
);
|
557 |
-
|
558 |
-
} else { // If there is not attachment image the request becomes POST.
|
559 |
-
$new_post['message'] = $post_details['content'] . $post_details['hashtags'];
|
560 |
-
$new_post['link'] = get_permalink( $post_id );
|
561 |
-
|
562 |
-
return array(
|
563 |
-
'post_data' => $new_post,
|
564 |
-
'type' => 'post',
|
565 |
-
);
|
566 |
-
}
|
567 |
-
}
|
568 |
|
569 |
-
|
570 |
-
if ( get_post_type( $post_id ) !== 'attachment' && ! empty( $post_details['post_url'] ) && empty( $post_details['post_with_image'] ) ) {
|
571 |
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
573 |
|
574 |
-
|
575 |
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
);
|
580 |
-
}
|
581 |
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
$new_post['source'] = $this->get_path_by_url( $post_details['post_image'], $post_details['mimetype'] ); // get image path
|
587 |
-
$new_post['caption'] = $post_details['content'] . $this->get_url( $post_details ) . $post_details['hashtags'];
|
588 |
|
589 |
-
|
590 |
-
'post_data' => $new_post,
|
591 |
-
'type' => 'photo',
|
592 |
-
);
|
593 |
|
594 |
-
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
|
597 |
-
|
598 |
-
if ( get_post_type( $post_id ) !== 'attachment' && empty( $post_details['post_image'] ) && empty( $post_details['post_url'] ) ) {
|
599 |
|
600 |
-
$
|
|
|
|
|
|
|
|
|
601 |
|
602 |
return array(
|
603 |
'post_data' => $new_post,
|
604 |
-
'type' => '
|
605 |
);
|
606 |
-
|
607 |
|
608 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
|
610 |
-
|
611 |
-
$image = $this->get_path_by_url( $post_details['post_image'], $post_details['mimetype'] );
|
612 |
-
$new_post['source'] = $api->fileToUpload( $image );
|
613 |
|
614 |
-
|
615 |
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
}
|
621 |
-
if ( strpos( $post_details['mimetype']['type'], 'video' ) !== false ) {
|
622 |
-
$image = $this->get_path_by_url( $post_details['post_image'], $post_details['mimetype'] );
|
623 |
-
$new_post['source'] = $api->videoToUpload( $image );
|
624 |
-
$new_post['title'] = html_entity_decode( get_the_title( $post_id ) );
|
625 |
-
$new_post['description'] = $post_details['content'] . $this->get_url( $post_details ) . $post_details['hashtags'];
|
626 |
|
627 |
-
return array(
|
628 |
-
'post_data' => $new_post,
|
629 |
-
'type' => 'video',
|
630 |
-
);
|
631 |
-
}
|
632 |
}
|
633 |
|
634 |
/**
|
456 |
* @throws \Facebook\Exceptions\FacebookSDKException Facebook library exception.
|
457 |
*/
|
458 |
public function share( $post_details, $args = array() ) {
|
459 |
+
|
460 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
461 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
462 |
return false;
|
463 |
}
|
464 |
|
476 |
}
|
477 |
|
478 |
$post_id = $post_details['post_id'];
|
479 |
+
$post_url = $post_details['post_url'];
|
480 |
+
$share_as_image_post = $post_details['post_with_image'];
|
481 |
+
|
482 |
+
// FB link post
|
483 |
+
if ( ! empty( $post_url ) && empty( $share_as_image_post ) && get_post_type( $post_id ) !== 'attachment' ) {
|
484 |
+
$sharing_data = $this->fb_article_post( $post_details );
|
485 |
+
}
|
486 |
+
|
487 |
+
// FB plain text post
|
488 |
+
if ( empty( $share_as_image_post ) && empty( $post_url ) ) {
|
489 |
+
$sharing_data = $this->fb_text_post( $post_details );
|
490 |
+
}
|
491 |
|
492 |
+
// FB media post
|
493 |
+
if ( ! empty( $share_as_image_post ) || get_post_type( $post_id ) === 'attachment' ) {
|
494 |
+
|
495 |
+
if ( strpos( get_post_mime_type( $post_details['post_id'] ), 'video' ) === false ) {
|
496 |
+
$sharing_data = $this->fb_image_post( $post_details );
|
497 |
+
} else {
|
498 |
+
$sharing_data = $this->fb_video_post( $post_details );
|
499 |
+
}
|
500 |
+
}
|
501 |
|
502 |
if ( ! isset( $args['id'] ) || ! isset( $args['access_token'] ) ) {
|
503 |
$this->logger->alert_error( 'Unable to authenticate to facebook, no access_token/id provided. ' );
|
509 |
$this->logger->alert_success(
|
510 |
sprintf(
|
511 |
'Successfully shared %s to %s on %s ',
|
512 |
+
html_entity_decode( get_the_title( $post_id ), ENT_QUOTES ), // TODO Set ENT_QUOTES for all other entity decode occurences in plugin
|
513 |
$args['user'],
|
514 |
$post_details['service']
|
515 |
)
|
524 |
}
|
525 |
|
526 |
/**
|
527 |
+
* Method for preparing article post to share with Facebook service.
|
528 |
*
|
529 |
+
* @since 8.6.4
|
530 |
* @access private
|
531 |
*
|
532 |
* @param array $post_details The post details to be published by the service.
|
533 |
*
|
534 |
* @return array
|
|
|
535 |
*/
|
536 |
+
private function fb_article_post( $post_details ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
|
538 |
+
$new_post = array();
|
539 |
|
540 |
+
$new_post['message'] = $this->strip_excess_blank_lines( $post_details['content'] ) . $post_details['hashtags'];
|
|
|
541 |
|
542 |
+
$new_post['link'] = $this->get_url( $post_details );
|
|
|
543 |
|
544 |
+
return array(
|
545 |
+
'post_data' => $new_post,
|
546 |
+
'type' => 'post',
|
547 |
+
);
|
548 |
+
}
|
|
|
|
|
|
|
549 |
|
550 |
+
/**
|
551 |
+
* Method for preparing image post to share with Facebook service.
|
552 |
+
*
|
553 |
+
* @since 8.6.4
|
554 |
+
* @access private
|
555 |
+
*
|
556 |
+
* @param array $post_details The post details to be published by the service.
|
557 |
+
*
|
558 |
+
* @return array
|
559 |
+
*/
|
560 |
+
private function fb_image_post( $post_details ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
+
$attachment_url = $post_details['post_image'];
|
|
|
563 |
|
564 |
+
// if the post has no image but "Share as image post" is checked
|
565 |
+
// share as an article post
|
566 |
+
if ( empty( $attachment_url ) ) {
|
567 |
+
$this->logger->info( 'No image set for post, but "Share as Image Post" is checked. Falling back to article post' );
|
568 |
+
return $this->fb_article_post( $post_details );
|
569 |
+
}
|
570 |
|
571 |
+
$new_post = array();
|
572 |
|
573 |
+
$new_post['url'] = $attachment_url;
|
574 |
+
$new_post['source'] = $this->get_path_by_url( $attachment_url, $post_details['mimetype'] ); // get image path
|
575 |
+
$new_post['caption'] = $post_details['content'] . $this->get_url( $post_details ) . $post_details['hashtags'];
|
|
|
|
|
576 |
|
577 |
+
return array(
|
578 |
+
'post_data' => $new_post,
|
579 |
+
'type' => 'photo',
|
580 |
+
);
|
|
|
|
|
581 |
|
582 |
+
}
|
|
|
|
|
|
|
583 |
|
584 |
+
/**
|
585 |
+
* Method for preparing video post to share with Facebook service.
|
586 |
+
*
|
587 |
+
* @since 8.6.4
|
588 |
+
* @access private
|
589 |
+
*
|
590 |
+
* @param array $post_details The post details to be published by the service.
|
591 |
+
*
|
592 |
+
* @return array
|
593 |
+
*/
|
594 |
+
private function fb_video_post( $post_details ) {
|
595 |
|
596 |
+
$new_post = array();
|
|
|
597 |
|
598 |
+
$image = $this->get_path_by_url( $post_details['post_image'], $post_details['mimetype'] );
|
599 |
+
$new_post['source'] = $image;
|
600 |
+
// $new_post['source'] = $api->videoToUpload( $image );
|
601 |
+
$new_post['title'] = html_entity_decode( get_the_title( $post_details['post_id'] ), ENT_QUOTES );
|
602 |
+
$new_post['description'] = $post_details['content'] . $this->get_url( $post_details ) . $post_details['hashtags'];
|
603 |
|
604 |
return array(
|
605 |
'post_data' => $new_post,
|
606 |
+
'type' => 'video',
|
607 |
);
|
608 |
+
}
|
609 |
|
610 |
+
/**
|
611 |
+
* Method for preparing plain text post to share with Facebook service.
|
612 |
+
*
|
613 |
+
* @since 8.6.4
|
614 |
+
* @access private
|
615 |
+
*
|
616 |
+
* @param array $post_details The post details to be published by the service.
|
617 |
+
*
|
618 |
+
* @return array
|
619 |
+
*/
|
620 |
+
private function fb_text_post( $post_details ) {
|
621 |
|
622 |
+
$new_post = array();
|
|
|
|
|
623 |
|
624 |
+
$new_post['message'] = $post_details['content'] . $post_details['hashtags'];
|
625 |
|
626 |
+
return array(
|
627 |
+
'post_data' => $new_post,
|
628 |
+
'type' => 'post',
|
629 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
|
|
|
|
|
|
|
|
|
|
|
631 |
}
|
632 |
|
633 |
/**
|
includes/admin/services/class-rop-gmb-service.php
CHANGED
@@ -295,7 +295,7 @@ class Rop_Gmb_Service extends Rop_Services_Abstract {
|
|
295 |
|
296 |
// if image is empty lets create a different type of GMB post
|
297 |
if ( empty( $image_url ) ) {
|
298 |
-
$this->logger->info( '
|
299 |
return $this->gmb_link_with_no_image_post( $post_details, $args );
|
300 |
}
|
301 |
|
@@ -450,6 +450,11 @@ class Rop_Gmb_Service extends Rop_Services_Abstract {
|
|
450 |
*/
|
451 |
public function share( $post_details, $args = array() ) {
|
452 |
|
|
|
|
|
|
|
|
|
|
|
453 |
if ( ! class_exists( 'Google_Client' ) ) {
|
454 |
$this->logger->alert_error( Rop_I18n::get_labels( 'errors.gmb_missing_main_class' ) );
|
455 |
return;
|
295 |
|
296 |
// if image is empty lets create a different type of GMB post
|
297 |
if ( empty( $image_url ) ) {
|
298 |
+
$this->logger->info( 'No image set for post, but "Share as Image Post" is checked. Falling back to article post' );
|
299 |
return $this->gmb_link_with_no_image_post( $post_details, $args );
|
300 |
}
|
301 |
|
450 |
*/
|
451 |
public function share( $post_details, $args = array() ) {
|
452 |
|
453 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
454 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
455 |
+
return false;
|
456 |
+
}
|
457 |
+
|
458 |
if ( ! class_exists( 'Google_Client' ) ) {
|
459 |
$this->logger->alert_error( Rop_I18n::get_labels( 'errors.gmb_missing_main_class' ) );
|
460 |
return;
|
includes/admin/services/class-rop-linkedin-service.php
CHANGED
@@ -497,7 +497,9 @@ class Rop_Linkedin_Service extends Rop_Services_Abstract {
|
|
497 |
* @access public
|
498 |
*/
|
499 |
public function share( $post_details, $args = array() ) {
|
500 |
-
|
|
|
|
|
501 |
return false;
|
502 |
}
|
503 |
|
@@ -689,6 +691,18 @@ class Rop_Linkedin_Service extends Rop_Services_Abstract {
|
|
689 |
*/
|
690 |
private function linkedin_image_post( $post_details, $args, $token ) {
|
691 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
692 |
$author_urn = $args['is_company'] ? 'urn:li:organization:' : 'urn:li:person:';
|
693 |
|
694 |
$register_image = array(
|
@@ -728,18 +742,6 @@ class Rop_Linkedin_Service extends Rop_Services_Abstract {
|
|
728 |
$upload_url = $body['value']['uploadMechanism']['com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest']['uploadUrl'];
|
729 |
$asset = $body['value']['asset'];
|
730 |
|
731 |
-
// If this is an attachment post we need to make sure we pass the URL to get_path_by_url() correctly
|
732 |
-
if ( get_post_type( $post_details['post_id'] ) === 'attachment' ) {
|
733 |
-
$img = $this->get_path_by_url( wp_get_attachment_url( $post_details['post_id'] ), $post_details['mimetype'] );
|
734 |
-
} else {
|
735 |
-
$img = $this->get_path_by_url( $post_details['post_image'], $post_details['mimetype'] );
|
736 |
-
}
|
737 |
-
|
738 |
-
if ( empty( $img ) ) {
|
739 |
-
$this->logger->alert_error( 'No image set for post: ' . get_the_title( $post_details['post_id'] ) . ', cannot share as an image post to LinkedIn.' );
|
740 |
-
return array();
|
741 |
-
}
|
742 |
-
|
743 |
if ( function_exists( 'exif_imagetype' ) ) {
|
744 |
$img_mime_type = image_type_to_mime_type( exif_imagetype( $img ) );
|
745 |
} else {
|
@@ -825,7 +827,13 @@ class Rop_Linkedin_Service extends Rop_Services_Abstract {
|
|
825 |
// last array item contains notify date
|
826 |
$notify_user_at = array_pop( $accounts_array );
|
827 |
// save timestamp for when to notify user to refresh their linkedin token
|
828 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
829 |
|
830 |
$accounts = array();
|
831 |
|
@@ -889,27 +897,52 @@ class Rop_Linkedin_Service extends Rop_Services_Abstract {
|
|
889 |
*/
|
890 |
public function rop_refresh_linkedin_token_notice() {
|
891 |
|
892 |
-
$
|
893 |
|
894 |
-
if ( empty( $
|
895 |
return;
|
896 |
}
|
897 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
898 |
$now = time();
|
899 |
|
900 |
-
if ( $notify_at <= $now ) {
|
901 |
|
902 |
$headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
903 |
$admin_email = get_option( 'admin_email' );
|
904 |
-
|
905 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
906 |
|
907 |
// notify user to refresh token
|
908 |
-
wp_mail( $admin_email, $subject, $message, $headers );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
909 |
$this->logger->alert_error( Rop_I18n::get_labels( 'general.rop_linkedin_refresh_token' ) );
|
910 |
|
911 |
-
} else {
|
912 |
-
return;
|
913 |
}
|
914 |
|
915 |
}
|
497 |
* @access public
|
498 |
*/
|
499 |
public function share( $post_details, $args = array() ) {
|
500 |
+
|
501 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
502 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
503 |
return false;
|
504 |
}
|
505 |
|
691 |
*/
|
692 |
private function linkedin_image_post( $post_details, $args, $token ) {
|
693 |
|
694 |
+
// If this is an attachment post we need to make sure we pass the URL to get_path_by_url() correctly
|
695 |
+
if ( get_post_type( $post_details['post_id'] ) === 'attachment' ) {
|
696 |
+
$img = $this->get_path_by_url( wp_get_attachment_url( $post_details['post_id'] ), $post_details['mimetype'] );
|
697 |
+
} else {
|
698 |
+
$img = $this->get_path_by_url( $post_details['post_image'], $post_details['mimetype'] );
|
699 |
+
}
|
700 |
+
|
701 |
+
if ( empty( $img ) ) {
|
702 |
+
$this->logger->info( 'No image set for post, but "Share as Image Post" is checked. Falling back to article post' );
|
703 |
+
return $this->linkedin_article_post( $post_details, $args );
|
704 |
+
}
|
705 |
+
|
706 |
$author_urn = $args['is_company'] ? 'urn:li:organization:' : 'urn:li:person:';
|
707 |
|
708 |
$register_image = array(
|
742 |
$upload_url = $body['value']['uploadMechanism']['com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest']['uploadUrl'];
|
743 |
$asset = $body['value']['asset'];
|
744 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
if ( function_exists( 'exif_imagetype' ) ) {
|
746 |
$img_mime_type = image_type_to_mime_type( exif_imagetype( $img ) );
|
747 |
} else {
|
827 |
// last array item contains notify date
|
828 |
$notify_user_at = array_pop( $accounts_array );
|
829 |
// save timestamp for when to notify user to refresh their linkedin token
|
830 |
+
// set notified count to 0
|
831 |
+
$notify_data = array(
|
832 |
+
'notify_at' => $notify_user_at['notify_user_at'],
|
833 |
+
'notified_count' => 0,
|
834 |
+
);
|
835 |
+
|
836 |
+
update_option( 'rop_linkedin_refresh_token_notice', $notify_data );
|
837 |
|
838 |
$accounts = array();
|
839 |
|
897 |
*/
|
898 |
public function rop_refresh_linkedin_token_notice() {
|
899 |
|
900 |
+
$notify = get_option( 'rop_linkedin_refresh_token_notice' );
|
901 |
|
902 |
+
if ( empty( $notify ) ) {
|
903 |
return;
|
904 |
}
|
905 |
|
906 |
+
// Backwards compatibility pre v8.6.4
|
907 |
+
if ( ! is_array( $notify ) ) {
|
908 |
+
$notify = array(
|
909 |
+
'notify_at' => $notify,
|
910 |
+
'notified_count' => 0,
|
911 |
+
);
|
912 |
+
}
|
913 |
+
|
914 |
+
$notify_at = $notify['notify_at'];
|
915 |
+
$notified_count = $notify['notified_count'];
|
916 |
+
|
917 |
$now = time();
|
918 |
|
919 |
+
if ( $notify_at <= $now && $notified_count <= 4 ) {
|
920 |
|
921 |
$headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
922 |
$admin_email = get_option( 'admin_email' );
|
923 |
+
|
924 |
+
if ( $notified_count < 4 ) {
|
925 |
+
$subject = Rop_I18n::get_labels( 'emails.refresh_linkedin_token_subject' );
|
926 |
+
$message = Rop_I18n::get_labels( 'emails.refresh_linkedin_token_message' );
|
927 |
+
} else {
|
928 |
+
$subject = Rop_I18n::get_labels( 'emails.refresh_linkedin_token_subject_final' );
|
929 |
+
$message = Rop_I18n::get_labels( 'emails.refresh_linkedin_token_message_final' );
|
930 |
+
}
|
931 |
|
932 |
// notify user to refresh token
|
933 |
+
$sent = wp_mail( $admin_email, $subject, $message, $headers );
|
934 |
+
|
935 |
+
if ( $sent ) {
|
936 |
+
$notified_count++;
|
937 |
+
$notify_data = array(
|
938 |
+
'notify_at' => $notify_at,
|
939 |
+
'notified_count' => $notified_count,
|
940 |
+
);
|
941 |
+
update_option( 'rop_linkedin_refresh_token_notice', $notify_data, false );
|
942 |
+
}
|
943 |
+
|
944 |
$this->logger->alert_error( Rop_I18n::get_labels( 'general.rop_linkedin_refresh_token' ) );
|
945 |
|
|
|
|
|
946 |
}
|
947 |
|
948 |
}
|
includes/admin/services/class-rop-pinterest-service.php
CHANGED
@@ -380,9 +380,12 @@ class Rop_Pinterest_Service extends Rop_Services_Abstract {
|
|
380 |
* @return mixed
|
381 |
*/
|
382 |
public function share( $post_details, $args = array() ) {
|
383 |
-
|
|
|
|
|
384 |
return false;
|
385 |
}
|
|
|
386 |
$post_id = $post_details['post_id'];
|
387 |
$this->set_api(
|
388 |
$this->credentials['app_id'],
|
380 |
* @return mixed
|
381 |
*/
|
382 |
public function share( $post_details, $args = array() ) {
|
383 |
+
|
384 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
385 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
386 |
return false;
|
387 |
}
|
388 |
+
|
389 |
$post_id = $post_details['post_id'];
|
390 |
$this->set_api(
|
391 |
$this->credentials['app_id'],
|
includes/admin/services/class-rop-tumblr-service.php
CHANGED
@@ -422,8 +422,10 @@ class Rop_Tumblr_Service extends Rop_Services_Abstract {
|
|
422 |
* @return mixed
|
423 |
*/
|
424 |
public function share( $post_details, $args = array() ) {
|
425 |
-
|
426 |
-
|
|
|
|
|
427 |
}
|
428 |
|
429 |
$api = $this->get_api( $args['credentials']['consumer_key'], $args['credentials']['consumer_secret'], $args['credentials']['oauth_token'], $args['credentials']['oauth_token_secret'] );
|
422 |
* @return mixed
|
423 |
*/
|
424 |
public function share( $post_details, $args = array() ) {
|
425 |
+
|
426 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
427 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
428 |
+
return false;
|
429 |
}
|
430 |
|
431 |
$api = $this->get_api( $args['credentials']['consumer_key'], $args['credentials']['consumer_secret'], $args['credentials']['oauth_token'], $args['credentials']['oauth_token_secret'] );
|
includes/admin/services/class-rop-twitter-service.php
CHANGED
@@ -413,7 +413,9 @@ class Rop_Twitter_Service extends Rop_Services_Abstract {
|
|
413 |
* @return mixed
|
414 |
*/
|
415 |
public function share( $post_details, $args = array() ) {
|
416 |
-
|
|
|
|
|
417 |
return false;
|
418 |
}
|
419 |
|
413 |
* @return mixed
|
414 |
*/
|
415 |
public function share( $post_details, $args = array() ) {
|
416 |
+
|
417 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
418 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
419 |
return false;
|
420 |
}
|
421 |
|
includes/admin/services/class-rop-vk-service.php
CHANGED
@@ -230,6 +230,7 @@ class Rop_Vk_Service extends Rop_Services_Abstract {
|
|
230 |
// if the post has no image but "Share as image post" is checked
|
231 |
// share as an article post
|
232 |
if ( empty( $attachment_url ) ) {
|
|
|
233 |
return $this->vk_article_post( $post_details, $args, $owner_id );
|
234 |
}
|
235 |
|
@@ -424,6 +425,11 @@ class Rop_Vk_Service extends Rop_Services_Abstract {
|
|
424 |
*/
|
425 |
public function share( $post_details, $args = array() ) {
|
426 |
|
|
|
|
|
|
|
|
|
|
|
427 |
$post_id = $post_details['post_id'];
|
428 |
|
429 |
$client = new VKApiClient();
|
230 |
// if the post has no image but "Share as image post" is checked
|
231 |
// share as an article post
|
232 |
if ( empty( $attachment_url ) ) {
|
233 |
+
$this->logger->info( 'No image set for post, but "Share as Image Post" is checked. Falling back to article post' );
|
234 |
return $this->vk_article_post( $post_details, $args, $owner_id );
|
235 |
}
|
236 |
|
425 |
*/
|
426 |
public function share( $post_details, $args = array() ) {
|
427 |
|
428 |
+
if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) {
|
429 |
+
$this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) );
|
430 |
+
return false;
|
431 |
+
}
|
432 |
+
|
433 |
$post_id = $post_details['post_id'];
|
434 |
|
435 |
$client = new VKApiClient();
|
includes/class-rop-i18n.php
CHANGED
@@ -339,7 +339,7 @@ class Rop_I18n {
|
|
339 |
'next_share' => __( 'Next share', 'tweet-old-post' ),
|
340 |
'sharing_now' => __( 'Sharing...', 'tweet-old-post' ),
|
341 |
'cron_interval' => __( 'Once every 5 min', 'tweet-old-post' ),
|
342 |
-
'staging_status' => __( 'This
|
343 |
'api_not_available' => __(
|
344 |
'It seems there is an issue with your WordPress configuration and the core REST API functionality is not available. This is crucial as Revive Old Posts relies on this functionality in order to work.<br/>
|
345 |
The root cause might be either a security plugin which blocks this feature or some faulty server configuration which constrain this WordPress feature. <br/>
|
@@ -368,8 +368,10 @@ You can try to disable any of the security plugins that you use in order to see
|
|
368 |
'emails' => array(
|
369 |
'share_once_sharing_done_subject' => __( 'Revive Old Posts - All Posts Shared', 'tweet-old-post' ),
|
370 |
'refresh_linkedin_token_subject' => __( 'Revive Old Posts - Refresh Your LinkedIn Token', 'tweet-old-post' ),
|
|
|
371 |
'share_once_sharing_done_message' => __( 'All posts have been shared to your connected social media accounts. No previously shared posts will be re-shared until you click the button to "Stop Sharing" and "Start Sharing" on the Revive Old Posts plugin dashboard.', 'tweet-old-post' ),
|
372 |
'refresh_linkedin_token_message' => sprintf( __( 'Hi! This email was sent by Revive Old Posts on your website. Your LinkedIn token is about to expire. You need to refresh it to continue sharing without issue. Click the link below to find out why and how: %1$s %2$s', 'tweet-old-post' ), '<br><br>', '<a href="https://docs.revive.social/article/1151-how-to-refresh-linkedin-access-token">https://docs.revive.social/article/1151-how-to-refresh-linkedin-access-token</a>' ),
|
|
|
373 |
),
|
374 |
'cron_system' => array(
|
375 |
'delete_cron_service_account_info' => sprintf( __( 'This option will delete your website information from our Remote Cron Service. %1$s Revive Old Posts will then fallback to using the Local Cron System built into WordPress. %1$s You can re-enable the Remote Cron System at anytime from General Settings > Cron Type, switch from Local Cron to Remote.', 'tweet-old-post' ), '<br>' ),
|
@@ -384,6 +386,7 @@ You can try to disable any of the security plugins that you use in order to see
|
|
384 |
|
385 |
'sharing' => array(
|
386 |
'post_already_shared' => __( 'This post went out on the last share event and might be a duplicate. Skipping...', 'tweet-old-post' ),
|
|
|
387 |
),
|
388 |
'errors' => array(
|
389 |
'gmb_failed_access_token_refresh' => __( 'Failed to retrieve Google My Business access token: ', 'tweet-old-post' ),
|
339 |
'next_share' => __( 'Next share', 'tweet-old-post' ),
|
340 |
'sharing_now' => __( 'Sharing...', 'tweet-old-post' ),
|
341 |
'cron_interval' => __( 'Once every 5 min', 'tweet-old-post' ),
|
342 |
+
'staging_status' => sprintf( __( 'This seems to be a staging or development website. Some post types will not share to your accounts. %1$sLearn How to Turn Off%2$s', 'tweet-old-post' ), '<a href="https://docs.revive.social/article/1321-allow-revive-old-posts-to-work-on-staging-or-development-websites" target="_blank">', '</a>' ),
|
343 |
'api_not_available' => __(
|
344 |
'It seems there is an issue with your WordPress configuration and the core REST API functionality is not available. This is crucial as Revive Old Posts relies on this functionality in order to work.<br/>
|
345 |
The root cause might be either a security plugin which blocks this feature or some faulty server configuration which constrain this WordPress feature. <br/>
|
368 |
'emails' => array(
|
369 |
'share_once_sharing_done_subject' => __( 'Revive Old Posts - All Posts Shared', 'tweet-old-post' ),
|
370 |
'refresh_linkedin_token_subject' => __( 'Revive Old Posts - Refresh Your LinkedIn Token', 'tweet-old-post' ),
|
371 |
+
'refresh_linkedin_token_subject_final' => __( 'Final - Refresh Your LinkedIn Token', 'tweet-old-post' ),
|
372 |
'share_once_sharing_done_message' => __( 'All posts have been shared to your connected social media accounts. No previously shared posts will be re-shared until you click the button to "Stop Sharing" and "Start Sharing" on the Revive Old Posts plugin dashboard.', 'tweet-old-post' ),
|
373 |
'refresh_linkedin_token_message' => sprintf( __( 'Hi! This email was sent by Revive Old Posts on your website. Your LinkedIn token is about to expire. You need to refresh it to continue sharing without issue. Click the link below to find out why and how: %1$s %2$s', 'tweet-old-post' ), '<br><br>', '<a href="https://docs.revive.social/article/1151-how-to-refresh-linkedin-access-token">https://docs.revive.social/article/1151-how-to-refresh-linkedin-access-token</a>' ),
|
374 |
+
'refresh_linkedin_token_message_final' => sprintf( __( 'Hi! This email was sent by Revive Old Posts on your website. Your LinkedIn token is about to expire. You need to refresh it to continue sharing without issue. Click the link below to find out why and how: %1$s %2$s. %3$sThis is the final notice email you will receieve from Revive Old Posts.', 'tweet-old-post' ), '<br><br>', '<a href="https://docs.revive.social/article/1151-how-to-refresh-linkedin-access-token">https://docs.revive.social/article/1151-how-to-refresh-linkedin-access-token</a>', '<br><br>' ),
|
375 |
),
|
376 |
'cron_system' => array(
|
377 |
'delete_cron_service_account_info' => sprintf( __( 'This option will delete your website information from our Remote Cron Service. %1$s Revive Old Posts will then fallback to using the Local Cron System built into WordPress. %1$s You can re-enable the Remote Cron System at anytime from General Settings > Cron Type, switch from Local Cron to Remote.', 'tweet-old-post' ), '<br>' ),
|
386 |
|
387 |
'sharing' => array(
|
388 |
'post_already_shared' => __( 'This post went out on the last share event and might be a duplicate. Skipping...', 'tweet-old-post' ),
|
389 |
+
'share_attempted_on_staging' => __( 'ROP has detected that this is a development website. Share process skipped.', 'tweet-old-post' ),
|
390 |
),
|
391 |
'errors' => array(
|
392 |
'gmb_failed_access_token_refresh' => __( 'Failed to retrieve Google My Business access token: ', 'tweet-old-post' ),
|
includes/class-rop.php
CHANGED
@@ -68,7 +68,7 @@ class Rop {
|
|
68 |
public function __construct() {
|
69 |
|
70 |
$this->plugin_name = 'rop';
|
71 |
-
$this->version = '8.6.
|
72 |
|
73 |
$this->load_dependencies();
|
74 |
$this->set_locale();
|
68 |
public function __construct() {
|
69 |
|
70 |
$this->plugin_name = 'rop';
|
71 |
+
$this->version = '8.6.4';
|
72 |
|
73 |
$this->load_dependencies();
|
74 |
$this->set_locale();
|
readme.md
CHANGED
@@ -69,6 +69,10 @@ With our plugin, it is possible to implement curation capabilities by **filterin
|
|
69 |
|
70 |
Once set, the plugin will then be able to determine which content to auto share to social media.
|
71 |
|
|
|
|
|
|
|
|
|
72 |
---
|
73 |
|
74 |
Revive Old Posts isn't like every other social media marketing tool. We've tailored its features while keeping the following in mind:
|
@@ -87,7 +91,8 @@ Revive Old Posts isn't like every other social media marketing tool. We've tailo
|
|
87 |
- WordPress to Linkedin Page [Pro]
|
88 |
- WordPress to Tumblr [Pro]
|
89 |
- WordPress to Google My Business(GMB) [Pro]
|
90 |
-
- WordPress to Vkontakte(VK) [Pro]
|
|
|
91 |
|
92 |
Some of the available networks and features require the Pro version of the plugin. Check out the free vs pro table [here.](https://docs.revive.social/article/941-revive-old-post-free-vs-pro)
|
93 |
|
@@ -107,7 +112,7 @@ Some of the available networks and features require the Pro version of the plugi
|
|
107 |
|
108 |
- **Automatically generate hashtags** for post shares from **tags**, **categories** or from **custom fields**. [Free]
|
109 |
|
110 |
-
- Include
|
111 |
|
112 |
- Compatible with **URL Shorteners**. Shorten the links for the content that you post to social media. [Free]
|
113 |
|
@@ -117,6 +122,24 @@ Some of the available networks and features require the Pro version of the plugi
|
|
117 |
|
118 |
- Integrate with **Google Analytics** to track your social media traffic increase. [Free]
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
And More! Try Revive Old Posts, see why it's the **best** WordPress social media marketing tool to boost your site traffic and keep your followers engaged.
|
121 |
|
122 |
|
@@ -126,6 +149,8 @@ Using the PRO version of Revive Old Posts unlocks a host of additional features
|
|
126 |
|
127 |
**Awesome features in Pro:**
|
128 |
|
|
|
|
|
129 |
- [Support for WordPress Custom Post Types](https://docs.revive.social/article/968-how-to-share-different-wordpress-post-types-to-social-media-w-revive-old-posts) (WooCommerce Products, BigCommerce Products, Recipes etc.)
|
130 |
|
131 |
- [Content Variations](https://docs.revive.social/article/971-how-to-add-variations-to-revive-old-posts-shares); Add multiple share variations to your posts, including custom images, ROP will automatically choose a variation to share!
|
@@ -145,7 +170,9 @@ Using the PRO version of Revive Old Posts unlocks a host of additional features
|
|
145 |
|
146 |
- **WordPress to Google My Business(GMB)** scheduling and auto post
|
147 |
|
148 |
-
- **WordPress to Vkontakte(VK)** scheduling and auto post
|
|
|
|
|
149 |
|
150 |
- Connect **multiple social media accounts** to WP
|
151 |
|
@@ -215,6 +242,10 @@ If you have any questions please ask on the [support forum](https://wordpress.or
|
|
215 |
|
216 |
- Yes, this feature is free for the accounts that can be connected via the free plugin (Facebook and Twitter). Once you check the option to post on publish, our plugin will do the rest.
|
217 |
|
|
|
|
|
|
|
|
|
218 |
**REST API error**
|
219 |
|
220 |
- This issue is normally caused by an antimalware or firewall plugin. Please try disabling all plugins(except Revive Old Posts) to see if the issue persists. If not then enable each plugin one by one while checking Revive Old Posts dashboard to see if the issue returns, that will help you determine the conflicting plugin.
|
@@ -261,6 +292,15 @@ http://revive.social/plugins/revive-old-post
|
|
261 |
|
262 |
|
263 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
### 8.6.3 - 2020-12-08 ###
|
265 |
|
266 |
* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
|
69 |
|
70 |
Once set, the plugin will then be able to determine which content to auto share to social media.
|
71 |
|
72 |
+
### A RSS to Social Media Plugin
|
73 |
+
|
74 |
+
With our Revive Network addon, you can share posts from any RSS feed to Facebook, Twitter, Linkedin, Tumblr, Google My Business or Vkontakte(VK).
|
75 |
+
|
76 |
---
|
77 |
|
78 |
Revive Old Posts isn't like every other social media marketing tool. We've tailored its features while keeping the following in mind:
|
91 |
- WordPress to Linkedin Page [Pro]
|
92 |
- WordPress to Tumblr [Pro]
|
93 |
- WordPress to Google My Business(GMB) [Pro]
|
94 |
+
- WordPress to Vkontakte(VK) Profiles [Pro]
|
95 |
+
- WordPress to Vkontakte(VK) Communities [Pro]
|
96 |
|
97 |
Some of the available networks and features require the Pro version of the plugin. Check out the free vs pro table [here.](https://docs.revive.social/article/941-revive-old-post-free-vs-pro)
|
98 |
|
112 |
|
113 |
- **Automatically generate hashtags** for post shares from **tags**, **categories** or from **custom fields**. [Free]
|
114 |
|
115 |
+
- Include link **back to your site**. [Free]
|
116 |
|
117 |
- Compatible with **URL Shorteners**. Shorten the links for the content that you post to social media. [Free]
|
118 |
|
122 |
|
123 |
- Integrate with **Google Analytics** to track your social media traffic increase. [Free]
|
124 |
|
125 |
+
- Post to Facebook Pages. [Free]
|
126 |
+
|
127 |
+
- Post to Twitter. [Free]
|
128 |
+
|
129 |
+
- Post to Facebook Groups. [Pro]
|
130 |
+
|
131 |
+
- Post to LinkedIn Profiles. [Pro]
|
132 |
+
|
133 |
+
- Post to LinkedIn Pages. [Pro]
|
134 |
+
|
135 |
+
- Post to Tumblr Blogs [Pro]
|
136 |
+
|
137 |
+
- Post to Google My Business [Pro]
|
138 |
+
|
139 |
+
- Post to Vk Profiles [Pro]
|
140 |
+
|
141 |
+
- Post to Vk Communities [Pro]
|
142 |
+
|
143 |
And More! Try Revive Old Posts, see why it's the **best** WordPress social media marketing tool to boost your site traffic and keep your followers engaged.
|
144 |
|
145 |
|
149 |
|
150 |
**Awesome features in Pro:**
|
151 |
|
152 |
+
- RSS feed sharing. Share feed items from ANY website to your connected social media accounts. With the Revive Network addon(available with Revive Old Posts Pro) it's all possible.
|
153 |
+
|
154 |
- [Support for WordPress Custom Post Types](https://docs.revive.social/article/968-how-to-share-different-wordpress-post-types-to-social-media-w-revive-old-posts) (WooCommerce Products, BigCommerce Products, Recipes etc.)
|
155 |
|
156 |
- [Content Variations](https://docs.revive.social/article/971-how-to-add-variations-to-revive-old-posts-shares); Add multiple share variations to your posts, including custom images, ROP will automatically choose a variation to share!
|
170 |
|
171 |
- **WordPress to Google My Business(GMB)** scheduling and auto post
|
172 |
|
173 |
+
- **WordPress to Vkontakte(VK) Profiles** scheduling and auto post
|
174 |
+
|
175 |
+
- **WordPress to Vkontakte(VK) Communities** scheduling and auto post
|
176 |
|
177 |
- Connect **multiple social media accounts** to WP
|
178 |
|
242 |
|
243 |
- Yes, this feature is free for the accounts that can be connected via the free plugin (Facebook and Twitter). Once you check the option to post on publish, our plugin will do the rest.
|
244 |
|
245 |
+
**Can I share RSS feeds to social media?.**
|
246 |
+
|
247 |
+
- Yes, you will need our Revive Network addon which is currently in the beta stages of testing for Pro users.
|
248 |
+
|
249 |
**REST API error**
|
250 |
|
251 |
- This issue is normally caused by an antimalware or firewall plugin. Please try disabling all plugins(except Revive Old Posts) to see if the issue persists. If not then enable each plugin one by one while checking Revive Old Posts dashboard to see if the issue returns, that will help you determine the conflicting plugin.
|
292 |
|
293 |
|
294 |
## Changelog ##
|
295 |
+
### 8.6.4 - 2020-12-17 ###
|
296 |
+
|
297 |
+
* Change: Show admin notices only to users with 'manage_options' capability.
|
298 |
+
* Change: Skip sharing on websites where 'wp_get_environment_type()' doesn't return 'production'
|
299 |
+
* Change Pro: Fallback to article post share when no featured image is set and "Share as Image Post" option is checked in Post format settings.
|
300 |
+
* Change Pro: Limit the LinkedIn refresh token notification to 5 emails max.
|
301 |
+
* Info: Tested on WP 5.6
|
302 |
+
|
303 |
+
|
304 |
### 8.6.3 - 2020-12-08 ###
|
305 |
|
306 |
* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
|
readme.txt
CHANGED
@@ -69,6 +69,10 @@ With our plugin, it is possible to implement curation capabilities by **filterin
|
|
69 |
|
70 |
Once set, the plugin will then be able to determine which content to auto share to social media.
|
71 |
|
|
|
|
|
|
|
|
|
72 |
---
|
73 |
|
74 |
Revive Old Posts isn't like every other social media marketing tool. We've tailored its features while keeping the following in mind:
|
@@ -87,7 +91,8 @@ Revive Old Posts isn't like every other social media marketing tool. We've tailo
|
|
87 |
- WordPress to Linkedin Page [Pro]
|
88 |
- WordPress to Tumblr [Pro]
|
89 |
- WordPress to Google My Business(GMB) [Pro]
|
90 |
-
- WordPress to Vkontakte(VK) [Pro]
|
|
|
91 |
|
92 |
Some of the available networks and features require the Pro version of the plugin. Check out the free vs pro table [here.](https://docs.revive.social/article/941-revive-old-post-free-vs-pro)
|
93 |
|
@@ -107,7 +112,7 @@ Some of the available networks and features require the Pro version of the plugi
|
|
107 |
|
108 |
- **Automatically generate hashtags** for post shares from **tags**, **categories** or from **custom fields**. [Free]
|
109 |
|
110 |
-
- Include
|
111 |
|
112 |
- Compatible with **URL Shorteners**. Shorten the links for the content that you post to social media. [Free]
|
113 |
|
@@ -117,6 +122,24 @@ Some of the available networks and features require the Pro version of the plugi
|
|
117 |
|
118 |
- Integrate with **Google Analytics** to track your social media traffic increase. [Free]
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
And More! Try Revive Old Posts, see why it's the **best** WordPress social media marketing tool to boost your site traffic and keep your followers engaged.
|
121 |
|
122 |
|
@@ -126,6 +149,8 @@ Using the PRO version of Revive Old Posts unlocks a host of additional features
|
|
126 |
|
127 |
**Awesome features in Pro:**
|
128 |
|
|
|
|
|
129 |
- [Support for WordPress Custom Post Types](https://docs.revive.social/article/968-how-to-share-different-wordpress-post-types-to-social-media-w-revive-old-posts) (WooCommerce Products, BigCommerce Products, Recipes etc.)
|
130 |
|
131 |
- [Content Variations](https://docs.revive.social/article/971-how-to-add-variations-to-revive-old-posts-shares); Add multiple share variations to your posts, including custom images, ROP will automatically choose a variation to share!
|
@@ -145,7 +170,9 @@ Using the PRO version of Revive Old Posts unlocks a host of additional features
|
|
145 |
|
146 |
- **WordPress to Google My Business(GMB)** scheduling and auto post
|
147 |
|
148 |
-
- **WordPress to Vkontakte(VK)** scheduling and auto post
|
|
|
|
|
149 |
|
150 |
- Connect **multiple social media accounts** to WP
|
151 |
|
@@ -215,6 +242,10 @@ If you have any questions please ask on the [support forum](https://wordpress.or
|
|
215 |
|
216 |
- Yes, this feature is free for the accounts that can be connected via the free plugin (Facebook and Twitter). Once you check the option to post on publish, our plugin will do the rest.
|
217 |
|
|
|
|
|
|
|
|
|
218 |
**REST API error**
|
219 |
|
220 |
- This issue is normally caused by an antimalware or firewall plugin. Please try disabling all plugins(except Revive Old Posts) to see if the issue persists. If not then enable each plugin one by one while checking Revive Old Posts dashboard to see if the issue returns, that will help you determine the conflicting plugin.
|
@@ -261,6 +292,15 @@ http://revive.social/plugins/revive-old-post
|
|
261 |
|
262 |
|
263 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
= 8.6.3 - 2020-12-08 =
|
265 |
|
266 |
* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
|
69 |
|
70 |
Once set, the plugin will then be able to determine which content to auto share to social media.
|
71 |
|
72 |
+
### A RSS to Social Media Plugin
|
73 |
+
|
74 |
+
With our Revive Network addon, you can share posts from any RSS feed to Facebook, Twitter, Linkedin, Tumblr, Google My Business or Vkontakte(VK).
|
75 |
+
|
76 |
---
|
77 |
|
78 |
Revive Old Posts isn't like every other social media marketing tool. We've tailored its features while keeping the following in mind:
|
91 |
- WordPress to Linkedin Page [Pro]
|
92 |
- WordPress to Tumblr [Pro]
|
93 |
- WordPress to Google My Business(GMB) [Pro]
|
94 |
+
- WordPress to Vkontakte(VK) Profiles [Pro]
|
95 |
+
- WordPress to Vkontakte(VK) Communities [Pro]
|
96 |
|
97 |
Some of the available networks and features require the Pro version of the plugin. Check out the free vs pro table [here.](https://docs.revive.social/article/941-revive-old-post-free-vs-pro)
|
98 |
|
112 |
|
113 |
- **Automatically generate hashtags** for post shares from **tags**, **categories** or from **custom fields**. [Free]
|
114 |
|
115 |
+
- Include link **back to your site**. [Free]
|
116 |
|
117 |
- Compatible with **URL Shorteners**. Shorten the links for the content that you post to social media. [Free]
|
118 |
|
122 |
|
123 |
- Integrate with **Google Analytics** to track your social media traffic increase. [Free]
|
124 |
|
125 |
+
- Post to Facebook Pages. [Free]
|
126 |
+
|
127 |
+
- Post to Twitter. [Free]
|
128 |
+
|
129 |
+
- Post to Facebook Groups. [Pro]
|
130 |
+
|
131 |
+
- Post to LinkedIn Profiles. [Pro]
|
132 |
+
|
133 |
+
- Post to LinkedIn Pages. [Pro]
|
134 |
+
|
135 |
+
- Post to Tumblr Blogs [Pro]
|
136 |
+
|
137 |
+
- Post to Google My Business [Pro]
|
138 |
+
|
139 |
+
- Post to Vk Profiles [Pro]
|
140 |
+
|
141 |
+
- Post to Vk Communities [Pro]
|
142 |
+
|
143 |
And More! Try Revive Old Posts, see why it's the **best** WordPress social media marketing tool to boost your site traffic and keep your followers engaged.
|
144 |
|
145 |
|
149 |
|
150 |
**Awesome features in Pro:**
|
151 |
|
152 |
+
- RSS feed sharing. Share feed items from ANY website to your connected social media accounts. With the Revive Network addon(available with Revive Old Posts Pro) it's all possible.
|
153 |
+
|
154 |
- [Support for WordPress Custom Post Types](https://docs.revive.social/article/968-how-to-share-different-wordpress-post-types-to-social-media-w-revive-old-posts) (WooCommerce Products, BigCommerce Products, Recipes etc.)
|
155 |
|
156 |
- [Content Variations](https://docs.revive.social/article/971-how-to-add-variations-to-revive-old-posts-shares); Add multiple share variations to your posts, including custom images, ROP will automatically choose a variation to share!
|
170 |
|
171 |
- **WordPress to Google My Business(GMB)** scheduling and auto post
|
172 |
|
173 |
+
- **WordPress to Vkontakte(VK) Profiles** scheduling and auto post
|
174 |
+
|
175 |
+
- **WordPress to Vkontakte(VK) Communities** scheduling and auto post
|
176 |
|
177 |
- Connect **multiple social media accounts** to WP
|
178 |
|
242 |
|
243 |
- Yes, this feature is free for the accounts that can be connected via the free plugin (Facebook and Twitter). Once you check the option to post on publish, our plugin will do the rest.
|
244 |
|
245 |
+
**Can I share RSS feeds to social media?.**
|
246 |
+
|
247 |
+
- Yes, you will need our Revive Network addon which is currently in the beta stages of testing for Pro users.
|
248 |
+
|
249 |
**REST API error**
|
250 |
|
251 |
- This issue is normally caused by an antimalware or firewall plugin. Please try disabling all plugins(except Revive Old Posts) to see if the issue persists. If not then enable each plugin one by one while checking Revive Old Posts dashboard to see if the issue returns, that will help you determine the conflicting plugin.
|
292 |
|
293 |
|
294 |
== Changelog ==
|
295 |
+
= 8.6.4 - 2020-12-17 =
|
296 |
+
|
297 |
+
* Change: Show admin notices only to users with 'manage_options' capability.
|
298 |
+
* Change: Skip sharing on websites where 'wp_get_environment_type()' doesn't return 'production'
|
299 |
+
* Change Pro: Fallback to article post share when no featured image is set and "Share as Image Post" option is checked in Post format settings.
|
300 |
+
* Change Pro: Limit the LinkedIn refresh token notification to 5 emails max.
|
301 |
+
* Info: Tested on WP 5.6
|
302 |
+
|
303 |
+
|
304 |
= 8.6.3 - 2020-12-08 =
|
305 |
|
306 |
* Info Pro: Add Revive Network base support. Apply to be a Beta tester [here](https://forms.gle/M4mcqrFZze4Pe4pu7)
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"class-rop-autoloader.php":"7bfbb1554230d0ace777adb2e42bebeb","index.php":"39ab8276fb0e4bd3fcab3270822c5977","tweet-old-post.php":"
|
1 |
+
{"class-rop-autoloader.php":"7bfbb1554230d0ace777adb2e42bebeb","index.php":"39ab8276fb0e4bd3fcab3270822c5977","tweet-old-post.php":"2cd68584d3cbd5f0fb36c51fa835b551","uninstall.php":"c350fd79cac473d2dcdabc0bc277dd23"}
|
tweet-old-post.php
CHANGED
@@ -16,11 +16,11 @@
|
|
16 |
* Plugin Name: Revive Old Posts
|
17 |
* Plugin URI: https://revive.social/
|
18 |
* Description: WordPress plugin that helps you to keeps your old posts alive by sharing them and driving more traffic to them from twitter/facebook or linkedin. It also helps you to promote your content. You can set time and no of posts to share to drive more traffic.For questions, comments, or feature requests, <a href="http://revive.social/support/?utm_source=plugindesc&utm_medium=announce&utm_campaign=top">contact </a> us!
|
19 |
-
* Version: 8.6.
|
20 |
* Author: revive.social
|
21 |
* Author URI: https://revive.social/
|
22 |
* Requires at least: 3.5
|
23 |
-
* Tested up to: 5.
|
24 |
* Stable tag: trunk
|
25 |
* WordPress Available: yes
|
26 |
* Pro Slug: tweet-old-post-pro
|
@@ -162,9 +162,15 @@ function run_rop() {
|
|
162 |
define( 'ROP_CRON_ALTERNATIVE', $use_remote_cron );
|
163 |
|
164 |
define( 'ROP_PRO_URL', 'http://revive.social/plugins/revive-old-post/' );
|
165 |
-
define( 'ROP_LITE_VERSION', '8.6.
|
166 |
define( 'ROP_LITE_BASE_FILE', __FILE__ );
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
define( 'ROP_LITE_PATH', plugin_dir_path( __FILE__ ) );
|
169 |
define( 'ROP_PRO_PATH', WP_PLUGIN_DIR . '/tweet-old-post-pro/' );
|
170 |
define( 'ROP_PATH', plugin_dir_path( __FILE__ ) );
|
16 |
* Plugin Name: Revive Old Posts
|
17 |
* Plugin URI: https://revive.social/
|
18 |
* Description: WordPress plugin that helps you to keeps your old posts alive by sharing them and driving more traffic to them from twitter/facebook or linkedin. It also helps you to promote your content. You can set time and no of posts to share to drive more traffic.For questions, comments, or feature requests, <a href="http://revive.social/support/?utm_source=plugindesc&utm_medium=announce&utm_campaign=top">contact </a> us!
|
19 |
+
* Version: 8.6.4
|
20 |
* Author: revive.social
|
21 |
* Author URI: https://revive.social/
|
22 |
* Requires at least: 3.5
|
23 |
+
* Tested up to: 5.6
|
24 |
* Stable tag: trunk
|
25 |
* WordPress Available: yes
|
26 |
* Pro Slug: tweet-old-post-pro
|
162 |
define( 'ROP_CRON_ALTERNATIVE', $use_remote_cron );
|
163 |
|
164 |
define( 'ROP_PRO_URL', 'http://revive.social/plugins/revive-old-post/' );
|
165 |
+
define( 'ROP_LITE_VERSION', '8.6.4' );
|
166 |
define( 'ROP_LITE_BASE_FILE', __FILE__ );
|
167 |
+
$debug = false;
|
168 |
+
if ( function_exists( 'wp_get_environment_type' ) ) {
|
169 |
+
if ( wp_get_environment_type() !== 'production' ) {
|
170 |
+
$debug = true;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
define( 'ROP_DEBUG', $debug );
|
174 |
define( 'ROP_LITE_PATH', plugin_dir_path( __FILE__ ) );
|
175 |
define( 'ROP_PRO_PATH', WP_PLUGIN_DIR . '/tweet-old-post-pro/' );
|
176 |
define( 'ROP_PATH', plugin_dir_path( __FILE__ ) );
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitf5d89683a997c33e2d14f11c31a5be9f::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit63e15ca4910a8f6c8f8c6fcc0a5960a5
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit63e15ca4910a8f6c8f8c6fcc0a5960a5
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitf5d89683a997c33e2d14f11c31a5be9f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitf5d89683a997c33e2d14f11c31a5be9f', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf5d89683a997c33e2d14f11c31a5be9f', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
+
composerRequiref5d89683a997c33e2d14f11c31a5be9f($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequiref5d89683a997c33e2d14f11c31a5be9f($fileIdentifier, $file)
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|