Commit Graph

10 Commits

Author SHA1 Message Date
desrosj
ae378d5095 Build/Test Tools: Update npm dependencies.
This updates the following npm dependencies to their latest versions:

- `chalk` from `5.1.0` to `5.2.0`.
- `dotenv-expand` from `9.0.0` to `10.0.0`.
- `grunt-contrib-qunit` from `6.2.0` to `6.2.1`.
- `prettier` from `2.0.5` to `2.6.2`.
- `qunit` from `2.19.1` to `2.19.4`.
- `sass` from `1.55.0` to `1.58.0`.
- `sinon` from `14.0.1` to `15.0.1`.
- `sinon-test` from `3.1.4` to `3.1.5`.
- `source-map-loader` from `4.0.0` to `4.0.1`.
- `uglify-js` from `3.17.3` to `3.17.4`.
- `wait-on` from `6.0.1` to `7.0.1`.
- `webpack` from `5.74.0` to `5.75.0`.

Additionally, `npm audit fix` has been run to further update packages that may contain vulnerabilities.

Props naeemhaque, mukesh27, desrosj.
See #57535.
Built from https://develop.svn.wordpress.org/trunk@55191


git-svn-id: http://core.svn.wordpress.org/trunk@54724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 16:36:32 +00:00
Dominik Schilling
f3034f1b1c Customize: Set playsinline attribute for custom header videos.
With the `playsinline` attribute the video can also autoplay on mobile browsers without asking the user to open it up fullscreen.
Also, change all video element properties to use boolean values.

Props klevyke, ocean90.
Fixes #50111.
Built from https://develop.svn.wordpress.org/trunk@50698


git-svn-id: http://core.svn.wordpress.org/trunk@50307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-10 12:40:05 +00:00
desrosj
8fc757b1f0 Build/Test Tools: Update NPM dependencies.
This updates two `devDependencies`:

- `uglify-js` from `3.12.7` to `3.12.8`.
- `sassn` from `1.32.6` to `1.32.8`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@50416


git-svn-id: http://core.svn.wordpress.org/trunk@50027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-23 16:45:19 +00:00
desrosj
05f174acf6 Build/Test Tools: Update UglifyJS to the latest version.
This updates the `uglify-js` package from version `3.6.0` to `3.12.4`.

See #51801.
Built from https://develop.svn.wordpress.org/trunk@49940


git-svn-id: http://core.svn.wordpress.org/trunk@49639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-06 15:29:24 +00:00
Sergey Biryukov
49007e52bc Build/Test Tools: Add banner to RTL CSS and minified JS files.
Patches occasionally come in on generated files. We should be kind to new contributors and give them a hint that these files are auto-generated.

This is a follow-up to [41271], which added the banner to minified CSS files.

Fixes #48424. See #30666.
Built from https://develop.svn.wordpress.org/trunk@46589


git-svn-id: http://core.svn.wordpress.org/trunk@46386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-26 00:17:07 +00:00
Aaron Jorbin
0e21d32900 Build/Test: Bump devDependencies for WordPress 5.3
This upgrades a number of devDependencies.  Some of these include changes to how the tasks are configured.

Uglify: There are deprecated options from 2.x to 4.x, see: https://github.com/gruntjs/grunt-contrib-uglify#options

Autoprefixer: Browserslist now warns when passing in the browser list, so that is put into package.json

As with most changes to uglify, this changes every minified JS file.

Fixes #48203.



Built from https://develop.svn.wordpress.org/trunk@46408


git-svn-id: http://core.svn.wordpress.org/trunk@46206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-05 19:49:10 +00:00
Joe McGill
5ef714db18 Themes: Improve a11y and extendability of custom video headers.
This adds play/pause controls to video headers, along with voice
assistance, using `wp.a11y.speak`, to make custom video headers more
accessible. To make styling the play/pause button easier for themes,
CSS has been omitted from the default implementation.

This also includes a refactor of the `wp.customHeader` code to introduce
a `BaseHandler` class, which can be extended by plugins and themes to modify
or enhance the default video handlers.

Props davidakennedy, afercia, bradyvercher, joemcgill, adamsilverstein, rianrietveld.
Fixes #38678.
Built from https://develop.svn.wordpress.org/trunk@39272


git-svn-id: http://core.svn.wordpress.org/trunk@39212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 23:26:31 +00:00
Joe McGill
89a70eb859 Themes: Remove jQuery dependency from wp-custom-header.js.
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.

This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.

Props adamsilverstein, joemcgill.
Fixes #38550.
Built from https://develop.svn.wordpress.org/trunk@39102


git-svn-id: http://core.svn.wordpress.org/trunk@39044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:21:28 +00:00
Peter Wilson
c7691ceb36 Themes: Exit wp-custom-header.js early in browsers wihout modern events.
Adds a check for `window.addEventListener` support before attempting to use it. In browsers without support, the file is exited early to avoid throwing a JavaScript error.

Fixes #38585.

Built from https://develop.svn.wordpress.org/trunk@39050


git-svn-id: http://core.svn.wordpress.org/trunk@38992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-31 06:17:29 +00:00
Joe McGill
030bc377dd Themes: Enable video in custom headers.
This adds the ability for themes to add support for videos in custom headers
by passing `'video' => true` as an argument when adding theme support for
custom headers.

Custom video headers are managed through the “Header Visuals” (i.e. “Header Image”)
panel in the Customizer where you can select a video from the media library or set a
URL to an external video (YouTube for now) for use in custom headers.

This introduces several new functions:

`has_header_video()` – Check whether a header video is set or not.
`get_header_video_url()` – Retrieve header video URL for custom header.
`the_header_video_url()` – Display header video URL.
`get_header_video_settings()` – Retrieve header video settings.
`has_custom_header()` – Check whether a custom header is set or not.
`get_custom_header_markup()` – Retrieve the markup for a custom header.
`the_custom_header_markup()` – Print the markup for a custom header.

And a new file, `wp-includes/js/wp-custom-header.js` that handles loading videos
in custom headers.

This also enables video headers in the Twenty Seventeen and Twenty Fourteen themes.

Props davidakennedy, celloexpressions, bradyvercher, laurelfulford, joemcgill.
Fixes #38172.
Built from https://develop.svn.wordpress.org/trunk@38985


git-svn-id: http://core.svn.wordpress.org/trunk@38928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 21:51:31 +00:00