{"id":18760448,"url":"https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin","last_synced_at":"2025-06-28T01:36:23.830Z","repository":{"id":176341792,"uuid":"655784910","full_name":"stefanbohacek/fediverse-embeds-wordpress-plugin","owner":"stefanbohacek","description":"Embed fediverse posts on your WordPress site.","archived":false,"fork":false,"pushed_at":"2024-11-16T18:01:20.000Z","size":4508,"stargazers_count":39,"open_issues_count":16,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-13T04:12:19.694Z","etag":null,"topics":["fediverse","mastodon","oembed","wordpress"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/fediverse-embeds/","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanbohacek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-19T15:35:45.000Z","updated_at":"2024-11-16T18:01:23.000Z","dependencies_parsed_at":"2025-04-13T04:12:18.091Z","dependency_job_id":"0c7bf4ba-b5dc-4409-92c5-d9a0ec2dfd7d","html_url":"https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin","commit_stats":null,"previous_names":["stefanbohacek/fediverse-embeds-wordpress-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stefanbohacek/fediverse-embeds-wordpress-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbohacek%2Ffediverse-embeds-wordpress-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbohacek%2Ffediverse-embeds-wordpress-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbohacek%2Ffediverse-embeds-wordpress-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbohacek%2Ffediverse-embeds-wordpress-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanbohacek","download_url":"https://codeload.github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanbohacek%2Ffediverse-embeds-wordpress-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262361661,"owners_count":23299084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fediverse","mastodon","oembed","wordpress"],"created_at":"2024-11-07T18:12:22.616Z","updated_at":"2025-06-28T01:36:23.814Z","avatar_url":"https://github.com/stefanbohacek.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Preview of multiple posts embedded with the Fediverse Embeds plugin.](./images/screenshots/main.png)\r\n\r\n# Fediverse Embeds\r\n\r\nEmbed fediverse posts on your WordPress site. You can [download it from the WordPress plugin directory](https://wordpress.org/plugins/fediverse-embeds/), and read about the motivation behind this project [on my blog](https://stefanbohacek.com/project/wordpress-plugin-for-fediverse-embeds/).\r\n\r\nFeedback and help will be very appreciated!\r\n\r\n- see [open issues](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or [create a new one](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/new)\r\n- [contact](https://stefanbohacek.com/contact/)\r\n\r\nA few examples of the plugin in use:\r\n\r\n- [alttexthalloffame.org](https://alttexthalloffame.org/)\r\n- [stefanbohacek.com](https://stefanbohacek.com/blog/a-netizens-guide-to-mastodon-fediverse/)\r\n- [botwiki.org](https://botwiki.org/blog/what-kind-of-bots-are-posting-in-the-fediverse/)\r\n\r\n## Features\r\n\r\n- **Show or hide post metrics**\r\n\r\n![Two side-by-side screenshots comparing the same post with and without the number of likes/favorites, boosts/re-shares, and replies.](./images/screenshots/post-metrics.png)\r\n\r\n- **Automatic dark and light theme**\r\n\r\n![A diagonally split screenshot of an embedded post, showing a light and dark version.](./images/screenshots/dark-light-theme.png)\r\n\r\n- **Labels for bots 🤖 and server admins 👑 (optional)**\r\n- **Labels for updated 📝 and deleted posts 🗑️** (see notes on [how deleted posts are handled](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/1))\r\n\r\n## How to use\r\n\r\n\u003c!-- 1. [Install the plugin.](https://wordpress.org/plugins/ftf_fediverse_embeds) --\u003e\r\n1. Download and install the plugin.\r\n2. Add the embed code to your post.\r\n\r\n## Supported platforms\r\n\r\nThis plugin only works with fediverse platforms that provide embed code. This way, if you ever decide to stop using the plugin, your embeds will still work.\r\n\r\nAs more platforms add this feature, this plugin will continue to get updated.\r\n\r\n| **Platform**  | **Supported**   |\r\n|---------------|-----------------|\r\n| **Mastodon**  | ✔️ [How to embed](https://fedi.tips/how-to-embed-mastodon-posts-on-a-website/) |\r\n| **Pleroma**   | ❌              |\r\n| **Akkoma**    | ❌              |\r\n| **Friendica** | ❌              |\r\n| **Misskey**   | ❌ [#17](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/17)          |\r\n| **Calckey**   | ❌ [#16](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/16)          |\r\n| **Peertube**  | ❌ [#2](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/2)           |\r\n| **Pixelfed**  | ❌ [#14](https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/issues/14)          |\r\n\r\n## Privacy notice\r\n\r\nWhen embedding a post from a fediverse server, the content of the post needs to be fetched from that server, which is then stored in your site's database. Based on the way you configure the plugin, additional requests will be made periodically to refresh the cached data.\r\n\r\nWhen making requests to a third party server in general, the server will receive and may record the IP address of the server hosting your website.\r\n\r\n## Development\r\n\r\n```sh\r\n# install dependencies\r\nnpm install\r\n# build front-end scripts and styles\r\nnpm run dev\r\n# when adding new PHP classes inside `includes`\r\ncomposer dumpautoload -o \r\n```\r\n\r\n## Attributions\r\n\r\n- \"Broken image\" icon by Hea Poh Lin https://thenounproject.com/icon/broken-image-583402/\r\n\r\n## FAQ\r\n\r\n### Images or posts are not loading\r\n\r\n#### Embed code\r\n\r\nPlease make sure to copy the full embed code from the original URL of the post, including the `iframe` and the `script` tag.\r\n\r\n#### API Endpoints\r\n\r\nPlease make sure that you're not blocking `/wp-json/ftf/*` endpoints, either via a plugin like [Disable WP REST API](I:\\OneDrive\\Projects\\WordPress\\Plugins\\fediverse-embeds\\git\\README.md), or through server configuration or your firewall.\r\n\r\nNote that individual servers have an option to prevent this plugin from loading data, see more details [below](#how-do-i-prevent-this-plugin-from-embedding-my-posts).\r\n\r\n### How can I run my own code after all embeds are processed?\r\n\r\nThe plugin fires a custom `ftf_fediverse_embeds_posts_processed` event that passes the list of processed embeds. Here's an example of how it can be used:\r\n\r\n```js\r\ndocument.addEventListener('ftf_fediverse_embeds_posts_processed', (event) =\u003e {\r\n    // All embeds are ready.\r\n    event.detail.forEach(embed =\u003e {\r\n        // Do something with each embed.\r\n    });\r\n});\r\n```\r\n\r\nOr with jQuery:\r\n\r\n```js\r\n$(document).on('ftf_fediverse_embeds_processed', () =\u003e {\r\n    // All embeds are ready.\r\n    $('.fediverse-post').each(() =\u003e {\r\n        const $post = $(this);\r\n        // Do something with each embed.\r\n    });\r\n});\r\n```\r\n\r\n### How can I ensure that the plugin's JS and CSS files are always loaded?\r\n\r\nThe JS and CSS files are only loaded when needed. If you for some reason need to include them on every page, you can use the `FTF_FE_ALWAYS_ENQUEUE` environmental variable.\r\n\r\n```php\r\ndefine( 'FTF_FE_ALWAYS_ENQUEUE', true );\r\n```\r\n\r\nAn example use case would be if you want to use some of the internal functions, eg:\r\n\r\n```php\r\nif (class_exists('\\FTF_Fediverse_Embeds\\Embed_Posts')){\r\n    $fediverse_embeds = new \\FTF_Fediverse_Embeds\\Embed_Posts();\r\n    $embed = $fediverse_embeds-\u003eprocess_embeds($iframe, array(\r\n        \"blockName\" =\u003e \"core/html\"\r\n    ));\r\n}\r\n```\r\n\r\n### How do I prevent this plugin from embedding my posts?\r\n\r\nThe plugin will use the following user agent when making requests to your fediverse servers:\r\n\r\n```\r\nFTF: Fediverse Embeds; WordPress/VERSION; https://WEBSITE.COM\r\n```\r\n\r\n`VERSION` is the version of the WordPress website making the request, and `WEBSITE.COM` is its URL, this is the default user agent used by WordPress.\r\n\r\nThe admin of your instance can then block any requests where the user agent contains `FTF: Fediverse Embeds`.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbohacek%2Ffediverse-embeds-wordpress-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanbohacek%2Ffediverse-embeds-wordpress-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbohacek%2Ffediverse-embeds-wordpress-plugin/lists"}