Commit Graph

51 Commits

Author SHA1 Message Date
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
Weston Ruter
f3f84d2f21 Customize: Require opt-in for selective refresh of widgets.
* Introduces `customize-selective-refresh-widgets` theme support feature and adds to themes.
* Introduces `customize_selective_refresh` arg for `WP_Widget::$widget_options` and adds to all core widgets.
* Remove `selective_refresh` from being a component that can be removed via `customize_loaded_components` filter.
* Add `WP_Customize_Widgets::get_selective_refreshable_widgets()` and `WP_Customize_Widgets::is_widget_selective_refreshable()`.
* Fix default `selector` for `Partial` instances.
* Implement and improve Masronry sidebar refresh logic in Twenty Thirteen and Twenty Fourteen, including preservation of initial widget position after refresh.
* Re-initialize ME.js when refreshing `Twenty_Fourteen_Ephemera_Widget`.

See #27355.
Fixes #35855.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-21 21:59:29 +00:00
Tammie Lister
12c6679165 Twenty Thirteen, Twenty Fourteen and Twenty Fifteen: Fixes insufficient check for existence of DOM elements in jQuery object
Fixes #34033
Props: tywayne 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-15 21:33:28 +00:00
Lance Willett
80faa524fe Bundled themes: add documentation for new onResizeARIA function.
See #31527. Props davidakennedy, lancewillett.
Built from https://develop.svn.wordpress.org/trunk@31814


git-svn-id: http://core.svn.wordpress.org/trunk@31796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 18:31:26 +00:00
Lance Willett
913c4cd69c Twenty Fourteen: add ARIA attributes to search toggle. See #31527.
Built from https://develop.svn.wordpress.org/trunk@31794


git-svn-id: http://core.svn.wordpress.org/trunk@31776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-16 18:51:29 +00:00
Lance Willett
f81f253434 Twenty Fourteen: add ARIA attributes to menu toggle. See #31527.
Built from https://develop.svn.wordpress.org/trunk@31784


git-svn-id: http://core.svn.wordpress.org/trunk@31764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 20:00:27 +00:00
Lance Willett
17f69a89d4 Twenty Fourteen: fix escaping and minor code style issues. See #29127.
Built from https://develop.svn.wordpress.org/trunk@31250


git-svn-id: http://core.svn.wordpress.org/trunk@31231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-20 19:03:23 +00:00
Dominik Schilling
61819a36ea Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific.
Also capitalize "Customizer".
See also https://make.wordpress.org/core/2014/07/08/customizer-improvements-in-4-0/.

props studionashvegas, tareq1988.
fixes #29947.
Built from https://develop.svn.wordpress.org/trunk@29903


git-svn-id: http://core.svn.wordpress.org/trunk@29658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-15 17:21:19 +00:00
Lance Willett
005d30e820 Twenty Fourteen: fix masthead behavior in IE when a custom header image is present. Props Kau-Boy, lancewillett. Fixes #27220.
Built from https://develop.svn.wordpress.org/trunk@28758


git-svn-id: http://core.svn.wordpress.org/trunk@28571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-16 18:22:14 +00:00
Sergey Biryukov
d59d5a9292 Twenty Fourteen: Avoid passing an empty string to document.getElementById().
props nabil_kadimi.
fixes #28340.
Built from https://develop.svn.wordpress.org/trunk@28598


git-svn-id: http://core.svn.wordpress.org/trunk@28423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-28 13:36:16 +00:00
Lance Willett
a40a36e539 Twenty Fourteen: load Masonry after window load event to give more time for widget content to load before drawing the layout. Closes #27051.
Built from https://develop.svn.wordpress.org/trunk@27627


