Plugin Directory

Changeset 3438374


Ignore:
Timestamp:
01/13/2026 07:27:36 AM (23 hours ago)
Author:
pfefferle
Message:

Update to version 7.8.3 from GitHub

Location:
activitypub
Files:
50 edited
1 copied

Legend:

Unmodified
Added
Removed
  • activitypub/tags/7.8.3/activitypub.php

    r3424590 r3438374  
    44 * Plugin URI: https://github.com/Automattic/wordpress-activitypub
    55 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
    6  * Version: 7.8.2
     6 * Version: 7.8.3
    77 * Author: Matthias Pfefferle & Automattic
    88 * Author URI: https://automattic.com/
     
    1818namespace Activitypub;
    1919
    20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.2' );
     20\define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.3' );
    2121
    2222// Plugin related constants.
  • activitypub/tags/7.8.3/build/editor-plugin/plugin.asset.php

    r3409851 r3438374  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '4371fba4c154ea1d6303');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'c5a3060dcb4bb10e94ee');
  • activitypub/tags/7.8.3/build/editor-plugin/plugin.js

    r3409851 r3438374  
    1 (()=>{"use strict";const t=window.wp.editor,e=window.wp.editPost,i=window.wp.plugins,n=window.wp.components,a=window.wp.element;var o=(0,a.forwardRef)(({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}));const l=window.wp.primitives,c=window.ReactJSXRuntime;var s=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),u=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),r=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const p=window.wp.data,v=window.wp.coreData,w=window.wp.url,_=window.wp.i18n,h=(t,e)=>t?.activitypub_content_visibility?t.activitypub_content_visibility:"federated"===t?.activitypub_status?"public":e&&new Date(e).getTime()<Date.now()-2592e6?"local":"public";(0,i.registerPlugin)("activitypub-editor-plugin",{render:()=>{const i=(0,p.useSelect)(e=>e(t.store).getCurrentPostType(),[]),[a,r]=(0,v.useEntityProp)("postType",i,"meta"),w=(0,p.useSelect)(e=>e(t.store).getCurrentPost().date,[]);if("wp_block"===i)return null;const b=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),d={verticalAlign:"middle",gap:"4px",justifyContent:"start",display:"inline-flex",alignItems:"center"},m=(t,e,i)=>(0,c.jsx)(n.Tooltip,{text:i,children:(0,c.jsxs)(n.__experimentalText,{style:d,children:[(0,c.jsx)(o,{icon:t}),e]})}),y=t.PluginDocumentSettingPanel||e.PluginDocumentSettingPanel;return(0,c.jsxs)(y,{name:"activitypub",className:"block-editor-block-inspector",title:(0,_.__)("Fediverse ⁂","activitypub"),children:[(0,c.jsx)(n.TextControl,{label:(0,_.__)("Content Warning","activitypub"),value:a?.activitypub_content_warning,onChange:t=>{r({...a,activitypub_content_warning:t})},placeholder:(0,_.__)("Optional content warning","activitypub"),help:(0,_.__)("Content warnings do not change the content on your site, only in the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RangeControl,{label:(0,_.__)("Maximum Image Attachments","activitypub"),value:a?.activitypub_max_image_attachments,onChange:t=>{r({...a,activitypub_max_image_attachments:t})},min:0,max:10,help:(0,_.__)("Maximum number of image attachments to include when sharing to the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RadioControl,{label:(0,_.__)("Visibility","activitypub"),help:(0,_.__)("This adjusts the visibility of a post in the fediverse, but note that it won't affect how the post appears on the blog.","activitypub"),selected:h(a,w),options:[{label:m(s,(0,_.__)("Public","activitypub"),(0,_.__)("Post will be visible to everyone and appear in public timelines.","activitypub")),value:"public"},{label:m(u,(0,_.__)("Quiet public","activitypub"),(0,_.__)("Post will be visible to everyone but will not appear in public timelines.","activitypub")),value:"quiet_public"},{label:m(b,(0,_.__)("Do not federate","activitypub"),(0,_.__)("Post will not be shared to the Fediverse.","activitypub")),value:"local"}],onChange:t=>{r({...a,activitypub_content_visibility:t})},className:"activitypub-visibility"}),(0,c.jsx)(n.SelectControl,{label:(0,_.__)("Who can quote this post?","activitypub"),help:(0,_.__)("Quoting allows others to cite your post while adding their own commentary.","activitypub"),value:a?.activitypub_interaction_policy_quote,options:[{label:(0,_.__)("Anyone","activitypub"),value:"anyone"},{label:(0,_.__)("Followers only","activitypub"),value:"followers"},{label:(0,_.__)("Just me","activitypub"),value:"me"}],onChange:t=>{r({...a,activitypub_interaction_policy_quote:t})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})}}),(0,i.registerPlugin)("activitypub-editor-preview",{render:()=>{const e=(0,p.useSelect)(e=>e(t.store).getCurrentPost().status,[]);return(0,c.jsx)(c.Fragment,{children:t.PluginPreviewMenuItem?(0,c.jsx)(t.PluginPreviewMenuItem,{onClick:()=>{const e=(0,p.select)(t.store).getEditedPostPreviewLink(),i=(0,w.addQueryArgs)(e,{activitypub:"true"});window.open(i,"_blank")},icon:r,disabled:"auto-draft"===e,children:(0,_.__)("Fediverse preview ⁂","activitypub")}):null})}})})();
     1(()=>{"use strict";const t=window.wp.editor,e=window.wp.editPost,i=window.wp.plugins,n=window.wp.components,a=window.wp.element;var o=(0,a.forwardRef)(({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}));const l=window.wp.primitives,c=window.ReactJSXRuntime;var s=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),u=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),r=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const p=window.wp.data,v=window.wp.coreData,_=window.wp.url,w=window.wp.i18n;(0,i.registerPlugin)("activitypub-editor-plugin",{render:()=>{const i=(0,p.useSelect)(e=>e(t.store).getCurrentPostType(),[]),[r,_]=(0,v.useEntityProp)("postType",i,"meta"),b=(0,p.useSelect)(e=>e(t.store).getCurrentPost().date,[]),h=((t,e)=>t?.activitypub_content_visibility?t.activitypub_content_visibility:"federated"===t?.activitypub_status?"public":e&&new Date(e).getTime()<Date.now()-2592e6?"local":"public")(r,b);if((0,a.useEffect)(()=>{const t=r?.activitypub_content_visibility;t||"public"===h||_({...r,activitypub_content_visibility:h})},[h,r,_]),"wp_block"===i)return null;const d=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),y={verticalAlign:"middle",gap:"4px",justifyContent:"start",display:"inline-flex",alignItems:"center"},m=(t,e,i)=>(0,c.jsx)(n.Tooltip,{text:i,children:(0,c.jsxs)(n.__experimentalText,{style:y,children:[(0,c.jsx)(o,{icon:t}),e]})}),g=t.PluginDocumentSettingPanel||e.PluginDocumentSettingPanel;return(0,c.jsxs)(g,{name:"activitypub",className:"block-editor-block-inspector",title:(0,w.__)("Fediverse ⁂","activitypub"),children:[(0,c.jsx)(n.TextControl,{label:(0,w.__)("Content Warning","activitypub"),value:r?.activitypub_content_warning,onChange:t=>{_({...r,activitypub_content_warning:t})},placeholder:(0,w.__)("Optional content warning","activitypub"),help:(0,w.__)("Content warnings do not change the content on your site, only in the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RangeControl,{label:(0,w.__)("Maximum Image Attachments","activitypub"),value:r?.activitypub_max_image_attachments,onChange:t=>{_({...r,activitypub_max_image_attachments:t})},min:0,max:10,help:(0,w.__)("Maximum number of image attachments to include when sharing to the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RadioControl,{label:(0,w.__)("Visibility","activitypub"),help:(0,w.__)("This adjusts the visibility of a post in the fediverse, but note that it won't affect how the post appears on the blog.","activitypub"),selected:h,options:[{label:m(s,(0,w.__)("Public","activitypub"),(0,w.__)("Post will be visible to everyone and appear in public timelines.","activitypub")),value:"public"},{label:m(u,(0,w.__)("Quiet public","activitypub"),(0,w.__)("Post will be visible to everyone but will not appear in public timelines.","activitypub")),value:"quiet_public"},{label:m(d,(0,w.__)("Do not federate","activitypub"),(0,w.__)("Post will not be shared to the Fediverse.","activitypub")),value:"local"}],onChange:t=>{_({...r,activitypub_content_visibility:t})},className:"activitypub-visibility"}),(0,c.jsx)(n.SelectControl,{label:(0,w.__)("Who can quote this post?","activitypub"),help:(0,w.__)("Quoting allows others to cite your post while adding their own commentary.","activitypub"),value:r?.activitypub_interaction_policy_quote,options:[{label:(0,w.__)("Anyone","activitypub"),value:"anyone"},{label:(0,w.__)("Followers only","activitypub"),value:"followers"},{label:(0,w.__)("Just me","activitypub"),value:"me"}],onChange:t=>{_({...r,activitypub_interaction_policy_quote:t})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})}}),(0,i.registerPlugin)("activitypub-editor-preview",{render:()=>{const e=(0,p.useSelect)(e=>e(t.store).getCurrentPost().status,[]);return(0,c.jsx)(c.Fragment,{children:t.PluginPreviewMenuItem?(0,c.jsx)(t.PluginPreviewMenuItem,{onClick:()=>{const e=(0,p.select)(t.store).getEditedPostPreviewLink(),i=(0,_.addQueryArgs)(e,{activitypub:"true"});window.open(i,"_blank")},icon:r,disabled:"auto-draft"===e,children:(0,w.__)("Fediverse preview ⁂","activitypub")}):null})}})})();
  • activitypub/tags/7.8.3/build/extra-fields/block.json

    r3424590 r3438374  
    33  "name": "activitypub/extra-fields",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Fediverse Extra Fields",
    77  "category": "widgets",
  • activitypub/tags/7.8.3/build/follow-me/block.json

    r3424590 r3438374  
    33  "name": "activitypub/follow-me",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Follow me on the Fediverse",
    77  "category": "widgets",
  • activitypub/tags/7.8.3/build/followers/block.json

    r3424590 r3438374  
    33  "name": "activitypub/followers",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Fediverse Followers",
    77  "category": "widgets",
  • activitypub/tags/7.8.3/build/reactions/block.json

    r3424590 r3438374  
    33  "name": "activitypub/reactions",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Fediverse Reactions",
    77  "category": "widgets",
  • activitypub/tags/7.8.3/build/reactions/index.asset.php

    r3424590 r3438374  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '8303ba1aa15d3e8af024');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4404e7e6c3d83497296d');
  • activitypub/tags/7.8.3/build/reactions/index.js

    r3424590 r3438374  
    1 (()=>{"use strict";var e,t={2091(e,t,r){const s=window.wp.blocks,a=window.wp.blockEditor,i=window.ReactJSXRuntime,n=[{attributes:{},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.InnerBlocks.Content,{}),(0,i.jsx)("div",{className:"activitypub-reactions-block"})]})},{attributes:{title:{type:"string",default:"Fediverse reactions"}},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>null,isEligible:({title:e})=>!!e,migrate:({title:e,...t})=>[t,[(0,s.createBlock)("core/heading",{content:e,level:6})]]}];function l(e){var t,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=l(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}const o=function(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=l(e))&&(s&&(s+=" "),s+=t);return s},c=window.wp.i18n,u=window.wp.data,p=window.wp.element,d=window.wp.components,f=window.wp.apiFetch;var m=r.n(f);function y(){return window._activityPubOptions||{}}const v=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return"compact"===t?null:(0,i.jsx)("ul",{className:"reaction-avatars",children:e.map((e,t)=>{const s=["reaction-avatar"].filter(Boolean).join(" "),a=e.avatar||r;return(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)("img",{src:a,alt:e.name,className:s,width:"32",height:"32",onError:e=>{e.target.src=r}})})},t)})})},h=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return(0,i.jsx)("ul",{className:"reactions-list",children:e.map((e,s)=>{const a=e.avatar||r;return(0,i.jsx)("li",{className:"reaction-item",children:(0,i.jsxs)("a",{href:e.url,className:"reaction-item",target:"_blank",rel:"noopener noreferrer",children:["facepile"===t&&(0,i.jsx)("img",{src:a,alt:e.name,width:"32",height:"32",onError:e=>{e.target.src=r}}),(0,i.jsx)("span",{className:"reaction-name",children:e.name})]})},s)})})},b=({items:e,label:t,displayStyle:r})=>{const[s,a]=(0,p.useState)(!1),[n,l]=(0,p.useState)(null),o=(0,p.useRef)(null),c=e.slice(0,20);return(0,i.jsxs)("div",{className:"reaction-group",ref:o,children:[(0,i.jsx)(v,{reactions:c,displayStyle:r}),(0,i.jsx)(d.Button,{ref:l,className:"reaction-label is-link",onClick:()=>a(!s),"aria-expanded":s,children:t}),s&&n&&(0,i.jsx)(d.Popover,{anchor:n,onClose:()=>a(!1),children:(0,i.jsx)(h,{reactions:e,displayStyle:r})})]})};function g({postId:e=null,reactions:t=null,fallbackReactions:r=null,displayStyle:s="facepile"}){const{namespace:a}=y(),[n,l]=(0,p.useState)(t),[o,c]=(0,p.useState)(!t),u=(0,p.useCallback)(()=>{r&&l(r),c(!1)},[r]);return(0,p.useEffect)(()=>{if(t)return l(t),void c(!1);e&&"number"==typeof e?(c(!0),m()({path:`/${a}/posts/${e}/reactions`}).then(e=>{const t=Object.values(e).some(e=>e.items?.length>0);l(!t&&r?r:e),c(!1)}).catch(u)):u()},[e,t,r,a,u]),o?null:n&&Object.values(n).some(e=>e.items?.length>0)?(0,i.jsx)("div",{className:"activitypub-reactions",children:Object.entries(n).map(([e,t])=>t.items?.length?(0,i.jsx)(b,{items:t.items,label:t.label,displayStyle:s},e):null)}):null}const w=(e,t,r,s)=>Array.from({length:e},(e,a)=>({name:`${t} ${a+1}`,url:"#",avatar:`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23${s[a%s.length]}'/%3E%3Ctext x='32' y='38' font-family='sans-serif' font-size='24' fill='white' text-anchor='middle'%3E${String.fromCharCode(r+a)}%3C/text%3E%3C/svg%3E`})),x=["FF6B6B","4ECDC4","45B7D1","96CEB4","D4A5A5","9B59B6","3498DB","E67E22"],j={likes:{label:(0,c.sprintf)(/* translators: %d: Number of likes */ /* translators: %d: Number of likes */
     1(()=>{"use strict";var e,t={2091(e,t,r){const s=window.wp.blocks,a=window.wp.blockEditor,i=window.ReactJSXRuntime,l=[{attributes:{},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.InnerBlocks.Content,{}),(0,i.jsx)("div",{className:"activitypub-reactions-block"})]})},{attributes:{title:{type:"string",default:"Fediverse reactions"}},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>null,isEligible:({title:e})=>!!e,migrate:({title:e,...t})=>[t,[(0,s.createBlock)("core/heading",{content:e,level:6})]]}];function n(e){var t,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}const o=function(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(s&&(s+=" "),s+=t);return s},c=window.wp.i18n,u=window.wp.data,p=window.wp.element,d=window.wp.components,f=window.wp.apiFetch;var m=r.n(f);function y(){return window._activityPubOptions||{}}const v=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return"compact"===t?null:(0,i.jsx)("ul",{className:"reaction-avatars",children:e.map((e,t)=>{const s=["reaction-avatar"].filter(Boolean).join(" "),a=e.avatar||r;return(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)("img",{src:a,alt:e.name,className:s,width:"32",height:"32",onError:e=>{e.target.src=r}})})},t)})})},h=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return(0,i.jsx)("ul",{className:"reactions-list",children:e.map((e,s)=>{const a=e.avatar||r;return(0,i.jsx)("li",{className:"reaction-item",children:(0,i.jsxs)("a",{href:e.url,className:"reaction-item",target:"_blank",rel:"noopener noreferrer",children:["facepile"===t&&(0,i.jsx)("img",{src:a,alt:e.name,width:"32",height:"32",onError:e=>{e.target.src=r}}),(0,i.jsx)("span",{className:"reaction-name",children:e.name})]})},s)})})},b=({items:e,label:t,displayStyle:r})=>{const[s,a]=(0,p.useState)(!1),[l,n]=(0,p.useState)(null),o=(0,p.useRef)(null),c=e.slice(0,20);return(0,i.jsxs)("div",{className:"reaction-group",ref:o,children:[(0,i.jsx)(v,{reactions:c,displayStyle:r}),(0,i.jsx)(d.Button,{ref:n,className:"reaction-label is-link",onClick:()=>a(!s),"aria-expanded":s,children:t}),s&&l&&(0,i.jsx)(d.Popover,{anchor:l,onClose:()=>a(!1),className:"activitypub-popover",children:(0,i.jsx)(h,{reactions:e,displayStyle:r})})]})};function g({postId:e=null,reactions:t=null,fallbackReactions:r=null,displayStyle:s="facepile"}){const{namespace:a}=y(),[l,n]=(0,p.useState)(t),[o,c]=(0,p.useState)(!t),u=(0,p.useCallback)(()=>{r&&n(r),c(!1)},[r]);return(0,p.useEffect)(()=>{if(t)return n(t),void c(!1);e&&"number"==typeof e?(c(!0),m()({path:`/${a}/posts/${e}/reactions`}).then(e=>{const t=Object.values(e).some(e=>e.items?.length>0);n(!t&&r?r:e),c(!1)}).catch(u)):u()},[e,t,r,a,u]),o?null:l&&Object.values(l).some(e=>e.items?.length>0)?(0,i.jsx)("div",{className:"activitypub-reactions",children:Object.entries(l).map(([e,t])=>t.items?.length?(0,i.jsx)(b,{items:t.items,label:t.label,displayStyle:s},e):null)}):null}const w=(e,t,r,s)=>Array.from({length:e},(e,a)=>({name:`${t} ${a+1}`,url:"#",avatar:`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23${s[a%s.length]}'/%3E%3Ctext x='32' y='38' font-family='sans-serif' font-size='24' fill='white' text-anchor='middle'%3E${String.fromCharCode(r+a)}%3C/text%3E%3C/svg%3E`})),x=["FF6B6B","4ECDC4","45B7D1","96CEB4","D4A5A5","9B59B6","3498DB","E67E22"],j={likes:{label:(0,c.sprintf)(/* translators: %d: Number of likes */ /* translators: %d: Number of likes */
    22(0,c._x)("%d likes","number of likes","activitypub"),9),items:w(9,"User",65,x)},reposts:{label:(0,c.sprintf)(/* translators: %d: Number of reposts */ /* translators: %d: Number of reposts */
    33(0,c._x)("%d reposts","number of reposts","activitypub"),6),items:w(6,"Reposter",82,x)},quotes:{label:(0,c.sprintf)(/* translators: %d: Number of quotes */ /* translators: %d: Number of quotes */
    4 (0,c._x)("%d quotes","number of quotes","activitypub"),7),items:w(7,"Quoter",81,x)}},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"activitypub/reactions","apiVersion":3,"version":"7.8.1","title":"Fediverse Reactions","category":"widgets","icon":"heart","description":"Display Fediverse likes and reposts","example":{"attributes":{"className":"is-style-facepile"}},"styles":[{"name":"facepile","label":"Facepile","isDefault":true},{"name":"compact","label":"Compact"}],"attributes":{"displayStyle":{"type":"string","default":"facepile"}},"supports":{"align":["wide","full"],"color":{"gradients":true},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"html":false,"interactivity":true,"layout":{"default":{"type":"constrained","orientation":"vertical","justifyContent":"center"},"allowEditing":false},"shadow":true,"typography":{"fontSize":true,"__experimentalDefaultControls":{"fontSize":true}}},"blockHooks":{"core/post-content":"after"},"textdomain":"activitypub","editorScript":"file:./index.js","style":"file:./style-index.css","viewScriptModule":"file:./view.js","viewScript":"wp-api-fetch","render":"file:./render.php"}');(0,s.registerBlockType)(k,{deprecated:n,edit:function({attributes:e,setAttributes:t,__unstableLayoutClassNames:r}){const{className:s="",displayStyle:n="facepile"}=e,l=(0,a.useBlockProps)({className:r}),{getCurrentPostId:d}=(0,u.select)("core/editor"),{showAvatars:f=!0}=y(),m=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(m.current)return;m.current=!0;const e=s?.includes("is-style-");if(!e){const e=f?"facepile":"compact";t({className:o(s,`is-style-${e}`),displayStyle:e})}},[s,f,t]);const v=s?.includes("is-style-compact")?"compact":"facepile";(0,p.useEffect)(()=>{v!==n&&t({displayStyle:v})},[v,n,t]);const h=[["core/heading",{level:6,placeholder:(0,c.__)("Fediverse Reactions","activitypub"),content:(0,c.__)("Fediverse Reactions","activitypub")}]];return(0,i.jsxs)("div",{...l,children:[(0,i.jsx)(a.InnerBlocks,{template:h,allowedBlocks:["core/heading"],templateLock:"all",renderAppender:!1}),(0,i.jsx)(g,{postId:d(),fallbackReactions:j,displayStyle:n})]})},save:function(){return(0,i.jsx)("div",{...a.useBlockProps.save(),children:(0,i.jsx)(a.InnerBlocks.Content,{})})}})}},r={};function s(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,s),i.exports}s.m=t,e=[],s.O=(t,r,a,i)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,a,i]=e[u],l=!0,o=0;o<r.length;o++)(!1&i||n>=i)&&Object.keys(s.O).every(e=>s.O[e](r[o]))?r.splice(o--,1):(l=!1,i<n&&(n=i));if(l){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,a,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={608:0,104:0};s.O.j=t=>0===e[t];var t=(t,r)=>{var a,i,[n,l,o]=r,c=0;if(n.some(t=>0!==e[t])){for(a in l)s.o(l,a)&&(s.m[a]=l[a]);if(o)var u=o(s)}for(t&&t(r);c<n.length;c++)i=n[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(u)},r=globalThis.webpackChunkwordpress_activitypub=globalThis.webpackChunkwordpress_activitypub||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=s.O(void 0,[104],()=>s(2091));a=s.O(a)})();
     4(0,c._x)("%d quotes","number of quotes","activitypub"),7),items:w(7,"Quoter",81,x)}},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"activitypub/reactions","apiVersion":3,"version":"7.8.2","title":"Fediverse Reactions","category":"widgets","icon":"heart","description":"Display Fediverse likes and reposts","example":{"attributes":{"className":"is-style-facepile"}},"styles":[{"name":"facepile","label":"Facepile","isDefault":true},{"name":"compact","label":"Compact"}],"attributes":{"displayStyle":{"type":"string","default":"facepile"}},"supports":{"align":["wide","full"],"color":{"gradients":true},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"html":false,"interactivity":true,"layout":{"default":{"type":"constrained","orientation":"vertical","justifyContent":"center"},"allowEditing":false},"shadow":true,"typography":{"fontSize":true,"__experimentalDefaultControls":{"fontSize":true}}},"blockHooks":{"core/post-content":"after"},"textdomain":"activitypub","editorScript":"file:./index.js","style":"file:./style-index.css","viewScriptModule":"file:./view.js","viewScript":"wp-api-fetch","render":"file:./render.php"}');(0,s.registerBlockType)(k,{deprecated:l,edit:function({attributes:e,setAttributes:t,__unstableLayoutClassNames:r}){const{className:s="",displayStyle:l="facepile"}=e,n=(0,a.useBlockProps)({className:r}),{getCurrentPostId:d}=(0,u.select)("core/editor"),{showAvatars:f=!0}=y(),m=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(m.current)return;m.current=!0;const e=s?.includes("is-style-");if(!e){const e=f?"facepile":"compact";t({className:o(s,`is-style-${e}`),displayStyle:e})}},[s,f,t]);const v=s?.includes("is-style-compact")?"compact":"facepile";(0,p.useEffect)(()=>{v!==l&&t({displayStyle:v})},[v,l,t]);const h=[["core/heading",{level:6,placeholder:(0,c.__)("Fediverse Reactions","activitypub"),content:(0,c.__)("Fediverse Reactions","activitypub")}]];return(0,i.jsxs)("div",{...n,children:[(0,i.jsx)(a.InnerBlocks,{template:h,allowedBlocks:["core/heading"],templateLock:"all",renderAppender:!1}),(0,i.jsx)(g,{postId:d(),fallbackReactions:j,displayStyle:l})]})},save:function(){return(0,i.jsx)("div",{...a.useBlockProps.save(),children:(0,i.jsx)(a.InnerBlocks.Content,{})})}})}},r={};function s(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,s),i.exports}s.m=t,e=[],s.O=(t,r,a,i)=>{if(!r){var l=1/0;for(u=0;u<e.length;u++){for(var[r,a,i]=e[u],n=!0,o=0;o<r.length;o++)(!1&i||l>=i)&&Object.keys(s.O).every(e=>s.O[e](r[o]))?r.splice(o--,1):(n=!1,i<l&&(l=i));if(n){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,a,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={608:0,104:0};s.O.j=t=>0===e[t];var t=(t,r)=>{var a,i,[l,n,o]=r,c=0;if(l.some(t=>0!==e[t])){for(a in n)s.o(n,a)&&(s.m[a]=n[a]);if(o)var u=o(s)}for(t&&t(r);c<l.length;c++)i=l[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(u)},r=globalThis.webpackChunkwordpress_activitypub=globalThis.webpackChunkwordpress_activitypub||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=s.O(void 0,[104],()=>s(2091));a=s.O(a)})();
  • activitypub/tags/7.8.3/build/reactions/style-index-rtl.css

    r3424590 r3438374  
    1 body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;right:0;padding:1rem;position:fixed;left:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;right:auto;padding:0;position:absolute;left:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 0 0 -10px;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-left:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
     1body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;right:0;padding:1rem;position:fixed;left:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;right:auto;padding:0;position:absolute;left:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 0 0 -10px;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-left:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.activitypub-popover .components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
  • activitypub/tags/7.8.3/build/reactions/style-index.css

    r3424590 r3438374  
    1 body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;left:0;padding:1rem;position:fixed;right:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;left:auto;padding:0;position:absolute;right:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 -10px 0 0;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-right:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
     1body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;left:0;padding:1rem;position:fixed;right:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;left:auto;padding:0;position:absolute;right:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 -10px 0 0;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-right:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.activitypub-popover .components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
  • activitypub/tags/7.8.3/build/remote-reply/block.json

    r3424590 r3438374  
    33  "name": "activitypub/remote-reply",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Reply on the Fediverse",
    77  "category": "widgets",
  • activitypub/tags/7.8.3/build/reply/block.json

    r3424590 r3438374  
    33  "apiVersion": 3,
    44  "name": "activitypub/reply",
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Federated Reply",
    77  "category": "widgets",
  • activitypub/tags/7.8.3/includes/class-attachments.php

    r3422091 r3438374  
    6868        }
    6969
    70         require_once ABSPATH . 'wp-admin/includes/file.php';
    71 
    72         \WP_Filesystem();
    7370        global $wp_filesystem;
     71        if ( ! $wp_filesystem ) {
     72            require_once ABSPATH . 'wp-admin/includes/file.php';
     73            \WP_Filesystem();
     74        }
     75
     76        if ( ! $wp_filesystem ) {
     77            return;
     78        }
    7479
    7580        $activitypub_dir = self::get_storage_paths( $post_id, 'post' )['basedir'];
     
    456461
    457462        // Initialize filesystem.
    458         \WP_Filesystem();
    459463        global $wp_filesystem;
     464        if ( ! $wp_filesystem ) {
     465            \WP_Filesystem();
     466        }
     467
     468        if ( ! $wp_filesystem ) {
     469            return new \WP_Error( 'filesystem_error', \__( 'Could not initialize filesystem.', 'activitypub' ) );
     470        }
    460471
    461472        $is_local = ! preg_match( '#^https?://#i', $attachment_data['url'] );
     
    590601
    591602        // Initialize filesystem if needed.
    592         \WP_Filesystem();
    593603        global $wp_filesystem;
     604        if ( ! $wp_filesystem ) {
     605            \WP_Filesystem();
     606        }
     607
     608        if ( ! $wp_filesystem ) {
     609            return new \WP_Error( 'filesystem_error', \__( 'Could not initialize filesystem.', 'activitypub' ) );
     610        }
    594611
    595612        // Make sure file name is unique.
     
    10331050        }
    10341051
    1035         require_once ABSPATH . 'wp-admin/includes/file.php';
    1036 
    1037         \WP_Filesystem();
    10381052        global $wp_filesystem;
     1053        if ( ! $wp_filesystem ) {
     1054            require_once ABSPATH . 'wp-admin/includes/file.php';
     1055            \WP_Filesystem();
     1056        }
     1057
     1058        if ( ! $wp_filesystem ) {
     1059            return;
     1060        }
    10391061
    10401062        $activitypub_dir = self::get_storage_paths( $actor_id, 'actor' )['basedir'];
  • activitypub/tags/7.8.3/includes/class-comment.php

    r3422986 r3438374  
    3030        \add_filter( 'get_comment_link', array( self::class, 'remote_comment_link' ), 11, 2 );
    3131        \add_action( 'pre_get_comments', array( static::class, 'comment_query' ) );
    32         \add_filter( 'pre_comment_approved', array( static::class, 'pre_comment_approved' ), 10, 2 );
     32        \add_filter( 'pre_comment_approved', array( static::class, 'pre_comment_approved' ), 11, 2 );
    3333        \add_filter( 'get_avatar_comment_types', array( static::class, 'get_avatar_comment_types' ), 99 );
    3434        \add_action( 'update_option_activitypub_allow_likes', array( self::class, 'maybe_update_comment_counts' ), 10, 2 );
     
    732732     */
    733733    public static function pre_comment_approved( $approved, $comment_data ) {
    734         if ( $approved || \is_wp_error( $approved ) ) {
     734        /*
     735         * Only return early for already-approved comments, trash, or errors.
     736         * Don't short-circuit on 'spam' - we may want to override Akismet.
     737         * Respect 'trash' since it comes from the WordPress disallowed list.
     738         */
     739        if ( 1 === $approved || '1' === $approved || 'trash' === $approved || \is_wp_error( $approved ) ) {
    735740            return $approved;
    736741        }
  • activitypub/tags/7.8.3/includes/class-embed.php

    r3393739 r3438374  
    5757        if ( ! $avatar_url && $author_url ) {
    5858            $author = Http::get_remote_object( $author_url );
    59             if ( ! is_wp_error( $author ) ) {
     59            if ( is_wp_error( $author ) ) {
     60                $author = array();
     61            } else {
    6062                $avatar_url  = $author['icon']['url'] ?? '';
    6163                $author_name = empty( $author['name'] ) ? $author_name : $author['name'];
  • activitypub/tags/7.8.3/includes/class-hashtag.php

    r3352030 r3438374  
    1818     */
    1919    public static function init() {
    20         if ( '1' === \get_option( 'activitypub_use_hashtags', '1' ) ) {
     20        if ( '1' === \get_option( 'activitypub_use_hashtags', '0' ) ) {
    2121            \add_action( 'wp_insert_post', array( self::class, 'insert_post' ), 10, 2 );
    2222            \add_filter( 'the_content', array( self::class, 'the_content' ) );
     
    6262        }
    6363
     64        $content = $post->post_content . "\n" . $post->post_excerpt;
     65        $content = self::extract_text_outside_protected_tags( $content );
     66
    6467        $tags = array();
    65 
    66         // Skip hashtags in HTML attributes, like hex colors.
    67         $content = wp_strip_all_tags( $post->post_content . "\n" . $post->post_excerpt );
    68 
    6968        if ( \preg_match_all( '/' . ACTIVITYPUB_HASHTAGS_REGEXP . '/i', $content, $match ) ) {
    70             $tags = array_unique( $match[1] );
     69            $tags = \array_unique( $match[1] );
    7170        }
    7271
    7372        \wp_add_post_tags( $post->ID, \implode( ', ', $tags ) );
     73    }
     74
     75    /**
     76     * Extract text content from outside protected HTML elements.
     77     *
     78     * Uses WP_HTML_Tag_Processor to properly parse HTML and skip content inside
     79     * protected tags, matching the behavior of enrich_content_data().
     80     *
     81     * @param string $content The HTML content to process.
     82     *
     83     * @return string Text content from non-protected areas only.
     84     */
     85    private static function extract_text_outside_protected_tags( $content ) {
     86        $processor = new \WP_HTML_Tag_Processor( $content );
     87
     88        /*
     89         * Do not process content inside protected tags.
     90         *
     91         * Note: SCRIPT, STYLE, and TEXTAREA are "atomic" elements in
     92         * WP_HTML_Tag_Processor, meaning their content is bundled with the tag
     93         * token and won't appear as separate #text nodes. Because of this they
     94         * do not need to be listed in $protected_tags: their inner text is
     95         * never surfaced as #text tokens for us to process.
     96         * See https://github.com/WordPress/wordpress-develop/blob/0fb3bb29596918864d808d156268a2df63c83620/src/wp-includes/html-api/class-wp-html-tag-processor.php#L276
     97         */
     98        $protected_tags   = array( 'PRE', 'CODE', 'A' );
     99        $tag_stack        = array();
     100        $filtered_content = '';
     101
     102        while ( $processor->next_token() ) {
     103            $token_type = $processor->get_token_type();
     104
     105            if ( '#tag' === $token_type ) {
     106                $tag_name = $processor->get_tag();
     107
     108                if ( $processor->is_tag_closer() ) {
     109                    // Closing tag: remove from stack.
     110                    $i = \array_search( $tag_name, $tag_stack, true );
     111                    if ( false !== $i ) {
     112                        $tag_stack = \array_slice( $tag_stack, 0, $i );
     113                    }
     114                } elseif ( \in_array( $tag_name, $protected_tags, true ) ) {
     115                    // Opening tag: add to stack.
     116                    $tag_stack[] = $tag_name;
     117                }
     118            } elseif ( '#text' === $token_type && empty( $tag_stack ) ) {
     119                // Only include text chunks that are outside protected tags.
     120                $filtered_content .= $processor->get_modifiable_text();
     121            }
     122        }
     123
     124        return $filtered_content;
    74125    }
    75126
  • activitypub/tags/7.8.3/includes/class-query.php

    r3422091 r3438374  
    339339        }
    340340
     341        if ( \is_author() && \get_user_option( 'activitypub_use_permalink_as_id', \get_queried_object_id() ) ) {
     342            $return = true;
     343        }
     344
    341345        /**
    342346         * Filters whether content negotiation should be forced.
  • activitypub/tags/7.8.3/includes/class-router.php

    r3422091 r3438374  
    274274            }
    275275
     276            /**
     277             * Filters the taxonomies supported for term redirects.
     278             *
     279             * @since 7.8.3
     280             *
     281             * @param array $supported_taxonomies Array of taxonomy names. Default array( 'category', 'post_tag' ).
     282             */
     283            $supported_taxonomies = \apply_filters( 'activitypub_supported_taxonomies', array( 'category', 'post_tag' ) );
     284
     285            if ( ! in_array( $term->taxonomy, $supported_taxonomies, true ) ) {
     286                return;
     287            }
     288
    276289            // Don't redirect for ActivityPub requests.
    277290            if ( is_activitypub_request() ) {
  • activitypub/tags/7.8.3/includes/collection/class-remote-actors.php

    r3424590 r3438374  
    6969     */
    7070    public static function get( $id ) {
    71         return \get_post( $id );
     71        $post = \get_post( $id );
     72
     73        if ( $post && self::POST_TYPE === $post->post_type ) {
     74            return $post;
     75        }
     76
     77        return null;
    7278    }
    7379
     
    221227        }
    222228
    223         return \get_post( $post_id );
     229        $post = \get_post( $post_id );
     230        if ( ! $post instanceof \WP_Post ) {
     231            return new \WP_Error(
     232                'activitypub_actor_not_found',
     233                \__( 'Actor not found', 'activitypub' ),
     234                array( 'status' => 404 )
     235            );
     236        }
     237
     238        return $post;
    224239    }
    225240
     
    281296        }
    282297
    283         return \get_post( $post_id );
     298        $post = \get_post( $post_id );
     299        if ( ! $post instanceof \WP_Post ) {
     300            return new \WP_Error(
     301                'activitypub_actor_not_found',
     302                \__( 'Actor not found', 'activitypub' ),
     303                array( 'status' => 404 )
     304            );
     305        }
     306
     307        return $post;
    284308    }
    285309
     
    305329
    306330        if ( $post_id ) {
    307             return \get_post( $post_id );
     331            $post = \get_post( $post_id );
     332            if ( ! $post instanceof \WP_Post ) {
     333                return new \WP_Error(
     334                    'activitypub_actor_not_found',
     335                    \__( 'Actor not found', 'activitypub' ),
     336                    array( 'status' => 404 )
     337                );
     338            }
     339
     340            return $post;
    308341        }
    309342
  • activitypub/tags/7.8.3/includes/wp-admin/class-settings-fields.php

    r3422091 r3438374  
    357357     */
    358358    public static function render_use_hashtags_field() {
    359         $value = get_option( 'activitypub_use_hashtags', '1' );
     359        $value = get_option( 'activitypub_use_hashtags', '0' );
    360360        ?>
    361361        <p>
  • activitypub/tags/7.8.3/includes/wp-admin/import/class-starter-kit.php

    r3422091 r3438374  
    198198
    199199        // Fetch the URL content.
    200         $response = \wp_remote_get(
     200        $response = \wp_safe_remote_get(
    201201            $url,
    202202            array(
  • activitypub/tags/7.8.3/integration/class-classic-editor.php

    r3422091 r3438374  
    2121        \add_filter( 'activitypub_attachments_media_markup', array( self::class, 'filter_attachments_media_markup' ), 10, 2 );
    2222        \add_filter( 'activitypub_attachment_ids', array( self::class, 'filter_attached_media_ids' ), 10, 2 );
     23        \add_filter( 'activitypub_site_supports_blocks', '__return_false' );
    2324        \add_action( 'add_meta_boxes', array( self::class, 'add_meta_box' ) );
    2425        \add_action( 'save_post', array( self::class, 'save_meta_data' ) );
     
    154155            <strong><?php \esc_html_e( 'Visibility', 'activitypub' ); ?></strong><br />
    155156            <label>
    156                 <input type="radio" name="activitypub_content_visibility" value="public" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); ?> />
     157                <input type="radio" name="activitypub_content_visibility" value="<?php echo \esc_attr( ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); ?>" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); ?> />
    157158                <?php \esc_html_e( 'Public', 'activitypub' ); ?>
    158159            </label><br />
    159160            <label>
    160                 <input type="radio" name="activitypub_content_visibility" value="quiet_public" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC ); ?> />
     161                <input type="radio" name="activitypub_content_visibility" value="<?php echo \esc_attr( ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC ); ?>" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC ); ?> />
    161162                <?php \esc_html_e( 'Quiet public', 'activitypub' ); ?>
    162163            </label><br />
    163164            <label>
    164                 <input type="radio" name="activitypub_content_visibility" value="local" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ); ?> />
     165                <input type="radio" name="activitypub_content_visibility" value="<?php echo \esc_attr( ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ); ?>" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ); ?> />
    165166                <?php \esc_html_e( 'Do not federate', 'activitypub' ); ?>
    166167            </label><br />
  • activitypub/tags/7.8.3/integration/load.php

    r3422091 r3438374  
    3535     * @see https://wordpress.org/plugins/classic-editor/
    3636     */
    37     if ( class_exists( '\Classic_Editor' ) || ! site_supports_blocks() ) {
     37    if ( \class_exists( '\Classic_Editor' ) || \function_exists( 'classicpress_version' ) || ! site_supports_blocks() ) {
    3838        Classic_Editor::init();
    3939    }
  • activitypub/tags/7.8.3/readme.txt

    r3424590 r3438374  
    44Requires at least: 6.5
    55Tested up to: 6.9
    6 Stable tag: 7.8.2
     6Stable tag: 7.8.3
    77Requires PHP: 7.2
    88License: MIT
     
    110110
    111111== Changelog ==
     112
     113### 7.8.3 - 2026-01-12
     114#### Security
     115- Improved security of the Starter Kit URL import by using wp_safe_remote_get.
     116
     117#### Added
     118- Force content negotiation on author pages when using permalink as Actor ID.
     119
     120#### Fixed
     121- Actors: avoid PHP warnings when trying to fetch invalid actor.
     122- Add ClassicPress compatibility by detecting it and disabling block support.
     123- Check if WP_Filesystem initialized successfully before using it to prevent fatal errors on hosts using FTP-based filesystem.
     124- Fixed ActivityPub comments being marked as spam by Akismet.
     125- Fixed an issue where embedding remote posts could fail when the author's profile was temporarily unavailable.
     126- Fixed flaky test for purge_ap_posts due to date boundary condition with -1 month
     127- Fixed inconsistent default value for the hashtag setting on new installations.
     128- Fixed reactions popover styles affecting other WordPress popovers.
     129- Fixed unwanted 301 redirects on search and posts pages when using Polylang or similar plugins.
     130- Fixed unwanted tags being created from hashtags inside links and other protected HTML elements.
     131- Fixed visibility setting not being saved correctly in block editor and classic editor.
    112132
    113133### 7.8.2 - 2025-12-21
  • activitypub/trunk/activitypub.php

    r3424590 r3438374  
    44 * Plugin URI: https://github.com/Automattic/wordpress-activitypub
    55 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
    6  * Version: 7.8.2
     6 * Version: 7.8.3
    77 * Author: Matthias Pfefferle & Automattic
    88 * Author URI: https://automattic.com/
     
    1818namespace Activitypub;
    1919
    20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.2' );
     20\define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.3' );
    2121
    2222// Plugin related constants.
  • activitypub/trunk/build/editor-plugin/plugin.asset.php

    r3409851 r3438374  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '4371fba4c154ea1d6303');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'c5a3060dcb4bb10e94ee');
  • activitypub/trunk/build/editor-plugin/plugin.js

    r3409851 r3438374  
    1 (()=>{"use strict";const t=window.wp.editor,e=window.wp.editPost,i=window.wp.plugins,n=window.wp.components,a=window.wp.element;var o=(0,a.forwardRef)(({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}));const l=window.wp.primitives,c=window.ReactJSXRuntime;var s=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),u=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),r=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const p=window.wp.data,v=window.wp.coreData,w=window.wp.url,_=window.wp.i18n,h=(t,e)=>t?.activitypub_content_visibility?t.activitypub_content_visibility:"federated"===t?.activitypub_status?"public":e&&new Date(e).getTime()<Date.now()-2592e6?"local":"public";(0,i.registerPlugin)("activitypub-editor-plugin",{render:()=>{const i=(0,p.useSelect)(e=>e(t.store).getCurrentPostType(),[]),[a,r]=(0,v.useEntityProp)("postType",i,"meta"),w=(0,p.useSelect)(e=>e(t.store).getCurrentPost().date,[]);if("wp_block"===i)return null;const b=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),d={verticalAlign:"middle",gap:"4px",justifyContent:"start",display:"inline-flex",alignItems:"center"},m=(t,e,i)=>(0,c.jsx)(n.Tooltip,{text:i,children:(0,c.jsxs)(n.__experimentalText,{style:d,children:[(0,c.jsx)(o,{icon:t}),e]})}),y=t.PluginDocumentSettingPanel||e.PluginDocumentSettingPanel;return(0,c.jsxs)(y,{name:"activitypub",className:"block-editor-block-inspector",title:(0,_.__)("Fediverse ⁂","activitypub"),children:[(0,c.jsx)(n.TextControl,{label:(0,_.__)("Content Warning","activitypub"),value:a?.activitypub_content_warning,onChange:t=>{r({...a,activitypub_content_warning:t})},placeholder:(0,_.__)("Optional content warning","activitypub"),help:(0,_.__)("Content warnings do not change the content on your site, only in the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RangeControl,{label:(0,_.__)("Maximum Image Attachments","activitypub"),value:a?.activitypub_max_image_attachments,onChange:t=>{r({...a,activitypub_max_image_attachments:t})},min:0,max:10,help:(0,_.__)("Maximum number of image attachments to include when sharing to the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RadioControl,{label:(0,_.__)("Visibility","activitypub"),help:(0,_.__)("This adjusts the visibility of a post in the fediverse, but note that it won't affect how the post appears on the blog.","activitypub"),selected:h(a,w),options:[{label:m(s,(0,_.__)("Public","activitypub"),(0,_.__)("Post will be visible to everyone and appear in public timelines.","activitypub")),value:"public"},{label:m(u,(0,_.__)("Quiet public","activitypub"),(0,_.__)("Post will be visible to everyone but will not appear in public timelines.","activitypub")),value:"quiet_public"},{label:m(b,(0,_.__)("Do not federate","activitypub"),(0,_.__)("Post will not be shared to the Fediverse.","activitypub")),value:"local"}],onChange:t=>{r({...a,activitypub_content_visibility:t})},className:"activitypub-visibility"}),(0,c.jsx)(n.SelectControl,{label:(0,_.__)("Who can quote this post?","activitypub"),help:(0,_.__)("Quoting allows others to cite your post while adding their own commentary.","activitypub"),value:a?.activitypub_interaction_policy_quote,options:[{label:(0,_.__)("Anyone","activitypub"),value:"anyone"},{label:(0,_.__)("Followers only","activitypub"),value:"followers"},{label:(0,_.__)("Just me","activitypub"),value:"me"}],onChange:t=>{r({...a,activitypub_interaction_policy_quote:t})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})}}),(0,i.registerPlugin)("activitypub-editor-preview",{render:()=>{const e=(0,p.useSelect)(e=>e(t.store).getCurrentPost().status,[]);return(0,c.jsx)(c.Fragment,{children:t.PluginPreviewMenuItem?(0,c.jsx)(t.PluginPreviewMenuItem,{onClick:()=>{const e=(0,p.select)(t.store).getEditedPostPreviewLink(),i=(0,w.addQueryArgs)(e,{activitypub:"true"});window.open(i,"_blank")},icon:r,disabled:"auto-draft"===e,children:(0,_.__)("Fediverse preview ⁂","activitypub")}):null})}})})();
     1(()=>{"use strict";const t=window.wp.editor,e=window.wp.editPost,i=window.wp.plugins,n=window.wp.components,a=window.wp.element;var o=(0,a.forwardRef)(({icon:t,size:e=24,...i},n)=>(0,a.cloneElement)(t,{width:e,height:e,...i,ref:n}));const l=window.wp.primitives,c=window.ReactJSXRuntime;var s=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),u=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})}),r=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const p=window.wp.data,v=window.wp.coreData,_=window.wp.url,w=window.wp.i18n;(0,i.registerPlugin)("activitypub-editor-plugin",{render:()=>{const i=(0,p.useSelect)(e=>e(t.store).getCurrentPostType(),[]),[r,_]=(0,v.useEntityProp)("postType",i,"meta"),b=(0,p.useSelect)(e=>e(t.store).getCurrentPost().date,[]),h=((t,e)=>t?.activitypub_content_visibility?t.activitypub_content_visibility:"federated"===t?.activitypub_status?"public":e&&new Date(e).getTime()<Date.now()-2592e6?"local":"public")(r,b);if((0,a.useEffect)(()=>{const t=r?.activitypub_content_visibility;t||"public"===h||_({...r,activitypub_content_visibility:h})},[h,r,_]),"wp_block"===i)return null;const d=(0,c.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),y={verticalAlign:"middle",gap:"4px",justifyContent:"start",display:"inline-flex",alignItems:"center"},m=(t,e,i)=>(0,c.jsx)(n.Tooltip,{text:i,children:(0,c.jsxs)(n.__experimentalText,{style:y,children:[(0,c.jsx)(o,{icon:t}),e]})}),g=t.PluginDocumentSettingPanel||e.PluginDocumentSettingPanel;return(0,c.jsxs)(g,{name:"activitypub",className:"block-editor-block-inspector",title:(0,w.__)("Fediverse ⁂","activitypub"),children:[(0,c.jsx)(n.TextControl,{label:(0,w.__)("Content Warning","activitypub"),value:r?.activitypub_content_warning,onChange:t=>{_({...r,activitypub_content_warning:t})},placeholder:(0,w.__)("Optional content warning","activitypub"),help:(0,w.__)("Content warnings do not change the content on your site, only in the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RangeControl,{label:(0,w.__)("Maximum Image Attachments","activitypub"),value:r?.activitypub_max_image_attachments,onChange:t=>{_({...r,activitypub_max_image_attachments:t})},min:0,max:10,help:(0,w.__)("Maximum number of image attachments to include when sharing to the fediverse.","activitypub"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,c.jsx)(n.RadioControl,{label:(0,w.__)("Visibility","activitypub"),help:(0,w.__)("This adjusts the visibility of a post in the fediverse, but note that it won't affect how the post appears on the blog.","activitypub"),selected:h,options:[{label:m(s,(0,w.__)("Public","activitypub"),(0,w.__)("Post will be visible to everyone and appear in public timelines.","activitypub")),value:"public"},{label:m(u,(0,w.__)("Quiet public","activitypub"),(0,w.__)("Post will be visible to everyone but will not appear in public timelines.","activitypub")),value:"quiet_public"},{label:m(d,(0,w.__)("Do not federate","activitypub"),(0,w.__)("Post will not be shared to the Fediverse.","activitypub")),value:"local"}],onChange:t=>{_({...r,activitypub_content_visibility:t})},className:"activitypub-visibility"}),(0,c.jsx)(n.SelectControl,{label:(0,w.__)("Who can quote this post?","activitypub"),help:(0,w.__)("Quoting allows others to cite your post while adding their own commentary.","activitypub"),value:r?.activitypub_interaction_policy_quote,options:[{label:(0,w.__)("Anyone","activitypub"),value:"anyone"},{label:(0,w.__)("Followers only","activitypub"),value:"followers"},{label:(0,w.__)("Just me","activitypub"),value:"me"}],onChange:t=>{_({...r,activitypub_interaction_policy_quote:t})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})}}),(0,i.registerPlugin)("activitypub-editor-preview",{render:()=>{const e=(0,p.useSelect)(e=>e(t.store).getCurrentPost().status,[]);return(0,c.jsx)(c.Fragment,{children:t.PluginPreviewMenuItem?(0,c.jsx)(t.PluginPreviewMenuItem,{onClick:()=>{const e=(0,p.select)(t.store).getEditedPostPreviewLink(),i=(0,_.addQueryArgs)(e,{activitypub:"true"});window.open(i,"_blank")},icon:r,disabled:"auto-draft"===e,children:(0,w.__)("Fediverse preview ⁂","activitypub")}):null})}})})();
  • activitypub/trunk/build/extra-fields/block.json

    r3424590 r3438374  
    33  "name": "activitypub/extra-fields",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Fediverse Extra Fields",
    77  "category": "widgets",
  • activitypub/trunk/build/follow-me/block.json

    r3424590 r3438374  
    33  "name": "activitypub/follow-me",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Follow me on the Fediverse",
    77  "category": "widgets",
  • activitypub/trunk/build/followers/block.json

    r3424590 r3438374  
    33  "name": "activitypub/followers",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Fediverse Followers",
    77  "category": "widgets",
  • activitypub/trunk/build/reactions/block.json

    r3424590 r3438374  
    33  "name": "activitypub/reactions",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Fediverse Reactions",
    77  "category": "widgets",
  • activitypub/trunk/build/reactions/index.asset.php

    r3424590 r3438374  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '8303ba1aa15d3e8af024');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4404e7e6c3d83497296d');
  • activitypub/trunk/build/reactions/index.js

    r3424590 r3438374  
    1 (()=>{"use strict";var e,t={2091(e,t,r){const s=window.wp.blocks,a=window.wp.blockEditor,i=window.ReactJSXRuntime,n=[{attributes:{},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.InnerBlocks.Content,{}),(0,i.jsx)("div",{className:"activitypub-reactions-block"})]})},{attributes:{title:{type:"string",default:"Fediverse reactions"}},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>null,isEligible:({title:e})=>!!e,migrate:({title:e,...t})=>[t,[(0,s.createBlock)("core/heading",{content:e,level:6})]]}];function l(e){var t,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=l(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}const o=function(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=l(e))&&(s&&(s+=" "),s+=t);return s},c=window.wp.i18n,u=window.wp.data,p=window.wp.element,d=window.wp.components,f=window.wp.apiFetch;var m=r.n(f);function y(){return window._activityPubOptions||{}}const v=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return"compact"===t?null:(0,i.jsx)("ul",{className:"reaction-avatars",children:e.map((e,t)=>{const s=["reaction-avatar"].filter(Boolean).join(" "),a=e.avatar||r;return(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)("img",{src:a,alt:e.name,className:s,width:"32",height:"32",onError:e=>{e.target.src=r}})})},t)})})},h=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return(0,i.jsx)("ul",{className:"reactions-list",children:e.map((e,s)=>{const a=e.avatar||r;return(0,i.jsx)("li",{className:"reaction-item",children:(0,i.jsxs)("a",{href:e.url,className:"reaction-item",target:"_blank",rel:"noopener noreferrer",children:["facepile"===t&&(0,i.jsx)("img",{src:a,alt:e.name,width:"32",height:"32",onError:e=>{e.target.src=r}}),(0,i.jsx)("span",{className:"reaction-name",children:e.name})]})},s)})})},b=({items:e,label:t,displayStyle:r})=>{const[s,a]=(0,p.useState)(!1),[n,l]=(0,p.useState)(null),o=(0,p.useRef)(null),c=e.slice(0,20);return(0,i.jsxs)("div",{className:"reaction-group",ref:o,children:[(0,i.jsx)(v,{reactions:c,displayStyle:r}),(0,i.jsx)(d.Button,{ref:l,className:"reaction-label is-link",onClick:()=>a(!s),"aria-expanded":s,children:t}),s&&n&&(0,i.jsx)(d.Popover,{anchor:n,onClose:()=>a(!1),children:(0,i.jsx)(h,{reactions:e,displayStyle:r})})]})};function g({postId:e=null,reactions:t=null,fallbackReactions:r=null,displayStyle:s="facepile"}){const{namespace:a}=y(),[n,l]=(0,p.useState)(t),[o,c]=(0,p.useState)(!t),u=(0,p.useCallback)(()=>{r&&l(r),c(!1)},[r]);return(0,p.useEffect)(()=>{if(t)return l(t),void c(!1);e&&"number"==typeof e?(c(!0),m()({path:`/${a}/posts/${e}/reactions`}).then(e=>{const t=Object.values(e).some(e=>e.items?.length>0);l(!t&&r?r:e),c(!1)}).catch(u)):u()},[e,t,r,a,u]),o?null:n&&Object.values(n).some(e=>e.items?.length>0)?(0,i.jsx)("div",{className:"activitypub-reactions",children:Object.entries(n).map(([e,t])=>t.items?.length?(0,i.jsx)(b,{items:t.items,label:t.label,displayStyle:s},e):null)}):null}const w=(e,t,r,s)=>Array.from({length:e},(e,a)=>({name:`${t} ${a+1}`,url:"#",avatar:`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23${s[a%s.length]}'/%3E%3Ctext x='32' y='38' font-family='sans-serif' font-size='24' fill='white' text-anchor='middle'%3E${String.fromCharCode(r+a)}%3C/text%3E%3C/svg%3E`})),x=["FF6B6B","4ECDC4","45B7D1","96CEB4","D4A5A5","9B59B6","3498DB","E67E22"],j={likes:{label:(0,c.sprintf)(/* translators: %d: Number of likes */ /* translators: %d: Number of likes */
     1(()=>{"use strict";var e,t={2091(e,t,r){const s=window.wp.blocks,a=window.wp.blockEditor,i=window.ReactJSXRuntime,l=[{attributes:{},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.InnerBlocks.Content,{}),(0,i.jsx)("div",{className:"activitypub-reactions-block"})]})},{attributes:{title:{type:"string",default:"Fediverse reactions"}},supports:{html:!1,align:!0,layout:{default:{type:"constrained",orientation:"vertical",justifyContent:"center"}}},save:()=>null,isEligible:({title:e})=>!!e,migrate:({title:e,...t})=>[t,[(0,s.createBlock)("core/heading",{content:e,level:6})]]}];function n(e){var t,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}const o=function(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(s&&(s+=" "),s+=t);return s},c=window.wp.i18n,u=window.wp.data,p=window.wp.element,d=window.wp.components,f=window.wp.apiFetch;var m=r.n(f);function y(){return window._activityPubOptions||{}}const v=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return"compact"===t?null:(0,i.jsx)("ul",{className:"reaction-avatars",children:e.map((e,t)=>{const s=["reaction-avatar"].filter(Boolean).join(" "),a=e.avatar||r;return(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)("img",{src:a,alt:e.name,className:s,width:"32",height:"32",onError:e=>{e.target.src=r}})})},t)})})},h=({reactions:e,displayStyle:t})=>{const{defaultAvatarUrl:r}=y();return(0,i.jsx)("ul",{className:"reactions-list",children:e.map((e,s)=>{const a=e.avatar||r;return(0,i.jsx)("li",{className:"reaction-item",children:(0,i.jsxs)("a",{href:e.url,className:"reaction-item",target:"_blank",rel:"noopener noreferrer",children:["facepile"===t&&(0,i.jsx)("img",{src:a,alt:e.name,width:"32",height:"32",onError:e=>{e.target.src=r}}),(0,i.jsx)("span",{className:"reaction-name",children:e.name})]})},s)})})},b=({items:e,label:t,displayStyle:r})=>{const[s,a]=(0,p.useState)(!1),[l,n]=(0,p.useState)(null),o=(0,p.useRef)(null),c=e.slice(0,20);return(0,i.jsxs)("div",{className:"reaction-group",ref:o,children:[(0,i.jsx)(v,{reactions:c,displayStyle:r}),(0,i.jsx)(d.Button,{ref:n,className:"reaction-label is-link",onClick:()=>a(!s),"aria-expanded":s,children:t}),s&&l&&(0,i.jsx)(d.Popover,{anchor:l,onClose:()=>a(!1),className:"activitypub-popover",children:(0,i.jsx)(h,{reactions:e,displayStyle:r})})]})};function g({postId:e=null,reactions:t=null,fallbackReactions:r=null,displayStyle:s="facepile"}){const{namespace:a}=y(),[l,n]=(0,p.useState)(t),[o,c]=(0,p.useState)(!t),u=(0,p.useCallback)(()=>{r&&n(r),c(!1)},[r]);return(0,p.useEffect)(()=>{if(t)return n(t),void c(!1);e&&"number"==typeof e?(c(!0),m()({path:`/${a}/posts/${e}/reactions`}).then(e=>{const t=Object.values(e).some(e=>e.items?.length>0);n(!t&&r?r:e),c(!1)}).catch(u)):u()},[e,t,r,a,u]),o?null:l&&Object.values(l).some(e=>e.items?.length>0)?(0,i.jsx)("div",{className:"activitypub-reactions",children:Object.entries(l).map(([e,t])=>t.items?.length?(0,i.jsx)(b,{items:t.items,label:t.label,displayStyle:s},e):null)}):null}const w=(e,t,r,s)=>Array.from({length:e},(e,a)=>({name:`${t} ${a+1}`,url:"#",avatar:`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23${s[a%s.length]}'/%3E%3Ctext x='32' y='38' font-family='sans-serif' font-size='24' fill='white' text-anchor='middle'%3E${String.fromCharCode(r+a)}%3C/text%3E%3C/svg%3E`})),x=["FF6B6B","4ECDC4","45B7D1","96CEB4","D4A5A5","9B59B6","3498DB","E67E22"],j={likes:{label:(0,c.sprintf)(/* translators: %d: Number of likes */ /* translators: %d: Number of likes */
    22(0,c._x)("%d likes","number of likes","activitypub"),9),items:w(9,"User",65,x)},reposts:{label:(0,c.sprintf)(/* translators: %d: Number of reposts */ /* translators: %d: Number of reposts */
    33(0,c._x)("%d reposts","number of reposts","activitypub"),6),items:w(6,"Reposter",82,x)},quotes:{label:(0,c.sprintf)(/* translators: %d: Number of quotes */ /* translators: %d: Number of quotes */
    4 (0,c._x)("%d quotes","number of quotes","activitypub"),7),items:w(7,"Quoter",81,x)}},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"activitypub/reactions","apiVersion":3,"version":"7.8.1","title":"Fediverse Reactions","category":"widgets","icon":"heart","description":"Display Fediverse likes and reposts","example":{"attributes":{"className":"is-style-facepile"}},"styles":[{"name":"facepile","label":"Facepile","isDefault":true},{"name":"compact","label":"Compact"}],"attributes":{"displayStyle":{"type":"string","default":"facepile"}},"supports":{"align":["wide","full"],"color":{"gradients":true},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"html":false,"interactivity":true,"layout":{"default":{"type":"constrained","orientation":"vertical","justifyContent":"center"},"allowEditing":false},"shadow":true,"typography":{"fontSize":true,"__experimentalDefaultControls":{"fontSize":true}}},"blockHooks":{"core/post-content":"after"},"textdomain":"activitypub","editorScript":"file:./index.js","style":"file:./style-index.css","viewScriptModule":"file:./view.js","viewScript":"wp-api-fetch","render":"file:./render.php"}');(0,s.registerBlockType)(k,{deprecated:n,edit:function({attributes:e,setAttributes:t,__unstableLayoutClassNames:r}){const{className:s="",displayStyle:n="facepile"}=e,l=(0,a.useBlockProps)({className:r}),{getCurrentPostId:d}=(0,u.select)("core/editor"),{showAvatars:f=!0}=y(),m=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(m.current)return;m.current=!0;const e=s?.includes("is-style-");if(!e){const e=f?"facepile":"compact";t({className:o(s,`is-style-${e}`),displayStyle:e})}},[s,f,t]);const v=s?.includes("is-style-compact")?"compact":"facepile";(0,p.useEffect)(()=>{v!==n&&t({displayStyle:v})},[v,n,t]);const h=[["core/heading",{level:6,placeholder:(0,c.__)("Fediverse Reactions","activitypub"),content:(0,c.__)("Fediverse Reactions","activitypub")}]];return(0,i.jsxs)("div",{...l,children:[(0,i.jsx)(a.InnerBlocks,{template:h,allowedBlocks:["core/heading"],templateLock:"all",renderAppender:!1}),(0,i.jsx)(g,{postId:d(),fallbackReactions:j,displayStyle:n})]})},save:function(){return(0,i.jsx)("div",{...a.useBlockProps.save(),children:(0,i.jsx)(a.InnerBlocks.Content,{})})}})}},r={};function s(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,s),i.exports}s.m=t,e=[],s.O=(t,r,a,i)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,a,i]=e[u],l=!0,o=0;o<r.length;o++)(!1&i||n>=i)&&Object.keys(s.O).every(e=>s.O[e](r[o]))?r.splice(o--,1):(l=!1,i<n&&(n=i));if(l){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,a,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={608:0,104:0};s.O.j=t=>0===e[t];var t=(t,r)=>{var a,i,[n,l,o]=r,c=0;if(n.some(t=>0!==e[t])){for(a in l)s.o(l,a)&&(s.m[a]=l[a]);if(o)var u=o(s)}for(t&&t(r);c<n.length;c++)i=n[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(u)},r=globalThis.webpackChunkwordpress_activitypub=globalThis.webpackChunkwordpress_activitypub||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=s.O(void 0,[104],()=>s(2091));a=s.O(a)})();
     4(0,c._x)("%d quotes","number of quotes","activitypub"),7),items:w(7,"Quoter",81,x)}},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"activitypub/reactions","apiVersion":3,"version":"7.8.2","title":"Fediverse Reactions","category":"widgets","icon":"heart","description":"Display Fediverse likes and reposts","example":{"attributes":{"className":"is-style-facepile"}},"styles":[{"name":"facepile","label":"Facepile","isDefault":true},{"name":"compact","label":"Compact"}],"attributes":{"displayStyle":{"type":"string","default":"facepile"}},"supports":{"align":["wide","full"],"color":{"gradients":true},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"html":false,"interactivity":true,"layout":{"default":{"type":"constrained","orientation":"vertical","justifyContent":"center"},"allowEditing":false},"shadow":true,"typography":{"fontSize":true,"__experimentalDefaultControls":{"fontSize":true}}},"blockHooks":{"core/post-content":"after"},"textdomain":"activitypub","editorScript":"file:./index.js","style":"file:./style-index.css","viewScriptModule":"file:./view.js","viewScript":"wp-api-fetch","render":"file:./render.php"}');(0,s.registerBlockType)(k,{deprecated:l,edit:function({attributes:e,setAttributes:t,__unstableLayoutClassNames:r}){const{className:s="",displayStyle:l="facepile"}=e,n=(0,a.useBlockProps)({className:r}),{getCurrentPostId:d}=(0,u.select)("core/editor"),{showAvatars:f=!0}=y(),m=(0,p.useRef)(!1);(0,p.useEffect)(()=>{if(m.current)return;m.current=!0;const e=s?.includes("is-style-");if(!e){const e=f?"facepile":"compact";t({className:o(s,`is-style-${e}`),displayStyle:e})}},[s,f,t]);const v=s?.includes("is-style-compact")?"compact":"facepile";(0,p.useEffect)(()=>{v!==l&&t({displayStyle:v})},[v,l,t]);const h=[["core/heading",{level:6,placeholder:(0,c.__)("Fediverse Reactions","activitypub"),content:(0,c.__)("Fediverse Reactions","activitypub")}]];return(0,i.jsxs)("div",{...n,children:[(0,i.jsx)(a.InnerBlocks,{template:h,allowedBlocks:["core/heading"],templateLock:"all",renderAppender:!1}),(0,i.jsx)(g,{postId:d(),fallbackReactions:j,displayStyle:l})]})},save:function(){return(0,i.jsx)("div",{...a.useBlockProps.save(),children:(0,i.jsx)(a.InnerBlocks.Content,{})})}})}},r={};function s(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,s),i.exports}s.m=t,e=[],s.O=(t,r,a,i)=>{if(!r){var l=1/0;for(u=0;u<e.length;u++){for(var[r,a,i]=e[u],n=!0,o=0;o<r.length;o++)(!1&i||l>=i)&&Object.keys(s.O).every(e=>s.O[e](r[o]))?r.splice(o--,1):(n=!1,i<l&&(l=i));if(n){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,a,i]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={608:0,104:0};s.O.j=t=>0===e[t];var t=(t,r)=>{var a,i,[l,n,o]=r,c=0;if(l.some(t=>0!==e[t])){for(a in n)s.o(n,a)&&(s.m[a]=n[a]);if(o)var u=o(s)}for(t&&t(r);c<l.length;c++)i=l[c],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(u)},r=globalThis.webpackChunkwordpress_activitypub=globalThis.webpackChunkwordpress_activitypub||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=s.O(void 0,[104],()=>s(2091));a=s.O(a)})();
  • activitypub/trunk/build/reactions/style-index-rtl.css

    r3424590 r3438374  
    1 body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;right:0;padding:1rem;position:fixed;left:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;right:auto;padding:0;position:absolute;left:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 0 0 -10px;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-left:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
     1body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;right:0;padding:1rem;position:fixed;left:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;right:auto;padding:0;position:absolute;left:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 0 0 -10px;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-left:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.activitypub-popover .components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
  • activitypub/trunk/build/reactions/style-index.css

    r3424590 r3438374  
    1 body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;left:0;padding:1rem;position:fixed;right:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;left:auto;padding:0;position:absolute;right:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 -10px 0 0;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-right:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
     1body.modal-open{overflow:hidden}.activitypub-modal__overlay{align-items:center;background-color:rgba(0,0,0,.5);bottom:0;color:initial;display:flex;justify-content:center;left:0;padding:1rem;position:fixed;right:0;top:0;z-index:100000}.activitypub-modal__overlay.compact{align-items:flex-start;background-color:transparent;bottom:auto;justify-content:flex-start;left:auto;padding:0;position:absolute;right:auto;top:auto;z-index:100}.activitypub-modal__overlay[hidden]{display:none}.activitypub-modal__frame{animation:activitypub-modal-appear .2s ease-out;background-color:var(--wp--preset--color--white,#fff);border-radius:8px;box-shadow:0 5px 15px rgba(0,0,0,.3);display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-width:660px;overflow:hidden;width:100%}.compact .activitypub-modal__frame{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;width:auto}.activitypub-modal__header{align-items:center;border-bottom:1px solid var(--wp--preset--color--light-gray,#f0f0f0);display:flex;flex-shrink:0;justify-content:space-between;padding:2rem 2rem 1.5rem}.compact .activitypub-modal__header{display:none}.activitypub-modal__header .activitypub-modal__close{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;padding:.5rem;width:auto}.activitypub-modal__header .activitypub-modal__close:active{border:none;padding:.5rem}.activitypub-modal__title{font-size:130%;font-weight:600;line-height:1.4;margin:0!important}.activitypub-modal__content{overflow-y:auto}@keyframes activitypub-modal-appear{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.wp-block-activitypub-reactions{margin-bottom:2rem;margin-top:2rem;position:relative}.wp-block-activitypub-reactions.has-background,.wp-block-activitypub-reactions.has-border{box-sizing:border-box;padding:2rem}.wp-block-activitypub-reactions .activitypub-reactions{display:flex;flex-direction:column;flex-wrap:wrap}.wp-block-activitypub-reactions .reaction-group{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin:.5em 0;position:relative;width:100%}@media(max-width:782px){.wp-block-activitypub-reactions .reaction-group:has(.reaction-avatars:not(:empty)){justify-content:space-between}}.wp-block-activitypub-reactions .reaction-group .reaction-avatars{align-items:center;display:flex;flex-direction:row;list-style:none;margin:0!important;padding:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li{margin:0 -10px 0 0;padding:0;transition:transform .2s ease}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:not([hidden]):not(:has(~li:not([hidden]))){margin-right:0}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li:hover{transform:translateY(-2px);z-index:2}.wp-block-activitypub-reactions .reaction-group .reaction-avatars li a{border-radius:50%;box-shadow:none;display:block;line-height:1;text-decoration:none}.wp-block-activitypub-reactions .reaction-group .reaction-avatar{max-height:32px;max-width:32px;overflow:hidden;-moz-force-broken-image-icon:1;border:.5px solid var(--wp--preset--color--contrast,hsla(0,0%,100%,.8));border-radius:50%;box-shadow:0 0 0 .5px hsla(0,0%,100%,.8),0 1px 3px rgba(0,0,0,.2);transition:transform .6s cubic-bezier(.34,1.56,.64,1);will-change:transform}.wp-block-activitypub-reactions .reaction-group .reaction-avatar:focus-visible,.wp-block-activitypub-reactions .reaction-group .reaction-avatar:hover{position:relative;transform:translateY(-5px);z-index:1}.wp-block-activitypub-reactions .reaction-group .reaction-label{align-items:center;background:none;border:none;border-radius:4px;color:currentcolor;display:flex;flex:0 0 auto;font-size:var(--wp--preset--font-size--small,.875rem);gap:.25rem;padding:.25rem .5rem;text-decoration:none;transition:background-color .2s ease;white-space:nowrap}.wp-block-activitypub-reactions .reaction-group .reaction-label:hover{background-color:rgba(0,0,0,.05);color:currentcolor}.wp-block-activitypub-reactions .reaction-group .reaction-label:focus:not(:disabled){box-shadow:none;outline:1px solid currentcolor;outline-offset:2px}.reactions-list{list-style:none;margin:0!important;padding:.5rem}.components-popover__content>.reactions-list{padding:0}.reactions-list .reaction-item{margin:0 0 .5rem}.reactions-list .reaction-item:last-child{margin-bottom:0}.reactions-list .reaction-item a{align-items:center;border-radius:4px;box-shadow:none;color:inherit;display:flex;gap:.75rem;padding:.5rem;text-decoration:none;transition:background-color .2s ease}.reactions-list .reaction-item a:hover{background-color:rgba(0,0,0,.03)}.reactions-list .reaction-item img{border:1px solid var(--wp--preset--color--light-gray,#f0f0f0);border-radius:50%;box-shadow:none;height:36px;width:36px}.reactions-list .reaction-item .reaction-name{font-size:var(--wp--preset--font-size--small,.875rem)}.activitypub-popover .components-popover__content{box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:300px;max-width:-moz-min-content;max-width:min-content;min-width:250px;padding:.5rem;width:auto}.wp-block-activitypub-reactions.is-style-compact .wp-block-heading{margin-bottom:.5em}.wp-block-activitypub-reactions.is-style-compact .activitypub-reactions{display:inline-flex;flex-direction:row;flex-wrap:wrap;gap:.5em}.wp-block-activitypub-reactions.is-style-compact .reaction-group{display:inline-flex;margin:0;width:auto}
  • activitypub/trunk/build/remote-reply/block.json

    r3424590 r3438374  
    33  "name": "activitypub/remote-reply",
    44  "apiVersion": 3,
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Reply on the Fediverse",
    77  "category": "widgets",
  • activitypub/trunk/build/reply/block.json

    r3424590 r3438374  
    33  "apiVersion": 3,
    44  "name": "activitypub/reply",
    5   "version": "7.8.2",
     5  "version": "7.8.3",
    66  "title": "Federated Reply",
    77  "category": "widgets",
  • activitypub/trunk/includes/class-attachments.php

    r3422091 r3438374  
    6868        }
    6969
    70         require_once ABSPATH . 'wp-admin/includes/file.php';
    71 
    72         \WP_Filesystem();
    7370        global $wp_filesystem;
     71        if ( ! $wp_filesystem ) {
     72            require_once ABSPATH . 'wp-admin/includes/file.php';
     73            \WP_Filesystem();
     74        }
     75
     76        if ( ! $wp_filesystem ) {
     77            return;
     78        }
    7479
    7580        $activitypub_dir = self::get_storage_paths( $post_id, 'post' )['basedir'];
     
    456461
    457462        // Initialize filesystem.
    458         \WP_Filesystem();
    459463        global $wp_filesystem;
     464        if ( ! $wp_filesystem ) {
     465            \WP_Filesystem();
     466        }
     467
     468        if ( ! $wp_filesystem ) {
     469            return new \WP_Error( 'filesystem_error', \__( 'Could not initialize filesystem.', 'activitypub' ) );
     470        }
    460471
    461472        $is_local = ! preg_match( '#^https?://#i', $attachment_data['url'] );
     
    590601
    591602        // Initialize filesystem if needed.
    592         \WP_Filesystem();
    593603        global $wp_filesystem;
     604        if ( ! $wp_filesystem ) {
     605            \WP_Filesystem();
     606        }
     607
     608        if ( ! $wp_filesystem ) {
     609            return new \WP_Error( 'filesystem_error', \__( 'Could not initialize filesystem.', 'activitypub' ) );
     610        }
    594611
    595612        // Make sure file name is unique.
     
    10331050        }
    10341051
    1035         require_once ABSPATH . 'wp-admin/includes/file.php';
    1036 
    1037         \WP_Filesystem();
    10381052        global $wp_filesystem;
     1053        if ( ! $wp_filesystem ) {
     1054            require_once ABSPATH . 'wp-admin/includes/file.php';
     1055            \WP_Filesystem();
     1056        }
     1057
     1058        if ( ! $wp_filesystem ) {
     1059            return;
     1060        }
    10391061
    10401062        $activitypub_dir = self::get_storage_paths( $actor_id, 'actor' )['basedir'];
  • activitypub/trunk/includes/class-comment.php

    r3422986 r3438374  
    3030        \add_filter( 'get_comment_link', array( self::class, 'remote_comment_link' ), 11, 2 );
    3131        \add_action( 'pre_get_comments', array( static::class, 'comment_query' ) );
    32         \add_filter( 'pre_comment_approved', array( static::class, 'pre_comment_approved' ), 10, 2 );
     32        \add_filter( 'pre_comment_approved', array( static::class, 'pre_comment_approved' ), 11, 2 );
    3333        \add_filter( 'get_avatar_comment_types', array( static::class, 'get_avatar_comment_types' ), 99 );
    3434        \add_action( 'update_option_activitypub_allow_likes', array( self::class, 'maybe_update_comment_counts' ), 10, 2 );
     
    732732     */
    733733    public static function pre_comment_approved( $approved, $comment_data ) {
    734         if ( $approved || \is_wp_error( $approved ) ) {
     734        /*
     735         * Only return early for already-approved comments, trash, or errors.
     736         * Don't short-circuit on 'spam' - we may want to override Akismet.
     737         * Respect 'trash' since it comes from the WordPress disallowed list.
     738         */
     739        if ( 1 === $approved || '1' === $approved || 'trash' === $approved || \is_wp_error( $approved ) ) {
    735740            return $approved;
    736741        }
  • activitypub/trunk/includes/class-embed.php

    r3393739 r3438374  
    5757        if ( ! $avatar_url && $author_url ) {
    5858            $author = Http::get_remote_object( $author_url );
    59             if ( ! is_wp_error( $author ) ) {
     59            if ( is_wp_error( $author ) ) {
     60                $author = array();
     61            } else {
    6062                $avatar_url  = $author['icon']['url'] ?? '';
    6163                $author_name = empty( $author['name'] ) ? $author_name : $author['name'];
  • activitypub/trunk/includes/class-hashtag.php

    r3352030 r3438374  
    1818     */
    1919    public static function init() {
    20         if ( '1' === \get_option( 'activitypub_use_hashtags', '1' ) ) {
     20        if ( '1' === \get_option( 'activitypub_use_hashtags', '0' ) ) {
    2121            \add_action( 'wp_insert_post', array( self::class, 'insert_post' ), 10, 2 );
    2222            \add_filter( 'the_content', array( self::class, 'the_content' ) );
     
    6262        }
    6363
     64        $content = $post->post_content . "\n" . $post->post_excerpt;
     65        $content = self::extract_text_outside_protected_tags( $content );
     66
    6467        $tags = array();
    65 
    66         // Skip hashtags in HTML attributes, like hex colors.
    67         $content = wp_strip_all_tags( $post->post_content . "\n" . $post->post_excerpt );
    68 
    6968        if ( \preg_match_all( '/' . ACTIVITYPUB_HASHTAGS_REGEXP . '/i', $content, $match ) ) {
    70             $tags = array_unique( $match[1] );
     69            $tags = \array_unique( $match[1] );
    7170        }
    7271
    7372        \wp_add_post_tags( $post->ID, \implode( ', ', $tags ) );
     73    }
     74
     75    /**
     76     * Extract text content from outside protected HTML elements.
     77     *
     78     * Uses WP_HTML_Tag_Processor to properly parse HTML and skip content inside
     79     * protected tags, matching the behavior of enrich_content_data().
     80     *
     81     * @param string $content The HTML content to process.
     82     *
     83     * @return string Text content from non-protected areas only.
     84     */
     85    private static function extract_text_outside_protected_tags( $content ) {
     86        $processor = new \WP_HTML_Tag_Processor( $content );
     87
     88        /*
     89         * Do not process content inside protected tags.
     90         *
     91         * Note: SCRIPT, STYLE, and TEXTAREA are "atomic" elements in
     92         * WP_HTML_Tag_Processor, meaning their content is bundled with the tag
     93         * token and won't appear as separate #text nodes. Because of this they
     94         * do not need to be listed in $protected_tags: their inner text is
     95         * never surfaced as #text tokens for us to process.
     96         * See https://github.com/WordPress/wordpress-develop/blob/0fb3bb29596918864d808d156268a2df63c83620/src/wp-includes/html-api/class-wp-html-tag-processor.php#L276
     97         */
     98        $protected_tags   = array( 'PRE', 'CODE', 'A' );
     99        $tag_stack        = array();
     100        $filtered_content = '';
     101
     102        while ( $processor->next_token() ) {
     103            $token_type = $processor->get_token_type();
     104
     105            if ( '#tag' === $token_type ) {
     106                $tag_name = $processor->get_tag();
     107
     108                if ( $processor->is_tag_closer() ) {
     109                    // Closing tag: remove from stack.
     110                    $i = \array_search( $tag_name, $tag_stack, true );
     111                    if ( false !== $i ) {
     112                        $tag_stack = \array_slice( $tag_stack, 0, $i );
     113                    }
     114                } elseif ( \in_array( $tag_name, $protected_tags, true ) ) {
     115                    // Opening tag: add to stack.
     116                    $tag_stack[] = $tag_name;
     117                }
     118            } elseif ( '#text' === $token_type && empty( $tag_stack ) ) {
     119                // Only include text chunks that are outside protected tags.
     120                $filtered_content .= $processor->get_modifiable_text();
     121            }
     122        }
     123
     124        return $filtered_content;
    74125    }
    75126
  • activitypub/trunk/includes/class-query.php

    r3422091 r3438374  
    339339        }
    340340
     341        if ( \is_author() && \get_user_option( 'activitypub_use_permalink_as_id', \get_queried_object_id() ) ) {
     342            $return = true;
     343        }
     344
    341345        /**
    342346         * Filters whether content negotiation should be forced.
  • activitypub/trunk/includes/class-router.php

    r3422091 r3438374  
    274274            }
    275275
     276            /**
     277             * Filters the taxonomies supported for term redirects.
     278             *
     279             * @since 7.8.3
     280             *
     281             * @param array $supported_taxonomies Array of taxonomy names. Default array( 'category', 'post_tag' ).
     282             */
     283            $supported_taxonomies = \apply_filters( 'activitypub_supported_taxonomies', array( 'category', 'post_tag' ) );
     284
     285            if ( ! in_array( $term->taxonomy, $supported_taxonomies, true ) ) {
     286                return;
     287            }
     288
    276289            // Don't redirect for ActivityPub requests.
    277290            if ( is_activitypub_request() ) {
  • activitypub/trunk/includes/collection/class-remote-actors.php

    r3424590 r3438374  
    6969     */
    7070    public static function get( $id ) {
    71         return \get_post( $id );
     71        $post = \get_post( $id );
     72
     73        if ( $post && self::POST_TYPE === $post->post_type ) {
     74            return $post;
     75        }
     76
     77        return null;
    7278    }
    7379
     
    221227        }
    222228
    223         return \get_post( $post_id );
     229        $post = \get_post( $post_id );
     230        if ( ! $post instanceof \WP_Post ) {
     231            return new \WP_Error(
     232                'activitypub_actor_not_found',
     233                \__( 'Actor not found', 'activitypub' ),
     234                array( 'status' => 404 )
     235            );
     236        }
     237
     238        return $post;
    224239    }
    225240
     
    281296        }
    282297
    283         return \get_post( $post_id );
     298        $post = \get_post( $post_id );
     299        if ( ! $post instanceof \WP_Post ) {
     300            return new \WP_Error(
     301                'activitypub_actor_not_found',
     302                \__( 'Actor not found', 'activitypub' ),
     303                array( 'status' => 404 )
     304            );
     305        }
     306
     307        return $post;
    284308    }
    285309
     
    305329
    306330        if ( $post_id ) {
    307             return \get_post( $post_id );
     331            $post = \get_post( $post_id );
     332            if ( ! $post instanceof \WP_Post ) {
     333                return new \WP_Error(
     334                    'activitypub_actor_not_found',
     335                    \__( 'Actor not found', 'activitypub' ),
     336                    array( 'status' => 404 )
     337                );
     338            }
     339
     340            return $post;
    308341        }
    309342
  • activitypub/trunk/includes/wp-admin/class-settings-fields.php

    r3422091 r3438374  
    357357     */
    358358    public static function render_use_hashtags_field() {
    359         $value = get_option( 'activitypub_use_hashtags', '1' );
     359        $value = get_option( 'activitypub_use_hashtags', '0' );
    360360        ?>
    361361        <p>
  • activitypub/trunk/includes/wp-admin/import/class-starter-kit.php

    r3422091 r3438374  
    198198
    199199        // Fetch the URL content.
    200         $response = \wp_remote_get(
     200        $response = \wp_safe_remote_get(
    201201            $url,
    202202            array(
  • activitypub/trunk/integration/class-classic-editor.php

    r3422091 r3438374  
    2121        \add_filter( 'activitypub_attachments_media_markup', array( self::class, 'filter_attachments_media_markup' ), 10, 2 );
    2222        \add_filter( 'activitypub_attachment_ids', array( self::class, 'filter_attached_media_ids' ), 10, 2 );
     23        \add_filter( 'activitypub_site_supports_blocks', '__return_false' );
    2324        \add_action( 'add_meta_boxes', array( self::class, 'add_meta_box' ) );
    2425        \add_action( 'save_post', array( self::class, 'save_meta_data' ) );
     
    154155            <strong><?php \esc_html_e( 'Visibility', 'activitypub' ); ?></strong><br />
    155156            <label>
    156                 <input type="radio" name="activitypub_content_visibility" value="public" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); ?> />
     157                <input type="radio" name="activitypub_content_visibility" value="<?php echo \esc_attr( ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); ?>" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); ?> />
    157158                <?php \esc_html_e( 'Public', 'activitypub' ); ?>
    158159            </label><br />
    159160            <label>
    160                 <input type="radio" name="activitypub_content_visibility" value="quiet_public" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC ); ?> />
     161                <input type="radio" name="activitypub_content_visibility" value="<?php echo \esc_attr( ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC ); ?>" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_QUIET_PUBLIC ); ?> />
    161162                <?php \esc_html_e( 'Quiet public', 'activitypub' ); ?>
    162163            </label><br />
    163164            <label>
    164                 <input type="radio" name="activitypub_content_visibility" value="local" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ); ?> />
     165                <input type="radio" name="activitypub_content_visibility" value="<?php echo \esc_attr( ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ); ?>" <?php \checked( $content_visibility, ACTIVITYPUB_CONTENT_VISIBILITY_LOCAL ); ?> />
    165166                <?php \esc_html_e( 'Do not federate', 'activitypub' ); ?>
    166167            </label><br />
  • activitypub/trunk/integration/load.php

    r3422091 r3438374  
    3535     * @see https://wordpress.org/plugins/classic-editor/
    3636     */
    37     if ( class_exists( '\Classic_Editor' ) || ! site_supports_blocks() ) {
     37    if ( \class_exists( '\Classic_Editor' ) || \function_exists( 'classicpress_version' ) || ! site_supports_blocks() ) {
    3838        Classic_Editor::init();
    3939    }
  • activitypub/trunk/readme.txt

    r3424590 r3438374  
    44Requires at least: 6.5
    55Tested up to: 6.9
    6 Stable tag: 7.8.2
     6Stable tag: 7.8.3
    77Requires PHP: 7.2
    88License: MIT
     
    110110
    111111== Changelog ==
     112
     113### 7.8.3 - 2026-01-12
     114#### Security
     115- Improved security of the Starter Kit URL import by using wp_safe_remote_get.
     116
     117#### Added
     118- Force content negotiation on author pages when using permalink as Actor ID.
     119
     120#### Fixed
     121- Actors: avoid PHP warnings when trying to fetch invalid actor.
     122- Add ClassicPress compatibility by detecting it and disabling block support.
     123- Check if WP_Filesystem initialized successfully before using it to prevent fatal errors on hosts using FTP-based filesystem.
     124- Fixed ActivityPub comments being marked as spam by Akismet.
     125- Fixed an issue where embedding remote posts could fail when the author's profile was temporarily unavailable.
     126- Fixed flaky test for purge_ap_posts due to date boundary condition with -1 month
     127- Fixed inconsistent default value for the hashtag setting on new installations.
     128- Fixed reactions popover styles affecting other WordPress popovers.
     129- Fixed unwanted 301 redirects on search and posts pages when using Polylang or similar plugins.
     130- Fixed unwanted tags being created from hashtags inside links and other protected HTML elements.
     131- Fixed visibility setting not being saved correctly in block editor and classic editor.
    112132
    113133### 7.8.2 - 2025-12-21
Note: See TracChangeset for help on using the changeset viewer.