[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/script-modules/block-library/cover/ -> view.js (source)

   1  // packages/block-library/build-module/cover/view.mjs
   2  import { getContext, store } from "@wordpress/interactivity";
   3  import { prefersReducedMotion } from "@wordpress/a11y";
   4  store(
   5    "core/cover",
   6    {
   7      state: {
   8        get videoSrc() {
   9          const { src, reducedMotionSrc } = getContext();
  10          if (reducedMotionSrc && prefersReducedMotion()) {
  11            return reducedMotionSrc;
  12          }
  13          return src;
  14        }
  15      }
  16    },
  17    { lock: true }
  18  );


Generated : Tue Oct 20 08:20:34 2026 Cross-referenced by PHPXref