Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

View File

@@ -0,0 +1,28 @@
/**
* Adds functionality for Related Posts controls in Customizer.
*/
( function( api ) {
'use strict';
api( 'jetpack_relatedposts[show_headline]', function( showHeadlineSetting ) {
var setupHeadlineControl = function( headlineControl ) {
var setActiveState, isDisplayed;
isDisplayed = function() {
return showHeadlineSetting.findControls()[ 0 ].active.get() && showHeadlineSetting.get();
};
setActiveState = function() {
headlineControl.active.set( isDisplayed() );
};
headlineControl.active.validate = isDisplayed;
setActiveState();
showHeadlineSetting.bind( setActiveState );
};
api.control( 'jetpack_relatedposts[headline]', setupHeadlineControl );
} );
} )( wp.customize );