git-svn-id: http://core.svn.wordpress.org/trunk@27470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 23:08:14 +00:00
Andrew Nacin
00bb092d31 Update the HTML5 Shiv across the default themes to 3.7.0.
props rickalee.
fixes #26491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:18:14 +00:00
Lance Willett
adb22a86fd Twenty Fourteen: match screen-reader-text accessibility styles a bit better with core, to avoid a jump when you move through the links, and to avoid a horizontal scroll at certain viewport widths. Also fix JS focus by specifying the first match object. Closes #25592.
Built from https://develop.svn.wordpress.org/trunk@26843


git-svn-id: http://core.svn.wordpress.org/trunk@26730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-09 20:38:12 +00:00
Lance Willett
3dc744d0cb Twenty Fourteen: minor spacing and CSS formatting fixes. See #25946.
Built from https://develop.svn.wordpress.org/trunk@26810


git-svn-id: http://core.svn.wordpress.org/trunk@26697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-08 23:11:10 +00:00
Andrew Nacin
b7c5823bbf Remove redundant closure for such a simple file. see #26445.
Built from https://develop.svn.wordpress.org/trunk@26707


git-svn-id: http://core.svn.wordpress.org/trunk@26596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 23:40:11 +00:00
Andrew Nacin
b1addd78ca Twenty Fourteen: Wait for DOM ready in the customizer, which was breaking IE8.
props ocean90.
fixes #26445.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 23:39:11 +00:00
Lance Willett
017fd0b083 Twenty Fourteen: fix too-wide search "jump to" link and provide focus on the search input when it's used. Closes #25592.
Built from https://develop.svn.wordpress.org/trunk@26691


git-svn-id: http://core.svn.wordpress.org/trunk@26581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 21:28:11 +00:00
Lance Willett
25ee6100bd Twenty Fourteen: better logic for hide/show title and description, and Customizer handling of the same. Add ID attributes to style blocks. Fixes #26338.
Built from https://develop.svn.wordpress.org/trunk@26668


git-svn-id: http://core.svn.wordpress.org/trunk@26558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 17:30:11 +00:00
Lance Willett
5fbeb4fd9c Twenty Fourteen: remove unused variable in slider.js, see #26191.
Built from https://develop.svn.wordpress.org/trunk@26666


git-svn-id: http://core.svn.wordpress.org/trunk@26556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 08:30:11 +00:00
Lance Willett
b15de66997 Twenty Fourteen: fix two usability issues with touch events on mobile devices with the Featured Content slider:
* Try to avoid the slight delay when swiping from one slide to the next.
 * Fix bug where second to last slide was animating like it was the last.

Fixes #26191.
Built from https://develop.svn.wordpress.org/trunk@26665


git-svn-id: http://core.svn.wordpress.org/trunk@26555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 08:21:10 +00:00
Andrew Nacin
89cbb4405d Twenty Fourteen: RTL for the slider.
props yoavf.
see #25801.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 15:09:09 +00:00
Lance Willett
8ca1f4ff01 Twenty Fourteen: fix JS lint errors in customizer.js file, see r26573.
Built from https://develop.svn.wordpress.org/trunk@26591


git-svn-id: http://core.svn.wordpress.org/trunk@26481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 21:13:10 +00:00
Lance Willett
5b54845df7 Twenty Fourteen: reposition the window on jump-to-anchor to account for header height. Props obenland, fixes #26213.
Built from https://develop.svn.wordpress.org/trunk@26574


git-svn-id: http://core.svn.wordpress.org/trunk@26465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 18:35:10 +00:00
Lance Willett
4d6ec7fa96 Twenty Fourteen: re-add the Header Text Customization Option. Props iamtakashi, fixes #26338; see #25540.
Built from https://develop.svn.wordpress.org/trunk@26573


git-svn-id: http://core.svn.wordpress.org/trunk@26464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 18:27:10 +00:00
Lance Willett
c437b2d508 Twenty Fourteen: standardize comment blocks and jQuery function wrapper calls in JavaScript files. Props seanchayes for initial patch, see #25946.
Built from https://develop.svn.wordpress.org/trunk@26332


git-svn-id: http://core.svn.wordpress.org/trunk@26234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-22 22:42:09 +00:00
Andrew Nacin
c43e93d935 Fix spaces/tabs in Twenty Fourteen JS, allowing JSHint to run clean for these files.
props dougwollison.
fixes #26031, #26032.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-19 03:49:09 +00:00
Lance Willett
3c0f497fad Twenty Fourteen: general cleanup for spacing, inline comments. Props obenland, see #25946.
Built from https://develop.svn.wordpress.org/trunk@26227


git-svn-id: http://core.svn.wordpress.org/trunk@26134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 21:20:09 +00:00
Lance Willett
433c648e1d Twenty Fourteen: fix an issue with keyboard navigation where you couldn't navigate to the previous image. Props obenland, see #25946.
Built from https://develop.svn.wordpress.org/trunk@26226


git-svn-id: http://core.svn.wordpress.org/trunk@26133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 21:18:09 +00:00
Lance Willett
a1036ac9f0 Twenty Fourteen: changes to JavaScript files to pass jshint, props jorbin. Fixes #25908 #25909 #25910.
* Add global variable flags to top of JS files.
 * Group variable declarations correctly.
Built from https://develop.svn.wordpress.org/trunk@26084


git-svn-id: http://core.svn.wordpress.org/trunk@26004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 17:27:11 +00:00
Sergey Biryukov
4517d7b729 Remove the code for setting ajaxurl from Twenty Fourteen.
props celloexpressions.
fixes #25866.
Built from https://develop.svn.wordpress.org/trunk@26083


git-svn-id: http://core.svn.wordpress.org/trunk@26003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 15:51:10 +00:00
Lance Willett
8e0733a6c7 Twenty Fourteen: allow slider "Previous" and "Next" labels to be translated, props michahwave. Fixes #25897.
Built from https://develop.svn.wordpress.org/trunk@26071


git-svn-id: http://core.svn.wordpress.org/trunk@25991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-09 23:28:09 +00:00
Lance Willett
dee70a91a6 Twenty Fourteen: when header is more than 48px tall (like two lines of menu items), unfix the header so it doesn't overlap the page content. Props iamtakashi, fixes #25554.
Built from https://develop.svn.wordpress.org/trunk@26059


git-svn-id: http://core.svn.wordpress.org/trunk@25982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-09 15:32:09 +00:00
Lance Willett
5420155231 Twenty Fourteen: move all controls for managing Featured Content to the Customizer. Also implement smart fallbacks to not using a custom tag with the "featured" tag and sticky posts. Props obenland and celloexpressions, see #25549.
Built from https://develop.svn.wordpress.org/trunk@26037


git-svn-id: http://core.svn.wordpress.org/trunk@25966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-07 20:25:09 +00:00
Lance Willett
e0e2ace724 Twenty Fourteen: revamp the RTL stylesheet and related cleanup. Props iamtakashi, see #25801.
Built from https://develop.svn.wordpress.org/trunk@25999


git-svn-id: http://core.svn.wordpress.org/trunk@25932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-02 04:36:12 +00:00
Lance Willett
9d0e238255 Twenty Fourteen: JavaScript fixes after running jshint, see r25960:
* Enforce `===` instead of `==`
 * Fix confusing use of `!`
 * Remove unused variables like `calcNext`, defined but never used
 * Proper use of braces
 * Move functions out of if/else statements
 * Document unknown functions as Microsoft-specific
Built from https://develop.svn.wordpress.org/trunk@25995


git-svn-id: http://core.svn.wordpress.org/trunk@25928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 18:53:10 +00:00
Andrew Nacin
d0cfa40983 Add jshintrc to qunit.
props jorbin.
see #25187.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +00:00
Lance Willett
d8ba6cde31 Twenty Fourteen: further revise primary navigation functionality, simplify mobile navigation, and clean up the main JS file. Props obenland, iamtakashi. See #25554.
Built from https://develop.svn.wordpress.org/trunk@25864


git-svn-id: http://core.svn.wordpress.org/trunk@25864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:58:48 +00:00
Andrew Nacin
8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Lance Willett
a9cab6f3fb Twenty Fourteen: further revise primary navigation functionality, simplify mobile navigation, and clean up the main JS file. Props obenland, iamtakashi. See #25554.
Built from https://develop.svn.wordpress.org/trunk@25864


git-svn-id: http://core.svn.wordpress.org/trunk@25776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 16:37:12 +00:00
Lance Willett
fafbee59f9 Twenty Fourteen: implement tag auto-complete for featured content settings, and uppercase __CLASS__ for consistency. Props kovshenin, see #25549.
Built from https://develop.svn.wordpress.org/trunk@25813


git-svn-id: http://core.svn.wordpress.org/trunk@25725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 18:27:09 +00:00
Lance Willett
7d22195cbb Twenty Fourteen: merge Front Page Sidebar and Content Sidebar. Props iamtakashi, see #25565; closes #25565.
Built from https://develop.svn.wordpress.org/trunk@25762


git-svn-id: http://core.svn.wordpress.org/trunk@25675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-11 03:17:11 +00:00
Lance Willett
578abd0796 Twenty Fourteen: improved JS support for keyboard navigation for main navigation menu. Props obenland, see #25054.
Built from https://develop.svn.wordpress.org/trunk@25757


git-svn-id: http://core.svn.wordpress.org/trunk@25670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-10 15:33:10 +00:00
Lance Willett
c78cbb19ce Twenty Fourteen: allow pages to have featured images, props iamtakashi. Fixes #25325.
Built from https://develop.svn.wordpress.org/trunk@25735


git-svn-id: http://core.svn.wordpress.org/trunk@25648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-08 21:22:10 +00:00
Lance Willett
bb63cf3c40 Twenty Fourteen: provide keyboard support for the primary navigation, props joedolson. See #25054.
Built from https://develop.svn.wordpress.org/trunk@25731


git-svn-id: http://core.svn.wordpress.org/trunk@25644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-08 17:56:09 +00:00
Lance Willett
cb7b1af550 Twenty Fourteen: remove Social Links integration. Props obenland, see #25094.
Built from https://develop.svn.wordpress.org/trunk@25214


git-svn-id: http://core.svn.wordpress.org/trunk@25185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-02 21:25:10 +00:00
Andrew Nacin
d06c049d51 Fix various typos in inline documentation. props nofearinc, fixes #25119.
Built from https://develop.svn.wordpress.org/trunk@25094


git-svn-id: http://core.svn.wordpress.org/trunk@25078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 22:01:08 +00:00
Lance Willett
0a85bdc7a1 Twenty Fourteen: change to just one footer widget area and use Masonry JS to display the widgets in columns. Props Frank Klein, closes #24874.
Built from https://develop.svn.wordpress.org/trunk@25065


git-svn-id: http://core.svn.wordpress.org/trunk@25051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 17:53:09 +00:00
Lance Willett
3054d405e6 Twenty Fourteen: Focus search box on search menu click, props kovshenin for original patch. Fixes #24895.
Built from https://develop.svn.wordpress.org/trunk@25064


git-svn-id: http://core.svn.wordpress.org/trunk@25050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 17:46:08 +00:00
Lance Willett
c0dcebf0a4 Twenty Fourteen: remove masthead-fixed class after window returns to top. Props cainm, fixes #25026.
Built from https://develop.svn.wordpress.org/trunk@25062


git-svn-id: http://core.svn.wordpress.org/trunk@25048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 17:37:10 +00:00
Lance Willett
e0003939a2 Twenty Fourteen: change IDs to classes in markup and CSS selectors. Props obenland, see #24858.
Built from https://develop.svn.wordpress.org/trunk@25060


git-svn-id: http://core.svn.wordpress.org/trunk@25046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 17:31:08 +00:00