Skip to content

Repository files navigation

Disable Embeds

WordPress plugin that disables the feature to embed WordPress posts from your site and others.

If you don't like the enhanced embeds that were introduced in WordPress 4.4 you can disable the feature using this plugin.

What this plugin does:

  • Prevents others from embedding your site.
  • Prevents you from embedding other non-whitelisted sites.
  • Disables all JavaScript related to the feature.

Just activate the plugin and you’re good to go.

Want embeds back again? Simply deactivate the plugin.

Development

Requires Node.js (see .nvmrc for the expected version).

npm install
npm run build

Tests

End-to-end tests are written with Playwright and run against a WordPress instance provided by @wordpress/env. They use the experimental WordPress Playground runtime, which runs WordPress in WebAssembly and therefore does not require Docker.

npm run build
npm run test:e2e

The environment is started automatically, but it can also be controlled manually:

npm run wp-env -- start --runtime=playground
npm run wp-env -- stop

To collect JavaScript code coverage while running the tests, build with source maps and set COLLECT_COVERAGE. The report is written to artifacts/e2e-coverage.

WP_DEVTOOL=source-map npm run build
COLLECT_COVERAGE=true npm run test:e2e

About

Don't like the enhanced embeds in WordPress 4.4? Easily disable the feature using this plugin.

Topics

Resources

Stars

28 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages