# jetpack/16.3-a.7/modules/related-posts/related-posts-customizer.js

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3-a.7. 29 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3-a.7/code/modules/related-posts/related-posts-customizer.js
- Raw: https://pluginprobe.com/plugins/jetpack/16.3-a.7/raw/modules/related-posts/related-posts-customizer.js
- Modified: 2020-07-28T17:06:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/16.3-a.7/code/modules/related-posts/related-posts-customizer.js#L10-L20`.

```javascript
/**
 * 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 );

```
