Plugin Directory

Changeset 3452265


Ignore:
Timestamp:
02/02/2026 04:46:11 PM (2 weeks ago)
Author:
badasswp
Message:

Deploy version 1.1.0 for make-post-dirty

Location:
make-post-dirty
Files:
158 added
12 edited

Legend:

Unmodified
Added
Removed
  • make-post-dirty/trunk/composer.json

    r3386596 r3452265  
    11{
    2     "name": "badasswp/make-post-dirty",
    3     "description": "A useful tool for populating the block editor title and content.",
    4     "type": "package",
    5     "license": "GPL-2.0-or-later",
    6     "autoload": {
    7         "psr-4": {
    8             "MakePostDirty\\": "inc/",
    9             "MakePostDirty\\Tests\\": "tests/"
    10         }
    11     },
    12     "authors": [
    13         {
    14             "name": "badasswp",
    15             "email": "[email protected]"
    16         }
    17     ],
    18     "require-dev": {
    19         "phpunit/phpunit": "^9.6",
    20         "mockery/mockery": "^1.6",
    21         "10up/wp_mock": "^1.0",
    22         "wp-coding-standards/wpcs": "^3.0",
    23         "dealerdirect/phpcodesniffer-composer-installer": "^1.0",
    24         "php-coveralls/php-coveralls": "^2.5",
    25         "phpunit/phpcov": "^8.2",
    26         "phpstan/phpstan": "^1.10",
    27         "szepeviktor/phpstan-wordpress": "^1.3",
    28         "phpstan/extension-installer": "^1.3"
    29     },
    30     "config": {
    31         "allow-plugins": {
    32             "dealerdirect/phpcodesniffer-composer-installer": true,
    33             "phpstan/extension-installer": true
    34         }
    35     },
    36     "scripts": {
    37         "lint": "vendor/bin/phpcs -v",
    38         "lint:fix": "vendor/bin/phpcbf -v",
    39         "test": "vendor/bin/phpunit --testdox",
    40         "analyse": "vendor/bin/phpstan analyse --memory-limit=2048M"
    41     }
     2  "name": "badasswp/make-post-dirty",
     3  "description": "A useful tool for populating the block editor title and content.",
     4  "type": "wordpress-plugin",
     5  "license": "GPL-2.0-or-later",
     6  "autoload": {
     7    "psr-4": {
     8      "MakePostDirty\\": "inc/",
     9      "MakePostDirty\\Tests\\": "tests/"
     10    }
     11  },
     12  "authors": [
     13    {
     14      "name": "badasswp",
     15      "email": "[email protected]"
     16    }
     17  ],
     18  "require-dev": {
     19    "phpunit/phpunit": "^9.6",
     20    "mockery/mockery": "^1.6",
     21    "10up/wp_mock": "^1.0",
     22    "wp-coding-standards/wpcs": "^3.0",
     23    "dealerdirect/phpcodesniffer-composer-installer": "^1.0",
     24    "php-coveralls/php-coveralls": "^2.5",
     25    "phpunit/phpcov": "^8.2",
     26    "phpstan/phpstan": "^1.10",
     27    "szepeviktor/phpstan-wordpress": "^1.3",
     28    "phpstan/extension-installer": "^1.3",
     29    "badasswp/wp-mock-tc": "^1.0"
     30  },
     31  "config": {
     32    "allow-plugins": {
     33      "dealerdirect/phpcodesniffer-composer-installer": true,
     34      "phpstan/extension-installer": true
     35    }
     36  },
     37  "scripts": {
     38    "lint": "vendor/bin/phpcs -v",
     39    "lint:fix": "vendor/bin/phpcbf -v",
     40    "test": "vendor/bin/phpunit --testdox",
     41    "analyse": "vendor/bin/phpstan analyse --memory-limit=2048M"
     42  }
    4243}
  • make-post-dirty/trunk/dist/app.asset.php

    r3386596 r3452265  
    1 <?php return array('dependencies' => array('react', 'wp-components', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'b0ee0547444c42928b08');
     1<?php return array('dependencies' => array('react', 'wp-components', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '13905568ad2a3fc5ce0b');
  • make-post-dirty/trunk/dist/app.js

    r3386596 r3452265  
    1 (()=>{"use strict";var e={20:(e,t,n)=>{var o=n(609),i=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var o,l={},c=null,d=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)r.call(t,o)&&!a.hasOwnProperty(o)&&(l[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===l[o]&&(l[o]=t[o]);return{$$typeof:i,type:e,key:c,ref:d,props:l,_owner:s.current}}},143:e=>{e.exports=window.wp.data},279:e=>{e.exports=window.wp.plugins},308:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(609),i=n(573);const r=(0,o.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"}))},427:e=>{e.exports=window.wp.components},573:e=>{e.exports=window.wp.primitives},609:e=>{e.exports=window.React},656:e=>{e.exports=window.wp.editor},723:e=>{e.exports=window.wp.i18n},744:(e,t,n)=>{n.d(t,{Y:()=>o});const o=[{title:"Cities Achievements Trends Perspective Challenges Essential Ideas",content:"Cinema continues to captivate the minds of experts and enthusiasts alike. New advancements are being made every day that shape the future of this field. Its impact is felt in both large and small aspects of daily life."},{title:"Theater Opportunities Innovation Perspective Framework Introduction Impact Solutions Breakthrough",content:"One cannot underestimate the influence of Literature in our modern society. It influences policy, education, and the economy in profound ways. Looking ahead, the growth of this field seems limitless."},{title:"Climate Framework Pathways Vision Handbook Revolution Exploration",content:"The world of Sports has seen remarkable changes in recent times. It challenges our thinking and pushes boundaries we once thought fixed. Its impact is felt in both large and small aspects of daily life."},{title:"Mountains Impact Development Revolution Achievements Handbook",content:"Across the globe, Ethics sparks conversations and drives progress. Professionals dedicate years to mastering its complexities and nuances. Many believe its best days are still yet to come."},{title:"AI Strategies Perspective Comprehensive Development Guide",content:"The world of Oceans has seen remarkable changes in recent times. New advancements are being made every day that shape the future of this field. Public interest in this area shows no signs of slowing down."}]},848:(e,t,n)=>{e.exports=n(20)}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o=n(848),i=n(723),r=n(143),s=n(308),a=n(279),l=n(656),c=n(427),d=n(744);(0,a.registerPlugin)("make-post-dirty",{icon:null,render:()=>{const{editPost:e,savePost:t}=(0,r.useDispatch)(l.store),{title:n,content:a,random:p,wpVersion:u}=window.makePostDirty,h=parseFloat(u)>=6.6?"PinnedItems/core":"PinnedItems/core/edit-post",m=({attribute:n,value:o})=>{let r=0;const s=[];return new Promise((a,l)=>{const c=setInterval(()=>{s[n]=o.substring(0,r),e(s),r===o.length&&(clearInterval(c),t(),a(o)),r>o.length&&l((0,i.sprintf)("Something went wrong: %s",o)),r++},10)})};return(0,o.jsx)(c.Fill,{name:h,children:(0,o.jsx)(c.Tooltip,{text:(0,i.__)("Make Post Dirty","make-post-dirty"),children:(0,o.jsx)(c.Button,{onClick:()=>{return e=void 0,t=void 0,i=function*(){const e=Math.floor(Math.random()*((null===d.Y||void 0===d.Y?void 0:d.Y.length)||1)),{title:t,content:o}=d.Y[e]||{title:n,content:a};yield m({attribute:"title",value:p?t:n}),yield m({attribute:"content",value:p?o:a})},new((o=void 0)||(o=Promise))(function(n,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())});var e,t,o,i},icon:s.A})})})}})})();
     1(()=>{"use strict";var e={20(e,t,n){var o=n(609),i=Symbol.for("react.element"),r=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var o,l={},c=null,d=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)r.call(t,o)&&!a.hasOwnProperty(o)&&(l[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===l[o]&&(l[o]=t[o]);return{$$typeof:i,type:e,key:c,ref:d,props:l,_owner:s.current}}},143(e){e.exports=window.wp.data},279(e){e.exports=window.wp.plugins},308(e,t,n){n.d(t,{A:()=>r});var o=n(609),i=n(573);const r=(0,o.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"}))},427(e){e.exports=window.wp.components},573(e){e.exports=window.wp.primitives},609(e){e.exports=window.React},656(e){e.exports=window.wp.editor},723(e){e.exports=window.wp.i18n},744(e,t,n){n.d(t,{Y:()=>o});const o=[{title:"Cities Achievements Trends Perspective Challenges Essential Ideas",content:"Cinema continues to captivate the minds of experts and enthusiasts alike. New advancements are being made every day that shape the future of this field. Its impact is felt in both large and small aspects of daily life."},{title:"Theater Opportunities Innovation Perspective Framework Introduction Impact Solutions Breakthrough",content:"One cannot underestimate the influence of Literature in our modern society. It influences policy, education, and the economy in profound ways. Looking ahead, the growth of this field seems limitless."},{title:"Climate Framework Pathways Vision Handbook Revolution Exploration",content:"The world of Sports has seen remarkable changes in recent times. It challenges our thinking and pushes boundaries we once thought fixed. Its impact is felt in both large and small aspects of daily life."},{title:"Mountains Impact Development Revolution Achievements Handbook",content:"Across the globe, Ethics sparks conversations and drives progress. Professionals dedicate years to mastering its complexities and nuances. Many believe its best days are still yet to come."},{title:"AI Strategies Perspective Comprehensive Development Guide",content:"The world of Oceans has seen remarkable changes in recent times. New advancements are being made every day that shape the future of this field. Public interest in this area shows no signs of slowing down."}]},848(e,t,n){e.exports=n(20)}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o=n(848),i=n(723),r=n(143),s=n(308),a=n(279),l=n(656),c=n(427),d=n(744);(0,a.registerPlugin)("make-post-dirty",{icon:null,render:()=>{const{editPost:e,savePost:t}=(0,r.useDispatch)(l.store),{title:n,content:a,random:p,animationEnable:u,animationSpeed:h,wpVersion:m}=window.makePostDirty,v=parseFloat(m)>=6.6?"PinnedItems/core":"PinnedItems/core/edit-post",f=({attribute:t,value:n})=>{let o=0;const r=[];return new Promise((s,a)=>{const l=setInterval(()=>{r[t]=n.substring(0,o),e(r),o===n.length&&(clearInterval(l),s(n)),o>n.length&&a((0,i.sprintf)("Something went wrong: %s",n)),o++},parseInt(h)||10)})};return(0,o.jsx)(c.Fill,{name:v,children:(0,o.jsx)(c.Tooltip,{text:(0,i.__)("Make Post Dirty","make-post-dirty"),children:(0,o.jsx)(c.Button,{onClick:()=>{return o=void 0,i=void 0,s=function*(){const o=Math.floor(Math.random()*((null===d.Y||void 0===d.Y?void 0:d.Y.length)||1)),{title:i,content:r}=d.Y[o]||{title:n,content:a};if("1"===u)return yield f({attribute:"title",value:p?i:n}),yield f({attribute:"content",value:p?r:a}),e({status:"publish"}),void(yield t());e({title:p?i:n,content:p?r:a,status:"publish"}),yield t()},new((r=void 0)||(r=Promise))(function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r(function(e){e(o)})).then(n,a)}l((s=s.apply(o,i||[])).next())});var o,i,r,s},icon:s.A,"data-testid":"make-post-dirty-btn"})})})}})})();
    22//# sourceMappingURL=app.js.map
  • make-post-dirty/trunk/dist/app.js.map

    r3386596 r3452265  
    1 {"version":3,"file":"app.js","mappings":"2CASiBA,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAgDC,GAA7BF,OAAOC,IAAI,kBAAoBE,OAAOC,UAAUC,gBAAeC,EAAER,EAAES,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAC+FC,EAAQC,IAAvV,SAAWC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEP,MAAMW,EAAE,GAAGJ,EAAEP,UAAK,IAASO,EAAEN,MAAMW,EAAEL,EAAEN,KAAcM,EAAEf,EAAEqB,KAAKN,EAAEE,KAAKV,EAAEJ,eAAec,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAEQ,aAAa,IAAIL,KAAKF,EAAED,EAAEQ,kBAAe,IAASJ,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACM,SAAS1B,EAAE2B,KAAKV,EAAEN,IAAIW,EAAEV,IAAIW,EAAEK,MA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_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://make-post-dirty/external window [\"wp\",\"data\"]","webpack://make-post-dirty/external window [\"wp\",\"plugins\"]","webpack://make-post-dirty/./node_modules/@wordpress/icons/build-module/library/comment-edit-link.js","webpack://make-post-dirty/external window [\"wp\",\"components\"]","webpack://make-post-dirty/external window [\"wp\",\"primitives\"]","webpack://make-post-dirty/external window \"React\"","webpack://make-post-dirty/external window [\"wp\",\"editor\"]","webpack://make-post-dirty/external window [\"wp\",\"i18n\"]","webpack://make-post-dirty/./src/utils/posts.tsx","webpack://make-post-dirty/./node_modules/react/jsx-runtime.js","webpack://make-post-dirty/webpack/bootstrap","webpack://make-post-dirty/webpack/runtime/compat get default export","webpack://make-post-dirty/webpack/runtime/define property getters","webpack://make-post-dirty/webpack/runtime/hasOwnProperty shorthand","webpack://make-post-dirty/./src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"plugins\"];","import { createElement } from \"react\";\n/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\nconst commentEditLink = createElement(SVG, {\n  width: \"24\",\n  height: \"24\",\n  viewBox: \"0 0 24 24\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, createElement(Path, {\n  d: \"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z\"\n}));\nexport default commentEditLink;\n//# sourceMappingURL=comment-edit-link.js.map","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"primitives\"];","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"editor\"];","module.exports = window[\"wp\"][\"i18n\"];","export const posts = [\n\t{\n\t\ttitle: 'Cities Achievements Trends Perspective Challenges Essential Ideas',\n\t\tcontent:\n\t\t\t'Cinema continues to captivate the minds of experts and enthusiasts alike. New advancements are being made every day that shape the future of this field. Its impact is felt in both large and small aspects of daily life.',\n\t},\n\t{\n\t\ttitle: 'Theater Opportunities Innovation Perspective Framework Introduction Impact Solutions Breakthrough',\n\t\tcontent:\n\t\t\t'One cannot underestimate the influence of Literature in our modern society. It influences policy, education, and the economy in profound ways. Looking ahead, the growth of this field seems limitless.',\n\t},\n\t{\n\t\ttitle: 'Climate Framework Pathways Vision Handbook Revolution Exploration',\n\t\tcontent:\n\t\t\t'The world of Sports has seen remarkable changes in recent times. It challenges our thinking and pushes boundaries we once thought fixed. Its impact is felt in both large and small aspects of daily life.',\n\t},\n\t{\n\t\ttitle: 'Mountains Impact Development Revolution Achievements Handbook',\n\t\tcontent:\n\t\t\t'Across the globe, Ethics sparks conversations and drives progress. Professionals dedicate years to mastering its complexities and nuances. Many believe its best days are still yet to come.',\n\t},\n\t{\n\t\ttitle: 'AI Strategies Perspective Comprehensive Development Guide',\n\t\tcontent:\n\t\t\t'The world of Oceans has seen remarkable changes in recent times. New advancements are being made every day that shape the future of this field. Public interest in this area shows no signs of slowing down.',\n\t},\n];\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { commentEditLink } from '@wordpress/icons';\nimport { registerPlugin } from '@wordpress/plugins';\nimport { store as editorStore } from '@wordpress/editor';\nimport { Fill, Button, Tooltip } from '@wordpress/components';\n\nimport { posts } from './utils/posts';\nimport { Post } from './utils/interfaces';\n\n/**\n * Make Post Dirty.\n *\n * This component returns a button that is\n * placed in the PinnedItems area. It's sole purpose\n * is for populating the post title and content.\n *\n * @since 1.0.0\n *\n * @return {JSX.Element} MakePostDirty\n */\nconst MakePostDirty = (): JSX.Element => {\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\tconst { title, content, random, wpVersion } = window.makePostDirty;\n\n\t// Slot fill name changed in WP 6.6.\n\tconst fillName =\n\t\tparseFloat( wpVersion ) >= 6.6\n\t\t\t? 'PinnedItems/core'\n\t\t\t: 'PinnedItems/core/edit-post';\n\n\t/**\n\t * Populate Post.\n\t *\n\t * Make post dirty by filling in the\n\t * title and content.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param  prop           The object.\n\t * @param  prop.attribute The post attribute for e.g. title or content.\n\t * @param  prop.value     The value for the attribute.\n\t *\n\t * @return {Promise<string>} Returns a promise that resolves to string value.\n\t */\n\tconst populatePost = ( { attribute, value }: Post ): Promise< string > => {\n\t\tlet limit: number = 0;\n\t\tconst dirty: string[] = [];\n\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst makeDirty = setInterval( () => {\n\t\t\t\tdirty[ attribute ] = value.substring( 0, limit );\n\t\t\t\teditPost( dirty );\n\n\t\t\t\tif ( limit === value.length ) {\n\t\t\t\t\tclearInterval( makeDirty );\n\t\t\t\t\tsavePost();\n\t\t\t\t\tresolve( value );\n\t\t\t\t}\n\n\t\t\t\tif ( limit > value.length ) {\n\t\t\t\t\treject( sprintf( 'Something went wrong: %s', value ) );\n\t\t\t\t}\n\t\t\t\tlimit++;\n\t\t\t}, 10 );\n\t\t} );\n\t};\n\n\t/**\n\t * Click Handler.\n\t *\n\t * Populate title, then content, use random\n\t * data, if set from option settings.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @return {Promise<void>}\n\t */\n\tconst handleClick = async (): Promise< void > => {\n\t\tconst index = Math.floor( Math.random() * ( posts?.length || 1 ) );\n\t\tconst { title: randomTitle, content: randomContent } = posts[\n\t\t\tindex\n\t\t] || { title, content };\n\n\t\tawait populatePost( {\n\t\t\tattribute: 'title',\n\t\t\tvalue: random ? randomTitle : title,\n\t\t} );\n\t\tawait populatePost( {\n\t\t\tattribute: 'content',\n\t\t\tvalue: random ? randomContent : content,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<Fill name={ fillName }>\n\t\t\t<Tooltip text={ __( 'Make Post Dirty', 'make-post-dirty' ) }>\n\t\t\t\t<Button onClick={ handleClick } icon={ commentEditLink } />\n\t\t\t</Tooltip>\n\t\t</Fill>\n\t);\n};\n\nregisterPlugin( 'make-post-dirty', {\n\ticon: null,\n\trender: MakePostDirty,\n} );\n"],"names":["f","k","Symbol","for","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","exports","jsx","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","module","window","createElement","SVG","width","height","viewBox","xmlns","Path","posts","title","content","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","defineProperty","enumerable","get","obj","prop","registerPlugin","icon","render","editPost","savePost","useDispatch","random","wpVersion","makePostDirty","fillName","parseFloat","populatePost","attribute","value","limit","dirty","Promise","resolve","reject","makeDirty","setInterval","substring","length","clearInterval","sprintf","Fill","name","Tooltip","text","__","Button","onClick","index","Math","floor","randomTitle","randomContent"],"sourceRoot":""}
     1{"version":3,"file":"app.js","mappings":"wCASiBA,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAgDC,GAA7BF,OAAOC,IAAI,kBAAoBE,OAAOC,UAAUC,gBAAeC,EAAER,EAAES,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAC+FC,EAAQC,IAAvV,SAAWC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE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AmB,QAAO,CAACC,MAAO,IAAAC,IAAI,kBAAmB,mBAAmB,UACzD,SAAC,EAAAC,OAAM,CACNC,QArCgB,KAA6B,O,OAAD,E,OAAA,E,EAAA,YAC/C,MAAMC,EAAQC,KAAKC,MAAOD,KAAK9B,WAAkB,OAAL,UAAK,IAAL,SAAK,EAAL,IAAOkB,SAAU,KACrDzC,MAAOuD,EAAatD,QAASuD,GAAkB,IACtDJ,IACI,CAAEpD,QAAOC,WAGd,GAAK,MAAQuB,EAcZ,aAbMM,EAA4B,CACjCC,UAAW,QACXC,MAAOT,EAASgC,EAAcvD,UAEzB8B,EAA4B,CACjCC,UAAW,UACXC,MAAOT,EAASiC,EAAgBvD,IAIjCmB,EAAU,CAAEqC,OAAQ,uBACdpC,KAMPD,EAAU,CACTpB,MAAOuB,EAASgC,EAAcvD,EAC9BC,QAASsB,EAASiC,EAAgBvD,EAClCwD,OAAQ,kBAEHpC,GACP,E,YA/BgD,K,2QAsC5CH,KAAO,IAAe,cACV,8B","sources":["webpack://make-post-dirty/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://make-post-dirty/external window [\"wp\",\"data\"]","webpack://make-post-dirty/external window [\"wp\",\"plugins\"]","webpack://make-post-dirty/./node_modules/@wordpress/icons/build-module/library/comment-edit-link.js","webpack://make-post-dirty/external window [\"wp\",\"components\"]","webpack://make-post-dirty/external window [\"wp\",\"primitives\"]","webpack://make-post-dirty/external window \"React\"","webpack://make-post-dirty/external window [\"wp\",\"editor\"]","webpack://make-post-dirty/external window [\"wp\",\"i18n\"]","webpack://make-post-dirty/./src/utils/posts.tsx","webpack://make-post-dirty/./node_modules/react/jsx-runtime.js","webpack://make-post-dirty/webpack/bootstrap","webpack://make-post-dirty/webpack/runtime/compat get default export","webpack://make-post-dirty/webpack/runtime/define property getters","webpack://make-post-dirty/webpack/runtime/hasOwnProperty shorthand","webpack://make-post-dirty/./src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"plugins\"];","import { createElement } from \"react\";\n/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\nconst commentEditLink = createElement(SVG, {\n  width: \"24\",\n  height: \"24\",\n  viewBox: \"0 0 24 24\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n}, createElement(Path, {\n  d: \"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z\"\n}));\nexport default commentEditLink;\n//# sourceMappingURL=comment-edit-link.js.map","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"primitives\"];","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"editor\"];","module.exports = window[\"wp\"][\"i18n\"];","export const posts = [\n\t{\n\t\ttitle: 'Cities Achievements Trends Perspective Challenges Essential Ideas',\n\t\tcontent:\n\t\t\t'Cinema continues to captivate the minds of experts and enthusiasts alike. New advancements are being made every day that shape the future of this field. Its impact is felt in both large and small aspects of daily life.',\n\t},\n\t{\n\t\ttitle: 'Theater Opportunities Innovation Perspective Framework Introduction Impact Solutions Breakthrough',\n\t\tcontent:\n\t\t\t'One cannot underestimate the influence of Literature in our modern society. It influences policy, education, and the economy in profound ways. Looking ahead, the growth of this field seems limitless.',\n\t},\n\t{\n\t\ttitle: 'Climate Framework Pathways Vision Handbook Revolution Exploration',\n\t\tcontent:\n\t\t\t'The world of Sports has seen remarkable changes in recent times. It challenges our thinking and pushes boundaries we once thought fixed. Its impact is felt in both large and small aspects of daily life.',\n\t},\n\t{\n\t\ttitle: 'Mountains Impact Development Revolution Achievements Handbook',\n\t\tcontent:\n\t\t\t'Across the globe, Ethics sparks conversations and drives progress. Professionals dedicate years to mastering its complexities and nuances. Many believe its best days are still yet to come.',\n\t},\n\t{\n\t\ttitle: 'AI Strategies Perspective Comprehensive Development Guide',\n\t\tcontent:\n\t\t\t'The world of Oceans has seen remarkable changes in recent times. New advancements are being made every day that shape the future of this field. Public interest in this area shows no signs of slowing down.',\n\t},\n];\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { commentEditLink } from '@wordpress/icons';\nimport { registerPlugin } from '@wordpress/plugins';\nimport { store as editorStore } from '@wordpress/editor';\nimport { Fill, Button, Tooltip } from '@wordpress/components';\n\nimport { posts } from './utils/posts';\nimport { Post } from './utils/interfaces';\n\n/**\n * Make Post Dirty.\n *\n * This component returns a button that is\n * placed in the PinnedItems area. It's sole purpose\n * is for populating the post title and content.\n *\n * @since 1.0.0\n *\n * @return {JSX.Element} MakePostDirty\n */\nconst MakePostDirty = (): JSX.Element => {\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\tconst {\n\t\ttitle,\n\t\tcontent,\n\t\trandom,\n\t\tanimationEnable,\n\t\tanimationSpeed,\n\t\twpVersion,\n\t} = window.makePostDirty;\n\n\t// Slot fill name changed in WP 6.6.\n\tconst fillName =\n\t\tparseFloat( wpVersion ) >= 6.6\n\t\t\t? 'PinnedItems/core'\n\t\t\t: 'PinnedItems/core/edit-post';\n\n\t/**\n\t * Populate Post Using Animation.\n\t *\n\t * Make post dirty by filling in the\n\t * title and content.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param  prop           Props.\n\t * @param  prop.attribute The post attribute for e.g. title or content.\n\t * @param  prop.value     The value for the attribute.\n\t *\n\t * @return {Promise<string>} Returns a promise that resolves to string value.\n\t */\n\tconst populatePostUsingAnimation = ( {\n\t\tattribute,\n\t\tvalue,\n\t}: Post ): Promise< string > => {\n\t\tlet limit: number = 0;\n\t\tconst dirty: string[] = [];\n\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst makeDirty = setInterval(\n\t\t\t\t() => {\n\t\t\t\t\tdirty[ attribute ] = value.substring( 0, limit );\n\t\t\t\t\teditPost( dirty );\n\n\t\t\t\t\tif ( limit === value.length ) {\n\t\t\t\t\t\tclearInterval( makeDirty );\n\t\t\t\t\t\tresolve( value );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( limit > value.length ) {\n\t\t\t\t\t\treject( sprintf( 'Something went wrong: %s', value ) );\n\t\t\t\t\t}\n\t\t\t\t\tlimit++;\n\t\t\t\t},\n\t\t\t\tparseInt( animationSpeed ) || 10\n\t\t\t);\n\t\t} );\n\t};\n\n\t/**\n\t * Click Handler.\n\t *\n\t * Populate title, then content, use random\n\t * data, if set from option settings.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @return {Promise<void>}\n\t */\n\tconst handleClick = async (): Promise< void > => {\n\t\tconst index = Math.floor( Math.random() * ( posts?.length || 1 ) );\n\t\tconst { title: randomTitle, content: randomContent } = posts[\n\t\t\tindex\n\t\t] || { title, content };\n\n\t\t// If animation is enabled, then run.\n\t\tif ( '1' === animationEnable ) {\n\t\t\tawait populatePostUsingAnimation( {\n\t\t\t\tattribute: 'title',\n\t\t\t\tvalue: random ? randomTitle : title,\n\t\t\t} );\n\t\t\tawait populatePostUsingAnimation( {\n\t\t\t\tattribute: 'content',\n\t\t\t\tvalue: random ? randomContent : content,\n\t\t\t} );\n\n\t\t\t// Save Post.\n\t\t\teditPost( { status: 'publish' } );\n\t\t\tawait savePost();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Run this by default.\n\t\teditPost( {\n\t\t\ttitle: random ? randomTitle : title,\n\t\t\tcontent: random ? randomContent : content,\n\t\t\tstatus: 'publish',\n\t\t} );\n\t\tawait savePost();\n\t};\n\n\treturn (\n\t\t<Fill name={ fillName }>\n\t\t\t<Tooltip text={ __( 'Make Post Dirty', 'make-post-dirty' ) }>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={ handleClick }\n\t\t\t\t\ticon={ commentEditLink }\n\t\t\t\t\tdata-testid=\"make-post-dirty-btn\"\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t</Fill>\n\t);\n};\n\nregisterPlugin( 'make-post-dirty', {\n\ticon: null,\n\trender: MakePostDirty,\n} );\n"],"names":["f","k","Symbol","for","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","exports","jsx","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","module","window","createElement","SVG","width","height","viewBox","xmlns","Path","posts","title","content","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","defineProperty","enumerable","get","obj","prop","registerPlugin","icon","render","editPost","savePost","useDispatch","random","animationEnable","animationSpeed","wpVersion","makePostDirty","fillName","parseFloat","populatePostUsingAnimation","attribute","value","limit","dirty","Promise","resolve","reject","makeDirty","setInterval","substring","length","clearInterval","sprintf","parseInt","Fill","name","Tooltip","text","__","Button","onClick","index","Math","floor","randomTitle","randomContent","status"],"ignoreList":[],"sourceRoot":""}
  • make-post-dirty/trunk/inc/Services/Admin.php

    r3386596 r3452265  
    6464     */
    6565    const MAKE_POST_DIRTY_RANDOM = 'random';
     66
     67    /**
     68     * Default Animation Enable.
     69     *
     70     * @var string
     71     */
     72    const MAKE_POST_DIRTY_ANIMATION_ENABLE = 'animation_enable';
     73
     74    /**
     75     * Default Animation Speed.
     76     *
     77     * @var string
     78     */
     79    const MAKE_POST_DIRTY_ANIMATION_SPEED = 'animation_speed';
    6680
    6781    /**
     
    139153                do_settings_sections( self::PLUGIN_SLUG );
    140154                submit_button();
     155                settings_errors();
    141156            ?>
    142157            </form>
     
    238253                'label'   => esc_html__( 'Use Random Post', 'make-post-dirty' ),
    239254                'cb'      => [ $this, $this->get_callback_name( self::MAKE_POST_DIRTY_RANDOM ) ],
     255                'page'    => self::PLUGIN_SLUG,
     256                'section' => self::PLUGIN_SECTION,
     257            ],
     258            [
     259                'name'    => self::MAKE_POST_DIRTY_ANIMATION_ENABLE,
     260                'label'   => esc_html__( 'Animation Enable', 'make-post-dirty' ),
     261                'cb'      => [ $this, $this->get_callback_name( self::MAKE_POST_DIRTY_ANIMATION_ENABLE ) ],
     262                'page'    => self::PLUGIN_SLUG,
     263                'section' => self::PLUGIN_SECTION,
     264            ],
     265            [
     266                'name'    => self::MAKE_POST_DIRTY_ANIMATION_SPEED,
     267                'label'   => esc_html__( 'Animation Speed', 'make-post-dirty' ),
     268                'cb'      => [ $this, $this->get_callback_name( self::MAKE_POST_DIRTY_ANIMATION_SPEED ) ],
    240269                'page'    => self::PLUGIN_SLUG,
    241270                'section' => self::PLUGIN_SECTION,
     
    264293        printf(
    265294            '<input
    266                type="text"
    267                id="%2$s"
    268                name="%1$s[%2$s]"
    269                placeholder="%4$s"
    270                value="%3$s"
    271                class="wide"
     295                type="text"
     296                id="%2$s"
     297                name="%1$s[%2$s]"
     298                placeholder="%4$s"
     299                value="%3$s"
     300                class="wide"
    272301           />',
    273302            esc_attr( self::PLUGIN_OPTION ),
     
    323352
    324353    /**
     354     * Animation Enable.
     355     *
     356     * @since 1.1.0
     357     *
     358     * @return void
     359     */
     360    public function animation_enable_cb(): void {
     361        printf(
     362            '<input
     363                type="checkbox"
     364                id="%2$s"
     365                name="%1$s[%2$s]"
     366                value="1" %3$s
     367            />',
     368            esc_attr( self::PLUGIN_OPTION ),
     369            esc_attr( self::MAKE_POST_DIRTY_ANIMATION_ENABLE ),
     370            checked( 1, $this->options[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] ?? 0, false )
     371        );
     372    }
     373
     374    /**
     375     * Animation Speed Callback.
     376     *
     377     * @since 1.1.0
     378     *
     379     * @return void
     380     */
     381    public function animation_speed_cb(): void {
     382        printf(
     383            '<input
     384                type="number"
     385                id="%2$s"
     386                name="%1$s[%2$s]"
     387                value="%3$s"
     388                class="small-text"
     389                placeholder="10"
     390            />',
     391            esc_attr( self::PLUGIN_OPTION ),
     392            esc_attr( self::MAKE_POST_DIRTY_ANIMATION_SPEED ),
     393            esc_attr( $this->options[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] ?? '' )
     394        );
     395    }
     396
     397    /**
    325398     * Sanitize Options.
    326399     *
     
    351424        }
    352425
     426        if ( isset( $input[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] ) ) {
     427            $input_data = trim( (string) $input[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] );
     428
     429            $sanitized_options[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] = absint( $input_data );
     430        }
     431
     432        if ( isset( $input[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] ) ) {
     433            $input_data = trim( (int) $input[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] );
     434
     435            $sanitized_options[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] = sanitize_text_field( $input_data );
     436        }
     437
    353438        return $sanitized_options;
    354439    }
     
    377462        }
    378463
     464        if ( empty( $settings[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] ) ) {
     465            $settings[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] = '';
     466        }
     467
     468        if ( empty( $settings[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] ) ) {
     469            $settings[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] = '10';
     470        }
     471
    379472        return apply_filters(
    380473            'make_post_dirty_settings',
    381474            [
    382                 self::MAKE_POST_DIRTY_TITLE   => $settings[ self::MAKE_POST_DIRTY_TITLE ] ?? '',
    383                 self::MAKE_POST_DIRTY_CONTENT => $settings[ self::MAKE_POST_DIRTY_CONTENT ] ?? '',
    384                 self::MAKE_POST_DIRTY_RANDOM  => $settings[ self::MAKE_POST_DIRTY_RANDOM ] ?? '',
     475                self::MAKE_POST_DIRTY_TITLE            => $settings[ self::MAKE_POST_DIRTY_TITLE ] ?? '',
     476                self::MAKE_POST_DIRTY_CONTENT          => $settings[ self::MAKE_POST_DIRTY_CONTENT ] ?? '',
     477                self::MAKE_POST_DIRTY_RANDOM           => $settings[ self::MAKE_POST_DIRTY_RANDOM ] ?? '',
     478                self::MAKE_POST_DIRTY_ANIMATION_ENABLE => $settings[ self::MAKE_POST_DIRTY_ANIMATION_ENABLE ] ?? '',
     479                self::MAKE_POST_DIRTY_ANIMATION_SPEED  => $settings[ self::MAKE_POST_DIRTY_ANIMATION_SPEED ] ?? '',
    385480            ]
    386481        );
  • make-post-dirty/trunk/inc/Services/Asset.php

    r3386596 r3452265  
    5959            'makePostDirty',
    6060            [
    61                 'title'     => $settings['title'] ?? '',
    62                 'content'   => $settings['content'] ?? '',
    63                 'random'    => $settings['random'] ?? '',
    64                 'wpVersion' => $wp_version,
     61                'title'           => $settings['title'] ?? '',
     62                'content'         => $settings['content'] ?? '',
     63                'random'          => $settings['random'] ?? '',
     64                'animationEnable' => $settings['animation_enable'] ?? '',
     65                'animationSpeed'  => $settings['animation_speed'] ?? '',
     66                'wpVersion'       => $wp_version,
    6567            ]
    6668        );
  • make-post-dirty/trunk/make-post-dirty.php

    r3386596 r3452265  
    44 * Plugin URI:  https://github.com/badasswp/make-post-dirty
    55 * Description: A useful tool for populating the block editor title and content.
    6  * Version:     1.0.0
     6 * Version:     1.1.0
    77 * Author:      badasswp
    88 * Author URI:  https://github.com/badasswp
  • make-post-dirty/trunk/readme.txt

    r3386596 r3452265  
    33Tags: post, dirty, block-editor, content, test
    44Requires at least: 4.0
    5 Tested up to: 6.8
    6 Stable tag: 1.0.0
     5Tested up to: 6.9
     6Stable tag: 1.1.0
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    57571. Toolbar Icon - Locate icon on the top toolbar.
    58582. Settings - Configure plugin settings here.
     593. Plugin Menu - Locate the plugin menu on the bottom-left part of the WP admin dashboard page.
    5960
    6061== Changelog ==
     62
     63= 1.1.0 =
     64* Add Animation Enable & Animation Speed controls to the plugin options page.
     65* Add Playwright e2e tests.
     66* Add Pull Request Template to repo.
     67* Test: Resolve failing tests related to Windows OS.
     68* Use WPMockTC for unit tests.
     69* Update to WP 6.9.
     70
     71= 1.0.1 =
     72* Specify `wordpress-plugin` as Composer package type.
     73* Tested up to WP 6.9.
    6174
    6275= 1.0.0 =
  • make-post-dirty/trunk/vendor/autoload.php

    r3386596 r3452265  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInitd9bd0e5cb6625f97fda256a9e204fa0e::getLoader();
     22return ComposerAutoloaderInit4c3db5fe9a4d271832dabd4bfe3c1b7e::getLoader();
  • make-post-dirty/trunk/vendor/composer/autoload_real.php

    r3386596 r3452265  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd9bd0e5cb6625f97fda256a9e204fa0e
     5class ComposerAutoloaderInit4c3db5fe9a4d271832dabd4bfe3c1b7e
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitd9bd0e5cb6625f97fda256a9e204fa0e', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit4c3db5fe9a4d271832dabd4bfe3c1b7e', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitd9bd0e5cb6625f97fda256a9e204fa0e', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit4c3db5fe9a4d271832dabd4bfe3c1b7e', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitd9bd0e5cb6625f97fda256a9e204fa0e::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit4c3db5fe9a4d271832dabd4bfe3c1b7e::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • make-post-dirty/trunk/vendor/composer/autoload_static.php

    r3386596 r3452265  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitd9bd0e5cb6625f97fda256a9e204fa0e
     7class ComposerStaticInit4c3db5fe9a4d271832dabd4bfe3c1b7e
    88{
    99    public static $prefixLengthsPsr4 = array (
    10         'M' => 
     10        'M' =>
    1111        array (
    1212            'MakePostDirty\\Tests\\' => 20,
     
    1616
    1717    public static $prefixDirsPsr4 = array (
    18         'MakePostDirty\\Tests\\' => 
     18        'MakePostDirty\\Tests\\' =>
    1919        array (
    2020            0 => __DIR__ . '/../..' . '/tests',
    2121        ),
    22         'MakePostDirty\\' => 
     22        'MakePostDirty\\' =>
    2323        array (
    2424            0 => __DIR__ . '/../..' . '/inc',
     
    3333    {
    3434        return \Closure::bind(function () use ($loader) {
    35             $loader->prefixLengthsPsr4 = ComposerStaticInitd9bd0e5cb6625f97fda256a9e204fa0e::$prefixLengthsPsr4;
    36             $loader->prefixDirsPsr4 = ComposerStaticInitd9bd0e5cb6625f97fda256a9e204fa0e::$prefixDirsPsr4;
    37             $loader->classMap = ComposerStaticInitd9bd0e5cb6625f97fda256a9e204fa0e::$classMap;
     35            $loader->prefixLengthsPsr4 = ComposerStaticInit4c3db5fe9a4d271832dabd4bfe3c1b7e::$prefixLengthsPsr4;
     36            $loader->prefixDirsPsr4 = ComposerStaticInit4c3db5fe9a4d271832dabd4bfe3c1b7e::$prefixDirsPsr4;
     37            $loader->classMap = ComposerStaticInit4c3db5fe9a4d271832dabd4bfe3c1b7e::$classMap;
    3838
    3939        }, null, ClassLoader::class);
  • make-post-dirty/trunk/vendor/composer/installed.php

    r3386596 r3452265  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '17062ccff0d68c34473d910672a6d4d844087cf6',
    7         'type' => 'package',
     6        'reference' => 'c4fd877eea91a7836f97f3d0b4b9e3b860abd4d9',
     7        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    99        'aliases' => array(),
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '17062ccff0d68c34473d910672a6d4d844087cf6',
    17             'type' => 'package',
     16            'reference' => 'c4fd877eea91a7836f97f3d0b4b9e3b860abd4d9',
     17            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
    1919            'aliases' => array(),
Note: See TracChangeset for help on using the changeset viewer.