Changeset 3480461
- Timestamp:
- 03/11/2026 05:36:14 PM (3 weeks ago)
- Location:
- hero-color-picker
- Files:
-
- 8 edited
- 1 copied
-
tags/1.0.13 (copied) (copied from hero-color-picker/trunk)
-
tags/1.0.13/build/index.asset.php (modified) (1 diff)
-
tags/1.0.13/build/index.js (modified) (1 diff)
-
tags/1.0.13/hero-color-picker.php (modified) (1 diff)
-
tags/1.0.13/readme.txt (modified) (2 diffs)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/build/index.js (modified) (1 diff)
-
trunk/hero-color-picker.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hero-color-picker/tags/1.0.13/build/index.asset.php
r3480456 r3480461 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => ' 9e9518b9b8bbc11cc155');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => 'f98af547c8efff1b1046'); -
hero-color-picker/tags/1.0.13/build/index.js
r3480456 r3480461 1 (()=>{"use strict";const e=window.wp.plugins,o=window.wp.editor,r=window.wp.i18n,t=window.wp.components,n=window.wp.data,i=window.ReactJSXRuntime,l="hero_color_picker_hero_color",s="hero_color_picker_font_color",{useEffect:c}=window.wp.element;function a(e,o){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-summary").forEach(r=>{e?r.style.setProperty("background-color",e,"important"):r.style.removeProperty("background-color"),o?r.style.setProperty("color",o,"important"):r.style.removeProperty("color")})}function d(e){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-featured-image__preview").forEach(o=>{e?o.style.setProperty("outline","none","important"):o.style.removeProperty("outline")})}function p(e){if("string"!=typeof e)return null;const o=e.trim().replace("#",""),r=3===o.length?o.split("").map(e=>e+e).join(""):o;return/^[0-9a-fA-F]{6}$/.test(r)?{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}:null}function h(e){const o=e/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4}function u(e){return.2126*h(e.r)+.7152*h(e.g)+.0722*h(e.b)}function m({label:e,value:o,onChange:n,onReset:l,resetText:s}){return(0,i.jsxs)("div",{style:{marginBottom:16},children:[(0,i.jsx)("div",{style:{marginBottom:8},children:e}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,i.jsx)(t.Dropdown,{popoverProps:{placement:"left-start"},renderToggle:({isOpen:e,onToggle:n})=>(0,i.jsxs)(t.Button,{variant:"secondary",onClick:n,"aria-expanded":e,style:{flex:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("span",{children:o||(0,r.__)("Select color","hero-color-picker")}),(0,i.jsx)("span",{"aria-hidden":!0,style:{display:"inline-block",marginLeft:8,width:14,height:14,borderRadius:2,border:"1px solid #ccc",backgroundColor:o||"transparent"}})]}),renderContent:()=>(0,i.jsx)("div",{style:{padding:8},children:(0,i.jsx)(t.ColorPicker,{color:o||"#111111",enableAlpha:!1,onChange:n})})}),(0,i.jsx)(t.Button,{variant:"secondary",isDestructive:!0,onClick:l,disabled:!o,children:s})]})]})}(0,e.registerPlugin)("hero-color-picker",{render:function(){const{meta:e,postType:h}=(0,n.useSelect)(e=>{const o=e("core/editor");return{meta:o.getEditedPostAttribute("meta")||{},postType:o.getCurrentPostType()}},[]),{editPost:g}=(0,n.useDispatch)("core/editor"),x=e[l]||"",y=e[s]||"",f=function(e,o){const r=p(e),t=p(o);if(!r||!t)return null;const n=u(r),i=u(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}(y,x),_=Boolean(x&&y),k=_&&null!==f&&f>=7;let w=(0,r.__)("Not applicable","hero-color-picker"),j="info";return _&&(k?(w=(0,r.__)("PASS","hero-color-picker"),j="success"):(w=(0,r.__)("FAILED","hero-color-picker"),j="error")),c(()=>{if("post"!==h)return a("",""),void d("");a(x,y),d(x)},[x,y,h]),c(()=>()=>{a("",""),d("")},[]),"post"!==h?null:(0,i.jsx)(o.PluginDocumentSettingPanel,{name:"hero-color-picker",title:"Hero Color Picker",className:"hero-color",children:(0,i.jsx)(t.PanelRow,{children:(0,i.jsxs)("div",{style:{width:"100%"},children:[(0,i.jsx)(m,{label:(0,r.__)("Background Color","hero-color-picker"),value:x,onChange:o=>{g({meta:{...e,[l]:o}})},onReset:()=>{g({meta:{...e,[l]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsx)(m,{label:(0,r.__)("Font Color","hero-color-picker"),value:y,onChange:o=>{g({meta:{...e,[s]:o}})},onReset:()=>{g({meta:{...e,[s]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsxs)("div",{style:{padding:10,borderRadius:4,border:"1px solid #dcdcde",backgroundColor:x||"#f0f0f1",color:y||"#1e1e1e",marginBottom:10},children:[(0,i.jsx)("strong",{children:(0,r.__)("Preview","hero-color-picker")}),(0,i.jsx)("p",{style:{margin:"6px 0 0"},children:(0,r.__)("This is how background and font color look together.","hero-color-picker")})]}),(0,i.jsxs)(t.BaseControl,{id:"hero-color-picker-contrast-check",label:(0,r.__)("Contrast Check","hero-color-picker"),children:[(0,i.jsx)(t.Notice,{status:j,isDismissible:!1,style:{margin:"6px 0 0"},children:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:8,width:"100%"},children:[(0,i.jsx)("strong",{children:w}),null!==f?(0,i.jsx)("span",{children:"("+f.toFixed(2)+":1)"}):null]})}),(0,i.jsx)("p",{style:{margin:"10px 0 0",color:"#50575e"},children:(0,r.__)("WCAG AAA, normal text, minimum ratio 7:1.","hero-color-picker")})]}),(0,i.jsx)(t.Notice,{status:"info",isDismissible:!1,style:{margin:"12px 0 0"},children:(0,i.jsx)("p",{style:{margin:0},children:(0,i.jsx)(t.ExternalLink,{href:"https://wordpress.org/plugins/hero-color-picker/ ",children:(0,r.__)("Colors not showing on frontend? Read the FAQ.","hero-color-picker")})})})]})})})}})})();1 (()=>{"use strict";const e=window.wp.plugins,o=window.wp.editor,r=window.wp.i18n,t=window.wp.components,n=window.wp.data,i=window.ReactJSXRuntime,l="hero_color_picker_hero_color",s="hero_color_picker_font_color",{useEffect:c}=window.wp.element;function a(e,o){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-summary").forEach(r=>{e?r.style.setProperty("background-color",e,"important"):r.style.removeProperty("background-color"),o?r.style.setProperty("color",o,"important"):r.style.removeProperty("color")})}function d(e){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-featured-image__preview").forEach(o=>{e?o.style.setProperty("outline","none","important"):o.style.removeProperty("outline")})}function p(e){if("string"!=typeof e)return null;const o=e.trim().replace("#",""),r=3===o.length?o.split("").map(e=>e+e).join(""):o;return/^[0-9a-fA-F]{6}$/.test(r)?{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}:null}function h(e){const o=e/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4}function u(e){return.2126*h(e.r)+.7152*h(e.g)+.0722*h(e.b)}function m({label:e,value:o,onChange:n,onReset:l,resetText:s}){return(0,i.jsxs)("div",{style:{marginBottom:16},children:[(0,i.jsx)("div",{style:{marginBottom:8},children:e}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,i.jsx)(t.Dropdown,{popoverProps:{placement:"left-start"},renderToggle:({isOpen:e,onToggle:n})=>(0,i.jsxs)(t.Button,{variant:"secondary",onClick:n,"aria-expanded":e,style:{flex:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("span",{children:o||(0,r.__)("Select color","hero-color-picker")}),(0,i.jsx)("span",{"aria-hidden":!0,style:{display:"inline-block",marginLeft:8,width:14,height:14,borderRadius:2,border:"1px solid #ccc",backgroundColor:o||"transparent"}})]}),renderContent:()=>(0,i.jsx)("div",{style:{padding:8},children:(0,i.jsx)(t.ColorPicker,{color:o||"#111111",enableAlpha:!1,onChange:n})})}),(0,i.jsx)(t.Button,{variant:"secondary",isDestructive:!0,onClick:l,disabled:!o,children:s})]})]})}(0,e.registerPlugin)("hero-color-picker",{render:function(){const{meta:e,postType:h}=(0,n.useSelect)(e=>{const o=e("core/editor");return{meta:o.getEditedPostAttribute("meta")||{},postType:o.getCurrentPostType()}},[]),{editPost:g}=(0,n.useDispatch)("core/editor"),x=e[l]||"",y=e[s]||"",f=function(e,o){const r=p(e),t=p(o);if(!r||!t)return null;const n=u(r),i=u(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}(y,x),_=Boolean(x&&y),k=_&&null!==f&&f>=7;let w=(0,r.__)("Not applicable","hero-color-picker"),j="info";return _&&(k?(w=(0,r.__)("PASS","hero-color-picker"),j="success"):(w=(0,r.__)("FAILED","hero-color-picker"),j="error")),c(()=>{if("post"!==h)return a("",""),void d("");a(x,y),d(x)},[x,y,h]),c(()=>()=>{a("",""),d("")},[]),"post"!==h?null:(0,i.jsx)(o.PluginDocumentSettingPanel,{name:"hero-color-picker",title:"Hero Color Picker",className:"hero-color",children:(0,i.jsx)(t.PanelRow,{children:(0,i.jsxs)("div",{style:{width:"100%"},children:[(0,i.jsx)(m,{label:(0,r.__)("Background Color","hero-color-picker"),value:x,onChange:o=>{g({meta:{...e,[l]:o}})},onReset:()=>{g({meta:{...e,[l]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsx)(m,{label:(0,r.__)("Font Color","hero-color-picker"),value:y,onChange:o=>{g({meta:{...e,[s]:o}})},onReset:()=>{g({meta:{...e,[s]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsxs)("div",{style:{padding:10,borderRadius:4,border:"1px solid #dcdcde",backgroundColor:x||"#f0f0f1",color:y||"#1e1e1e",marginBottom:10},children:[(0,i.jsx)("strong",{children:(0,r.__)("Preview","hero-color-picker")}),(0,i.jsx)("p",{style:{margin:"6px 0 0"},children:(0,r.__)("This is how background and font color look together.","hero-color-picker")})]}),(0,i.jsxs)(t.BaseControl,{id:"hero-color-picker-contrast-check",label:(0,r.__)("Contrast Check","hero-color-picker"),children:[(0,i.jsx)(t.Notice,{status:j,isDismissible:!1,style:{margin:"6px 0 0"},children:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:8,width:"100%"},children:[(0,i.jsx)("strong",{children:w}),null!==f?(0,i.jsx)("span",{children:"("+f.toFixed(2)+":1)"}):null]})}),(0,i.jsx)("p",{style:{margin:"10px 0 0",color:"#50575e"},children:(0,r.__)("WCAG AAA, normal text, minimum ratio 7:1.","hero-color-picker")})]}),(0,i.jsx)(t.Notice,{status:"info",isDismissible:!1,style:{margin:"12px 0 0"},children:(0,i.jsx)("p",{style:{margin:0},children:(0,i.jsx)(t.ExternalLink,{href:"https://wordpress.org/plugins/hero-color-picker/#how%20do%20i%20add%20the%20%60hero-colored%60%20css%20class%20in%20templates%3F",children:(0,r.__)("Colors not showing on frontend? Read the FAQ.","hero-color-picker")})})})]})})})}})})(); -
hero-color-picker/tags/1.0.13/hero-color-picker.php
r3480456 r3480461 4 4 * Plugin URI: https://github.com/mtoensing/hero-color-picker 5 5 * Description: Adds a per-post color picker in the editor sidebar for hero styling. 6 * Version: 1.0.1 26 * Version: 1.0.13 7 7 * Author: Marc Tönsing 8 8 * Author URI: https://toensing.com -
hero-color-picker/tags/1.0.13/readme.txt
r3480456 r3480461 4 4 Requires at least: 5.9 5 5 Tested up to: 6.9 6 Stable tag: 1.0.1 26 Stable tag: 1.0.13 7 7 Requires PHP: 7.3 8 8 License: GPLv2 or later … … 66 66 == Changelog == 67 67 68 = 1.0.13 = 69 * Updated the editor FAQ link to point directly to the relevant WordPress.org FAQ entry. 70 68 71 = 1.0.12 = 69 72 * Added an editor FAQ link for frontend setup troubleshooting. -
hero-color-picker/trunk/build/index.asset.php
r3480456 r3480461 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => ' 9e9518b9b8bbc11cc155');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => 'f98af547c8efff1b1046'); -
hero-color-picker/trunk/build/index.js
r3480456 r3480461 1 (()=>{"use strict";const e=window.wp.plugins,o=window.wp.editor,r=window.wp.i18n,t=window.wp.components,n=window.wp.data,i=window.ReactJSXRuntime,l="hero_color_picker_hero_color",s="hero_color_picker_font_color",{useEffect:c}=window.wp.element;function a(e,o){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-summary").forEach(r=>{e?r.style.setProperty("background-color",e,"important"):r.style.removeProperty("background-color"),o?r.style.setProperty("color",o,"important"):r.style.removeProperty("color")})}function d(e){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-featured-image__preview").forEach(o=>{e?o.style.setProperty("outline","none","important"):o.style.removeProperty("outline")})}function p(e){if("string"!=typeof e)return null;const o=e.trim().replace("#",""),r=3===o.length?o.split("").map(e=>e+e).join(""):o;return/^[0-9a-fA-F]{6}$/.test(r)?{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}:null}function h(e){const o=e/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4}function u(e){return.2126*h(e.r)+.7152*h(e.g)+.0722*h(e.b)}function m({label:e,value:o,onChange:n,onReset:l,resetText:s}){return(0,i.jsxs)("div",{style:{marginBottom:16},children:[(0,i.jsx)("div",{style:{marginBottom:8},children:e}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,i.jsx)(t.Dropdown,{popoverProps:{placement:"left-start"},renderToggle:({isOpen:e,onToggle:n})=>(0,i.jsxs)(t.Button,{variant:"secondary",onClick:n,"aria-expanded":e,style:{flex:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("span",{children:o||(0,r.__)("Select color","hero-color-picker")}),(0,i.jsx)("span",{"aria-hidden":!0,style:{display:"inline-block",marginLeft:8,width:14,height:14,borderRadius:2,border:"1px solid #ccc",backgroundColor:o||"transparent"}})]}),renderContent:()=>(0,i.jsx)("div",{style:{padding:8},children:(0,i.jsx)(t.ColorPicker,{color:o||"#111111",enableAlpha:!1,onChange:n})})}),(0,i.jsx)(t.Button,{variant:"secondary",isDestructive:!0,onClick:l,disabled:!o,children:s})]})]})}(0,e.registerPlugin)("hero-color-picker",{render:function(){const{meta:e,postType:h}=(0,n.useSelect)(e=>{const o=e("core/editor");return{meta:o.getEditedPostAttribute("meta")||{},postType:o.getCurrentPostType()}},[]),{editPost:g}=(0,n.useDispatch)("core/editor"),x=e[l]||"",y=e[s]||"",f=function(e,o){const r=p(e),t=p(o);if(!r||!t)return null;const n=u(r),i=u(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}(y,x),_=Boolean(x&&y),k=_&&null!==f&&f>=7;let w=(0,r.__)("Not applicable","hero-color-picker"),j="info";return _&&(k?(w=(0,r.__)("PASS","hero-color-picker"),j="success"):(w=(0,r.__)("FAILED","hero-color-picker"),j="error")),c(()=>{if("post"!==h)return a("",""),void d("");a(x,y),d(x)},[x,y,h]),c(()=>()=>{a("",""),d("")},[]),"post"!==h?null:(0,i.jsx)(o.PluginDocumentSettingPanel,{name:"hero-color-picker",title:"Hero Color Picker",className:"hero-color",children:(0,i.jsx)(t.PanelRow,{children:(0,i.jsxs)("div",{style:{width:"100%"},children:[(0,i.jsx)(m,{label:(0,r.__)("Background Color","hero-color-picker"),value:x,onChange:o=>{g({meta:{...e,[l]:o}})},onReset:()=>{g({meta:{...e,[l]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsx)(m,{label:(0,r.__)("Font Color","hero-color-picker"),value:y,onChange:o=>{g({meta:{...e,[s]:o}})},onReset:()=>{g({meta:{...e,[s]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsxs)("div",{style:{padding:10,borderRadius:4,border:"1px solid #dcdcde",backgroundColor:x||"#f0f0f1",color:y||"#1e1e1e",marginBottom:10},children:[(0,i.jsx)("strong",{children:(0,r.__)("Preview","hero-color-picker")}),(0,i.jsx)("p",{style:{margin:"6px 0 0"},children:(0,r.__)("This is how background and font color look together.","hero-color-picker")})]}),(0,i.jsxs)(t.BaseControl,{id:"hero-color-picker-contrast-check",label:(0,r.__)("Contrast Check","hero-color-picker"),children:[(0,i.jsx)(t.Notice,{status:j,isDismissible:!1,style:{margin:"6px 0 0"},children:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:8,width:"100%"},children:[(0,i.jsx)("strong",{children:w}),null!==f?(0,i.jsx)("span",{children:"("+f.toFixed(2)+":1)"}):null]})}),(0,i.jsx)("p",{style:{margin:"10px 0 0",color:"#50575e"},children:(0,r.__)("WCAG AAA, normal text, minimum ratio 7:1.","hero-color-picker")})]}),(0,i.jsx)(t.Notice,{status:"info",isDismissible:!1,style:{margin:"12px 0 0"},children:(0,i.jsx)("p",{style:{margin:0},children:(0,i.jsx)(t.ExternalLink,{href:"https://wordpress.org/plugins/hero-color-picker/ ",children:(0,r.__)("Colors not showing on frontend? Read the FAQ.","hero-color-picker")})})})]})})})}})})();1 (()=>{"use strict";const e=window.wp.plugins,o=window.wp.editor,r=window.wp.i18n,t=window.wp.components,n=window.wp.data,i=window.ReactJSXRuntime,l="hero_color_picker_hero_color",s="hero_color_picker_font_color",{useEffect:c}=window.wp.element;function a(e,o){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-summary").forEach(r=>{e?r.style.setProperty("background-color",e,"important"):r.style.removeProperty("background-color"),o?r.style.setProperty("color",o,"important"):r.style.removeProperty("color")})}function d(e){"undefined"!=typeof document&&document.querySelectorAll(".editor-post-featured-image__preview").forEach(o=>{e?o.style.setProperty("outline","none","important"):o.style.removeProperty("outline")})}function p(e){if("string"!=typeof e)return null;const o=e.trim().replace("#",""),r=3===o.length?o.split("").map(e=>e+e).join(""):o;return/^[0-9a-fA-F]{6}$/.test(r)?{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}:null}function h(e){const o=e/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4}function u(e){return.2126*h(e.r)+.7152*h(e.g)+.0722*h(e.b)}function m({label:e,value:o,onChange:n,onReset:l,resetText:s}){return(0,i.jsxs)("div",{style:{marginBottom:16},children:[(0,i.jsx)("div",{style:{marginBottom:8},children:e}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,i.jsx)(t.Dropdown,{popoverProps:{placement:"left-start"},renderToggle:({isOpen:e,onToggle:n})=>(0,i.jsxs)(t.Button,{variant:"secondary",onClick:n,"aria-expanded":e,style:{flex:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("span",{children:o||(0,r.__)("Select color","hero-color-picker")}),(0,i.jsx)("span",{"aria-hidden":!0,style:{display:"inline-block",marginLeft:8,width:14,height:14,borderRadius:2,border:"1px solid #ccc",backgroundColor:o||"transparent"}})]}),renderContent:()=>(0,i.jsx)("div",{style:{padding:8},children:(0,i.jsx)(t.ColorPicker,{color:o||"#111111",enableAlpha:!1,onChange:n})})}),(0,i.jsx)(t.Button,{variant:"secondary",isDestructive:!0,onClick:l,disabled:!o,children:s})]})]})}(0,e.registerPlugin)("hero-color-picker",{render:function(){const{meta:e,postType:h}=(0,n.useSelect)(e=>{const o=e("core/editor");return{meta:o.getEditedPostAttribute("meta")||{},postType:o.getCurrentPostType()}},[]),{editPost:g}=(0,n.useDispatch)("core/editor"),x=e[l]||"",y=e[s]||"",f=function(e,o){const r=p(e),t=p(o);if(!r||!t)return null;const n=u(r),i=u(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}(y,x),_=Boolean(x&&y),k=_&&null!==f&&f>=7;let w=(0,r.__)("Not applicable","hero-color-picker"),j="info";return _&&(k?(w=(0,r.__)("PASS","hero-color-picker"),j="success"):(w=(0,r.__)("FAILED","hero-color-picker"),j="error")),c(()=>{if("post"!==h)return a("",""),void d("");a(x,y),d(x)},[x,y,h]),c(()=>()=>{a("",""),d("")},[]),"post"!==h?null:(0,i.jsx)(o.PluginDocumentSettingPanel,{name:"hero-color-picker",title:"Hero Color Picker",className:"hero-color",children:(0,i.jsx)(t.PanelRow,{children:(0,i.jsxs)("div",{style:{width:"100%"},children:[(0,i.jsx)(m,{label:(0,r.__)("Background Color","hero-color-picker"),value:x,onChange:o=>{g({meta:{...e,[l]:o}})},onReset:()=>{g({meta:{...e,[l]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsx)(m,{label:(0,r.__)("Font Color","hero-color-picker"),value:y,onChange:o=>{g({meta:{...e,[s]:o}})},onReset:()=>{g({meta:{...e,[s]:""}})},resetText:(0,r.__)("Unset","hero-color-picker")}),(0,i.jsxs)("div",{style:{padding:10,borderRadius:4,border:"1px solid #dcdcde",backgroundColor:x||"#f0f0f1",color:y||"#1e1e1e",marginBottom:10},children:[(0,i.jsx)("strong",{children:(0,r.__)("Preview","hero-color-picker")}),(0,i.jsx)("p",{style:{margin:"6px 0 0"},children:(0,r.__)("This is how background and font color look together.","hero-color-picker")})]}),(0,i.jsxs)(t.BaseControl,{id:"hero-color-picker-contrast-check",label:(0,r.__)("Contrast Check","hero-color-picker"),children:[(0,i.jsx)(t.Notice,{status:j,isDismissible:!1,style:{margin:"6px 0 0"},children:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:8,width:"100%"},children:[(0,i.jsx)("strong",{children:w}),null!==f?(0,i.jsx)("span",{children:"("+f.toFixed(2)+":1)"}):null]})}),(0,i.jsx)("p",{style:{margin:"10px 0 0",color:"#50575e"},children:(0,r.__)("WCAG AAA, normal text, minimum ratio 7:1.","hero-color-picker")})]}),(0,i.jsx)(t.Notice,{status:"info",isDismissible:!1,style:{margin:"12px 0 0"},children:(0,i.jsx)("p",{style:{margin:0},children:(0,i.jsx)(t.ExternalLink,{href:"https://wordpress.org/plugins/hero-color-picker/#how%20do%20i%20add%20the%20%60hero-colored%60%20css%20class%20in%20templates%3F",children:(0,r.__)("Colors not showing on frontend? Read the FAQ.","hero-color-picker")})})})]})})})}})})(); -
hero-color-picker/trunk/hero-color-picker.php
r3480456 r3480461 4 4 * Plugin URI: https://github.com/mtoensing/hero-color-picker 5 5 * Description: Adds a per-post color picker in the editor sidebar for hero styling. 6 * Version: 1.0.1 26 * Version: 1.0.13 7 7 * Author: Marc Tönsing 8 8 * Author URI: https://toensing.com -
hero-color-picker/trunk/readme.txt
r3480456 r3480461 4 4 Requires at least: 5.9 5 5 Tested up to: 6.9 6 Stable tag: 1.0.1 26 Stable tag: 1.0.13 7 7 Requires PHP: 7.3 8 8 License: GPLv2 or later … … 66 66 == Changelog == 67 67 68 = 1.0.13 = 69 * Updated the editor FAQ link to point directly to the relevant WordPress.org FAQ entry. 70 68 71 = 1.0.12 = 69 72 * Added an editor FAQ link for frontend setup troubleshooting.
Note: See TracChangeset
for help on using the changeset viewer.