Changeset 11225
- Timestamp:
- 09/10/2021 10:25:05 PM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn
- Files:
-
- 4 added
- 15 edited
-
build/block-styles.asset.php (modified) (1 diff)
-
build/block-styles.js (modified) (1 diff)
-
build/event.asset.php (modified) (1 diff)
-
build/event.js (modified) (1 diff)
-
build/expiration-date.asset.php (added)
-
build/expiration-date.js (added)
-
build/form.asset.php (modified) (1 diff)
-
build/form.js (modified) (1 diff)
-
build/locale-notice.asset.php (modified) (1 diff)
-
build/locale-notice.js (modified) (1 diff)
-
build/workshop-application-form.asset.php (modified) (1 diff)
-
build/workshop-application-form.js (modified) (1 diff)
-
build/workshop-details.asset.php (modified) (1 diff)
-
build/workshop-details.js (modified) (1 diff)
-
inc/admin.php (modified) (2 diffs)
-
inc/post-meta.php (modified) (5 diffs)
-
js/expiration-date (added)
-
js/expiration-date/index.js (added)
-
webpack.config.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/block-styles.asset.php
r10880 r11225 1 <?php return array('dependencies' => array('wp-blocks', 'wp-i18n', 'wp-polyfill'), 'version' => ' 18933d645390b46ece95dfd82c251889');1 <?php return array('dependencies' => array('wp-blocks', 'wp-i18n', 'wp-polyfill'), 'version' => '7f9054db1e487ee9de65f00d04a4fc6c'); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/block-styles.js
r10880 r11225 1 (window.wporgLearnPlugin=window.wporgLearnPlugin||[]).push([[ 4],{6:function(e,r,t){}}]),function(e){function r(r){for(var n,u,i=r[0],c=r[1],a=r[2],f=0,s=[];f<i.length;f++)u=i[f],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&s.push(o[u][0]),o[u]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(p&&p(r);s.length;)s.shift()();return l.push.apply(l,a||[]),t()}function t(){for(var e,r=0;r<l.length;r++){for(var t=l[r],n=!0,i=1;i<t.length;i++){var c=t[i];0!==o[c]&&(n=!1)}n&&(l.splice(r--,1),e=u(u.s=t[0]))}return e}var n={},o={0:0},l=[];function u(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.m=e,u.c=n,u.d=function(e,r,t){u.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,r){if(1&r&&(e=u(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)u.d(t,n,function(r){return e[r]}.bind(null,n));return t},u.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(r,"a",r),r},u.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},u.p="";var i=window.wporgLearnPlugin=window.wporgLearnPlugin||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=c;l.push([5,4]),t()}([function(e,r){!function(){e.exports=this.wp.i18n}()},function(e,r){!function(){e.exports=this.wp.blocks}()},,,,function(e,r,t){"use strict";t.r(r);var n=t(1),o=t(0);t(6);Object(n.registerBlockStyle)("core/button",{name:"primary",label:Object(o.__)("Primary","wporg-learn")}),Object(n.registerBlockStyle)("core/button",{name:"primary-full-width",label:Object(o.__)("Primary (Full-width)","wporg-learn")}),Object(n.registerBlockStyle)("core/button",{name:"secondary",label:Object(o.__)("Secondary","wporg-learn")}),Object(n.registerBlockStyle)("core/button",{name:"secondary-full-width",label:Object(o.__)("Secondary (Full-width)","wporg-learn")})}]);1 (window.wporgLearnPlugin=window.wporgLearnPlugin||[]).push([[5],{11:function(e,r,t){}}]),function(e){function r(r){for(var n,u,i=r[0],c=r[1],a=r[2],f=0,s=[];f<i.length;f++)u=i[f],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&s.push(o[u][0]),o[u]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(p&&p(r);s.length;)s.shift()();return l.push.apply(l,a||[]),t()}function t(){for(var e,r=0;r<l.length;r++){for(var t=l[r],n=!0,i=1;i<t.length;i++){var c=t[i];0!==o[c]&&(n=!1)}n&&(l.splice(r--,1),e=u(u.s=t[0]))}return e}var n={},o={0:0},l=[];function u(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.m=e,u.c=n,u.d=function(e,r,t){u.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,r){if(1&r&&(e=u(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)u.d(t,n,function(r){return e[r]}.bind(null,n));return t},u.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(r,"a",r),r},u.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},u.p="";var i=window.wporgLearnPlugin=window.wporgLearnPlugin||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=c;l.push([10,5]),t()}({1:function(e,r){!function(){e.exports=this.wp.i18n}()},10:function(e,r,t){"use strict";t.r(r);var n=t(2),o=t(1);t(11);Object(n.registerBlockStyle)("core/button",{name:"primary",label:Object(o.__)("Primary","wporg-learn")}),Object(n.registerBlockStyle)("core/button",{name:"primary-full-width",label:Object(o.__)("Primary (Full-width)","wporg-learn")}),Object(n.registerBlockStyle)("core/button",{name:"secondary",label:Object(o.__)("Secondary","wporg-learn")}),Object(n.registerBlockStyle)("core/button",{name:"secondary-full-width",label:Object(o.__)("Secondary (Full-width)","wporg-learn")})},2:function(e,r){!function(){e.exports=this.wp.blocks}()}}); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/event.asset.php
r10486 r11225 1 <?php return array('dependencies' => array('wp-date', 'wp-polyfill'), 'version' => ' 09ab956fd218879057b719ac22233c5f');1 <?php return array('dependencies' => array('wp-date', 'wp-polyfill'), 'version' => 'c13930e099ad0930395439aaff46d2c0'); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/event.js
r10486 r11225 1 !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s= 8)}({4:function(t,e){!function(){t.exports=this.wp.date}()},8:function(t,e,r){"use strict";r.r(e);var n,o=r(4);n=document.querySelectorAll("[data-date-utc]"),Array.from(n).forEach((function(t){var e=t.dataset.dateUtc;t.textContent=Object(o.format)("l, F j, Y, g:i a (\\U\\T\\CP)",e)}))}});1 !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=19)}({19:function(t,e,r){"use strict";r.r(e);var n,o=r(4);n=document.querySelectorAll("[data-date-utc]"),Array.from(n).forEach((function(t){var e=t.dataset.dateUtc;t.textContent=Object(o.format)("l, F j, Y, g:i a (\\U\\T\\CP)",e)}))},4:function(t,e){!function(){t.exports=this.wp.date}()}}); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/form.asset.php
r10486 r11225 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 661fa5f9ce11797c09f97d519d9f2228');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => '3189e23b25b30e886a66f5f9a9093bc8'); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/form.js
r10486 r11225 1 !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s= 9)}({9:function(e,t){var r,n,o=window.jQuery||{};r=o,n=document.querySelectorAll(".checkbox-and-text"),Array.from(n).forEach((function(e){var t=e.querySelector('input[type="checkbox"]'),r=e.querySelector('input[type="text"]');r.addEventListener("input",(function(e){return t.checked=!!e.target.value})),t.addEventListener("change",(function(e){e.target.checked?r.focus():r.value=""}))})),r(".do-select2").select2({dropdownParent:r(".wporg-learn-workshop-application-form")})}});1 !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}({20:function(e,t){var r,n,o=window.jQuery||{};r=o,n=document.querySelectorAll(".checkbox-and-text"),Array.from(n).forEach((function(e){var t=e.querySelector('input[type="checkbox"]'),r=e.querySelector('input[type="text"]');r.addEventListener("input",(function(e){return t.checked=!!e.target.value})),t.addEventListener("change",(function(e){e.target.checked?r.focus():r.value=""}))})),r(".do-select2").select2({dropdownParent:r(".wporg-learn-workshop-application-form")})}}); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/locale-notice.asset.php
r10880 r11225 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 84f5ab9ec09410e4706b2a76183b69b6');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => '0ed9ee006e970f0abe5e909b4e6a294f'); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/locale-notice.js
r10880 r11225 1 !function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s= 10)}({10:function(e,n){!function(e,n,t){"use strict";var o=e.WPOrgLearnLocaleNotice||{},i=n.extend(o,{$notice:n(),init:function(){i.$notice=n(".wporg-learn-locale-notice"),i.$notice.on("click",".wporg-learn-locale-notice-dismiss",(function(e){e.preventDefault(),i.dismissNotice()}))},dismissNotice:function(){i.$notice.fadeTo(100,0,(function(){i.$notice.slideUp(100,(function(){i.$notice.remove()}))})),t.set("wporg-learn-locale-notice-dismissed",!0,i.cookie.expires,i.cookie.cpath,i.cookie.domain,i.cookie.secure)}});n(document).ready((function(){i.init()}))}(window,jQuery,wpCookies)}});1 !function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=21)}({21:function(e,n){!function(e,n,t){"use strict";var o=e.WPOrgLearnLocaleNotice||{},i=n.extend(o,{$notice:n(),init:function(){i.$notice=n(".wporg-learn-locale-notice"),i.$notice.on("click",".wporg-learn-locale-notice-dismiss",(function(e){e.preventDefault(),i.dismissNotice()}))},dismissNotice:function(){i.$notice.fadeTo(100,0,(function(){i.$notice.slideUp(100,(function(){i.$notice.remove()}))})),t.set("wporg-learn-locale-notice-dismissed",!0,i.cookie.expires,i.cookie.cpath,i.cookie.domain,i.cookie.secure)}});n(document).ready((function(){i.init()}))}(window,jQuery,wpCookies)}}); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/workshop-application-form.asset.php
r10880 r11225 1 <?php return array('dependencies' => array('wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => ' 7a52258e4bf9fa512337ebbe9049aa41');1 <?php return array('dependencies' => array('wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '48a2c146975d765c0e319d558b741068'); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/workshop-application-form.js
r10880 r11225 1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s= 11)}([function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),i=n(2),c=n(3);Object(r.registerBlockType)("wporg-learn/workshop-application-form",{title:Object(o.__)("Workshop Application Form","wporg-learn"),description:Object(o.__)("Render a form for applying to present a workshop.","wporg-learn"),category:"widgets",icon:"forms",supports:{html:!1},edit:function(){return Object(i.createElement)(c.Placeholder,{label:Object(o.__)("Workshop Application Form","wporg-learn"),instructions:Object(o.__)("This will render a form on the front end.","wporg-learn")})},save:function(){return null}})}]);1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},2:function(e,t){!function(){e.exports=this.wp.blocks}()},22:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(1),i=n(0),c=n(3);Object(r.registerBlockType)("wporg-learn/workshop-application-form",{title:Object(o.__)("Workshop Application Form","wporg-learn"),description:Object(o.__)("Render a form for applying to present a workshop.","wporg-learn"),category:"widgets",icon:"forms",supports:{html:!1},edit:function(){return Object(i.createElement)(c.Placeholder,{label:Object(o.__)("Workshop Application Form","wporg-learn"),instructions:Object(o.__)("This will render a form on the front end.","wporg-learn")})},save:function(){return null}})},3:function(e,t){!function(){e.exports=this.wp.components}()}}); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/workshop-details.asset.php
r10880 r11225 1 <?php return array('dependencies' => array('wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => ' 92e896bab5233e81222807890a1ef4bb');1 <?php return array('dependencies' => array('wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'aea68dc33f0adc84cae8ee661ef82bde'); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/build/workshop-details.js
r10880 r11225 1 (window.wporgLearnPlugin=window.wporgLearnPlugin||[]).push([[ 5],{7:function(e,t,n){}}]),function(e){function t(t){for(var r,l,u=t[0],p=t[1],a=t[2],s=0,f=[];s<u.length;s++)l=u[s],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&f.push(o[l][0]),o[l]=0;for(r in p)Object.prototype.hasOwnProperty.call(p,r)&&(e[r]=p[r]);for(c&&c(t);f.length;)f.shift()();return i.push.apply(i,a||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,u=1;u<n.length;u++){var p=n[u];0!==o[p]&&(r=!1)}r&&(i.splice(t--,1),e=l(l.s=n[0]))}return e}var r={},o={7:0},i=[];function l(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,l),n.l=!0,n.exports}l.m=e,l.c=r,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var u=window.wporgLearnPlugin=window.wporgLearnPlugin||[],p=u.push.bind(u);u.push=t,u=u.slice();for(var a=0;a<u.length;a++)t(u[a]);var c=p;i.push([12,5]),n()}([function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),i=(n(7),n(2)),l=n(3);Object(r.registerBlockType)("wporg-learn/workshop-details",{title:Object(o.__)("Workshop Details","wporg-learn"),description:Object(o.__)("Show details about the workshop, pulled from post meta.","wporg-learn"),category:"widgets",icon:"smiley",supports:{html:!1},edit:function(){return Object(i.createElement)(l.Placeholder,{label:Object(o.__)("Workshop Details","wporg-learn")},Object(i.createElement)("p",null,Object(o.__)("This will be dynamically populated based on settings in the Workshop Details meta box.","wporg-learn")))},save:function(){return null}})}]);1 (window.wporgLearnPlugin=window.wporgLearnPlugin||[]).push([[6],{18:function(e,t,n){}}]),function(e){function t(t){for(var r,l,u=t[0],p=t[1],a=t[2],s=0,f=[];s<u.length;s++)l=u[s],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&f.push(o[l][0]),o[l]=0;for(r in p)Object.prototype.hasOwnProperty.call(p,r)&&(e[r]=p[r]);for(c&&c(t);f.length;)f.shift()();return i.push.apply(i,a||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,u=1;u<n.length;u++){var p=n[u];0!==o[p]&&(r=!1)}r&&(i.splice(t--,1),e=l(l.s=n[0]))}return e}var r={},o={8:0},i=[];function l(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,l),n.l=!0,n.exports}l.m=e,l.c=r,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var u=window.wporgLearnPlugin=window.wporgLearnPlugin||[],p=u.push.bind(u);u.push=t,u=u.slice();for(var a=0;a<u.length;a++)t(u[a]);var c=p;i.push([23,6]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},2:function(e,t){!function(){e.exports=this.wp.blocks}()},23:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(1),i=(n(18),n(0)),l=n(3);Object(r.registerBlockType)("wporg-learn/workshop-details",{title:Object(o.__)("Workshop Details","wporg-learn"),description:Object(o.__)("Show details about the workshop, pulled from post meta.","wporg-learn"),category:"widgets",icon:"smiley",supports:{html:!1},edit:function(){return Object(i.createElement)(l.Placeholder,{label:Object(o.__)("Workshop Details","wporg-learn")},Object(i.createElement)("p",null,Object(o.__)("This will be dynamically populated based on settings in the Workshop Details meta box.","wporg-learn")))},save:function(){return null}})},3:function(e,t){!function(){e.exports=this.wp.components}()}}); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/admin.php
r11057 r11225 18 18 add_action( 'restrict_manage_posts', __NAMESPACE__ . '\add_workshop_list_table_filters', 10, 2 ); 19 19 add_action( 'pre_get_posts', __NAMESPACE__ . '\handle_workshop_list_table_filters' ); 20 add_filter( 'display_post_states', __NAMESPACE__ . '\add_post_states', 10, 2 ); 21 foreach ( array( 'lesson-plan', 'wporg_workshop', 'course', 'lesson' ) as $pt ) { 22 add_filter( 'views_edit-' . $pt, __NAMESPACE__ . '\list_table_views' ); 23 } 24 add_action( 'pre_get_posts', __NAMESPACE__ . '\handle_list_table_views' ); 20 25 21 26 /** … … 208 213 } 209 214 } 215 216 /** 217 * Custom post states for list tables. 218 * 219 * @param array $post_states 220 * @param \WP_Post $post 221 * 222 * @return mixed 223 */ 224 function add_post_states( $post_states, $post ) { 225 $expiration_date = $post->expiration_date; 226 227 if ( $expiration_date ) { 228 $exp = strtotime( $expiration_date ); 229 $now = strtotime( 'now' ); 230 231 if ( $exp > $now ) { 232 $post_states[] = sprintf( 233 esc_html__( 'Expires in %s', 'wporg-learn' ), 234 esc_html( human_time_diff( $now, $exp ) ) 235 ); 236 } else { 237 $post_states[] = sprintf( 238 '<span style="color: #b32d2e;">%s</span>', 239 esc_html__( 'Expired', 'wporg-learn' ) 240 ); 241 } 242 } 243 244 return $post_states; 245 } 246 247 /** 248 * Add view links to the patterns list table. 249 * 250 * @param array $views 251 * 252 * @return array 253 */ 254 function list_table_views( $views ) { 255 global $typenow; 256 257 $wants_expired = filter_input( INPUT_GET, 'expired', FILTER_VALIDATE_BOOLEAN ); 258 259 $url = add_query_arg( 260 array( 261 'post_type' => $typenow, 262 'expired' => 1, 263 ), 264 admin_url( 'edit.php' ) 265 ); 266 267 $extra_attributes = ''; 268 if ( $wants_expired ) { 269 $extra_attributes = ' class="current" aria-current="page"'; 270 } 271 272 $expired_posts_query = new \WP_Query( array( 273 'post_type' => $typenow, 274 'post_status' => 'any', 275 'numberposts' => 1, 276 'meta_query' => array( 277 array( 278 'key' => 'expiration_date', 279 'value' => current_time( 'mysql' ), 280 'compare' => '<', 281 ), 282 ), 283 ) ); 284 285 $views['expired'] = sprintf( 286 '<a href="%s"%s>%s</a>', 287 esc_url( $url ), 288 $extra_attributes, 289 sprintf( 290 /* translators: %s: Number of posts. */ 291 _n( 292 'Expired <span class="count">(%s)</span>', 293 'Expired <span class="count">(%s)</span>', 294 $expired_posts_query->found_posts, 295 'wporg-learn' 296 ), 297 number_format_i18n( $expired_posts_query->found_posts ) 298 ) 299 ); 300 301 return $views; 302 } 303 304 305 /** 306 * Modify the query that populates the patterns list table. 307 * 308 * @param WP_Query $query 309 * 310 * @return void 311 */ 312 function handle_list_table_views( WP_Query $query ) { 313 global $typenow; 314 315 $wants_expired = filter_input( INPUT_GET, 'expired', FILTER_VALIDATE_BOOLEAN ); 316 317 if ( ! is_admin() || ! $query->is_main_query() ) { 318 return; 319 } 320 321 $current_screen = get_current_screen(); 322 323 if ( 'edit-' . $typenow === $current_screen->id ) { 324 if ( $wants_expired ) { 325 $meta_query = $query->get( 'meta_query', array() ); 326 327 $meta_query[] = array( 328 'key' => 'expiration_date', 329 'value' => current_time( 'mysql' ), 330 'compare' => '<', 331 ); 332 333 $query->set( 'meta_query', $meta_query ); 334 } 335 } 336 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-meta.php
r10926 r11225 6 6 use WP_Post; 7 7 use function WordPressdotorg\Locales\{ get_locales_with_english_names }; 8 use function WPOrg_Learn\ get_views_path;8 use function WPOrg_Learn\{ get_build_path, get_build_url, get_views_path }; 9 9 use function WPOrg_Learn\Form\get_workshop_application_field_schema; 10 10 … … 19 19 add_action( 'save_post_lesson-plan', __NAMESPACE__ . '\save_lesson_plan_metabox_fields' ); 20 20 add_action( 'save_post_wporg_workshop', __NAMESPACE__ . '\save_workshop_metabox_fields' ); 21 add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_editor_assets' ); 21 22 22 23 /** … … 26 27 register_lesson_plan_meta(); 27 28 register_workshop_meta(); 29 register_misc_meta(); 28 30 } 29 31 … … 139 141 ) 140 142 ); 143 } 144 145 /** 146 * Register other post meta keys. 147 * 148 * For multiple post types, for example. 149 */ 150 function register_misc_meta() { 151 // Expiration field. 152 $post_types = array( 'lesson-plan', 'wporg_workshop', 'course', 'lesson' ); 153 foreach ( $post_types as $post_type ) { 154 register_post_meta( 155 $post_type, 156 'expiration_date', 157 array( 158 'description' => __( 'The date when the content of the post may be obsolete.', 'wporg_learn' ), 159 'type' => 'string', 160 'single' => true, 161 'sanitize_callback' => function( $value ) { 162 return filter_var( $value, FILTER_SANITIZE_STRING ); 163 }, 164 'show_in_rest' => true, 165 ) 166 ); 167 } 141 168 } 142 169 … … 431 458 } 432 459 } 460 461 /** 462 * Enqueue scripts for the block editor. 463 */ 464 function enqueue_editor_assets() { 465 global $typenow; 466 467 $post_types_with_expiration = array( 'lesson-plan', 'wporg_workshop', 'course', 'lesson' ); 468 if ( in_array( $typenow, $post_types_with_expiration, true ) ) { 469 $script_asset_path = get_build_path() . 'expiration-date.asset.php'; 470 if ( ! file_exists( $script_asset_path ) ) { 471 wp_die( 'You need to run `yarn start` or `yarn build` to build the required assets.' ); 472 } 473 474 $script_asset = require( $script_asset_path ); 475 wp_enqueue_script( 476 'wporg-learn-expiration-date', 477 get_build_url() . 'expiration-date.js', 478 $script_asset['dependencies'], 479 $script_asset['version'], 480 true 481 ); 482 483 wp_set_script_translations( 'wporg-learn-expiration-date', 'wporg-learn' ); 484 } 485 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/webpack.config.js
r10880 r11225 6 6 config.entry = { 7 7 'block-styles': './js/block-styles/index.js', 8 'expiration-date': './js/expiration-date/index.js', 8 9 'workshop-application-form': './js/workshop-application-form/src/index.js', 9 10 'workshop-details': './js/workshop-details/src/index.js',
Note: See TracChangeset
for help on using the changeset viewer.