??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/turanoil.kz/wp-includes/js/wp-custom-header.js
⬅ Kembali
/**
* @output wp-includes/js/wp-custom-header.js
*/
/* global YT */
(function( window, settings ) {
var NativeHandler, YouTubeHandler;
/** @namespace wp */
window.wp = window.wp || {};
// Fail gracefully in unsupported browsers.
if ( ! ( 'addEventListener' in window ) ) {
return;
}
/**
* Trigger an event.
*
* @param {Element} target HTML element to dispatch the event on.
* @param {string} name Event name.
*/
function trigger( target, name ) {
var evt;
if ( 'function' === typeof window.Event ) {
evt = new Event( name );
} else {
evt = document.createEvent( 'Event' );
evt.initEvent( name, true, true );
}
target.dispatchEvent( evt );
}
/**
* Create a custom header instance.
*
* @memberOf wp
*
* @class
*/
function CustomHeader() {
this.handlers = {
nativeVideo: new NativeHandler(),
youtube: new YouTubeHandler()
};
}
CustomHeader.prototype = {
/**
* Initialize the custom header.
*
* If the environment supports video, loops through registered handlers
* until one is found that can handle the video.
*/
initialize: function() {
if ( this.supportsVideo() ) {
for ( var id in this.handlers ) {
var handler = this.handlers[ id ];
if ( 'test' in handler && handler.test( settings ) ) {
this.activeHandler = handler.initialize.call( handler, settings );
// Dispatch custom event when the video is loaded.
trigger( document, 'wp-custom-header-video-loaded' );
break;
}
}
}
},
/**
* Determines if the current environment supports video.
*
* Themes and plugins can override this method to change the criteria.
*
* @return {boolean}
*/
supportsVideo: function() {
// Don't load video on small screens. @todo Consider bandwidth and other factors.
if ( window.innerWidth < settings.minWidth || window.innerHeight < settings.minHeight ) {
return false;
}
return true;
},
/**
* Base handler for custom handlers to extend.
*
* @type {BaseHandler}
*/
BaseVideoHandler: BaseHandler
};
/**
* Create a video handler instance.
*
* @memberOf wp
*
* @class
*/
function BaseHandler() {}
BaseHandler.prototype = {
/**
* Initialize the video handler.
*
* @param {Object} settings Video settings.
*/
initialize: function( settings ) {
var handler = this,
button = document.createElement( 'button' );
this.settings = settings;
this.container = document.getElementById( 'wp-custom-header' );
this.button = button;
button.setAttribute( 'type', 'button' );
button.setAttribute( 'id', 'wp-custom-header-video-button' );
button.setAttribute( 'class', 'wp-custom-header-video-button wp-custom-header-video-play' );
button.innerHTML = settings.l10n.play;
// Toggle video playback when the button is clicked.
button.addEventListener( 'click', function() {
if ( handler.isPaused() ) {
handler.play();
} else {
handler.pause();
}
});
// Update the button class and text when the video state changes.
this.container.addEventListener( 'play', function() {
button.className = 'wp-custom-header-video-button wp-custom-header-video-play';
button.innerHTML = settings.l10n.pause;
if ( 'a11y' in window.wp ) {
window.wp.a11y.speak( settings.l10n.playSpeak);
}
});
this.container.addEventListener( 'pause', function() {
button.className = 'wp-custom-header-video-button wp-custom-header-video-pause';
button.innerHTML = settings.l10n.play;
if ( 'a11y' in window.wp ) {
window.wp.a11y.speak( settings.l10n.pauseSpeak);
}
});
this.ready();
},
/**
* Ready method called after a handler is initialized.
*
* @abstract
*/
ready: function() {},
/**
* Whether the video is paused.
*
* @abstract
* @return {boolean}
*/
isPaused: function() {},
/**
* Pause the video.
*
* @abstract
*/
pause: function() {},
/**
* Play the video.
*
* @abstract
*/
play: function() {},
/**
* Append a video node to the header container.
*
* @param {Element} node HTML element.
*/
setVideo: function( node ) {
var editShortcutNode,
editShortcut = this.container.getElementsByClassName( 'customize-partial-edit-shortcut' );
if ( editShortcut.length ) {
editShortcutNode = this.container.removeChild( editShortcut[0] );
}
this.container.innerHTML = '';
this.container.appendChild( node );
if ( editShortcutNode ) {
this.container.appendChild( editShortcutNode );
}
},
/**
* Show the video controls.
*
* Appends a play/pause button to header container.
*/
showControls: function() {
if ( ! this.container.contains( this.button ) ) {
this.container.appendChild( this.button );
}
},
/**
* Whether the handler can process a video.
*
* @abstract
* @param {Object} settings Video settings.
* @return {boolean}
*/
test: function() {
return false;
},
/**
* Trigger an event on the header container.
*
* @param {string} name Event name.
*/
trigger: function( name ) {
trigger( this.container, name );
}
};
/**
* Create a custom handler.
*
* @memberOf wp
*
* @param {Object} protoProps Properties to apply to the prototype.
* @return CustomHandler The subclass.
*/
BaseHandler.extend = function( protoProps ) {
var prop;
function CustomHandler() {
var result = BaseHandler.apply( this, arguments );
return result;
}
CustomHandler.prototype = Object.create( BaseHandler.prototype );
CustomHandler.prototype.constructor = CustomHandler;
for ( prop in protoProps ) {
CustomHandler.prototype[ prop ] = protoProps[ prop ];
}
return CustomHandler;
};
/**
* Native video handler.
*
* @memberOf wp
*
* @class
*/
NativeHandler = BaseHandler.extend(/** @lends wp.NativeHandler.prototype */{
/**
* Whether the native handler supports a video.
*
* @param {Object} settings Video settings.
* @return {boolean}
*/
test: function( settings ) {
var video = document.createElement( 'video' );
return video.canPlayType( settings.mimeType );
},
/**
* Set up a native video element.
*/
ready: function() {
var handler = this,
video = document.createElement( 'video' );
video.id = 'wp-custom-header-video';
video.autoplay = true;
video.loop = true;
video.muted = true;
video.playsInline = true;
video.width = this.settings.width;
video.height = this.settings.height;
video.addEventListener( 'play', function() {
handler.trigger( 'play' );
});
video.addEventListener( 'pause', function() {
handler.trigger( 'pause' );
});
video.addEventListener( 'canplay', function() {
handler.showControls();
});
this.video = video;
handler.setVideo( video );
video.src = this.settings.videoUrl;
},
/**
* Whether the video is paused.
*
* @return {boolean}
*/
isPaused: function() {
return this.video.paused;
},
/**
* Pause the video.
*/
pause: function() {
this.video.pause();
},
/**
* Play the video.
*/
play: function() {
this.video.play();
}
});
/**
* YouTube video handler.
*
* @memberOf wp
*
* @class wp.YouTubeHandler
*/
YouTubeHandler = BaseHandler.extend(/** @lends wp.YouTubeHandler.prototype */{
/**
* Whether the handler supports a video.
*
* @param {Object} settings Video settings.
* @return {boolean}
*/
test: function( settings ) {
return 'video/x-youtube' === settings.mimeType;
},
/**
* Set up a YouTube iframe.
*
* Loads the YouTube IFrame API if the 'YT' global doesn't exist.
*/
ready: function() {
var handler = this;
if ( 'YT' in window ) {
YT.ready( handler.loadVideo.bind( handler ) );
} else {
var tag = document.createElement( 'script' );
tag.src = 'https://www.youtube.com/iframe_api';
tag.onload = function () {
YT.ready( handler.loadVideo.bind( handler ) );
};
document.getElementsByTagName( 'head' )[0].appendChild( tag );
}
},
/**
* Load a YouTube video.
*/
loadVideo: function() {
var handler = this,
video = document.createElement( 'div' ),
// @link http://stackoverflow.com/a/27728417
VIDEO_ID_REGEX = /^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/;
video.id = 'wp-custom-header-video';
handler.setVideo( video );
handler.player = new YT.Player( video, {
height: this.settings.height,
width: this.settings.width,
videoId: this.settings.videoUrl.match( VIDEO_ID_REGEX )[1],
events: {
onReady: function( e ) {
e.target.mute();
handler.showControls();
},
onStateChange: function( e ) {
if ( YT.PlayerState.PLAYING === e.data ) {
handler.trigger( 'play' );
} else if ( YT.PlayerState.PAUSED === e.data ) {
handler.trigger( 'pause' );
} else if ( YT.PlayerState.ENDED === e.data ) {
e.target.playVideo();
}
}
},
playerVars: {
autoplay: 1,
controls: 0,
disablekb: 1,
fs: 0,
iv_load_policy: 3,
loop: 1,
modestbranding: 1,
playsinline: 1,
rel: 0,
showinfo: 0
}
});
},
/**
* Whether the video is paused.
*
* @return {boolean}
*/
isPaused: function() {
return YT.PlayerState.PAUSED === this.player.getPlayerState();
},
/**
* Pause the video.
*/
pause: function() {
this.player.pauseVideo();
},
/**
* Play the video.
*/
play: function() {
this.player.playVideo();
}
});
// Initialize the custom header when the DOM is ready.
window.wp.customHeader = new CustomHeader();
document.addEventListener( 'DOMContentLoaded', window.wp.customHeader.initialize.bind( window.wp.customHeader ), false );
// Selective refresh support in the Customizer.
if ( 'customize' in window.wp ) {
window.wp.customize.selectiveRefresh.bind( 'render-partials-response', function( response ) {
if ( 'custom_header_settings' in response ) {
settings = response.custom_header_settings;
}
});
window.wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
if ( 'custom_header' === placement.partial.id ) {
window.wp.customHeader.initialize();
}
});
}
})( window, window._wpCustomHeaderSettings || {} );
Nama
Tipe
Ukuran
Diubah
Aksi
📁 codemirror
dir
—
2026-05-21 04:46
📁 crop
dir
—
2025-03-17 15:33
📁 dist
dir
—
2026-05-21 04:46
📁 imgareaselect
dir
—
2025-03-17 15:33
📁 jcrop
dir
—
2025-03-17 15:33
📁 jquery
dir
—
2025-03-17 15:33
📁 mediaelement
dir
—
2025-03-17 15:33
📁 plupload
dir
—
2025-03-17 15:33
📁 swfupload
dir
—
2025-03-17 15:33
📁 thickbox
dir
—
2025-03-17 15:33
📁 tinymce
dir
—
2025-03-17 15:33
📜 admin-bar.js
js
10.3 KB
2024-05-11 22:28
📜 admin-bar.min.js
js
3.4 KB
2024-05-11 22:28
📜 api-request.js
js
3.2 KB
2020-12-01 08:44
📜 api-request.min.js
js
1023 B
2022-04-09 00:07
📜 autosave.js
js
21.9 KB
2025-04-16 03:36
📜 autosave.min.js
js
5.7 KB
2023-02-02 21:36
📜 backbone.js
js
78.6 KB
2026-05-21 04:46
📜 backbone.min.js
js
23.7 KB
2026-05-21 04:46
📜 clipboard.js
js
26.2 KB
2022-10-04 19:55
📜 clipboard.min.js
js
8.8 KB
2024-06-27 16:55
📜 colorpicker.js
js
28.4 KB
2012-11-17 20:11
📜 colorpicker.min.js
js
16.1 KB
2025-04-16 03:36
📜 comment-reply.js
js
12.2 KB
2024-09-04 00:36
📜 comment-reply.min.js
js
3 KB
2024-09-04 00:36
📜 customize-base.js
js
25.2 KB
2023-05-20 14:19
📜 customize-base.min.js
js
7.7 KB
2023-02-02 21:36
📜 customize-loader.js
js
7.7 KB
2024-04-12 21:47
📜 customize-loader.min.js
js
3.5 KB
2023-02-02 21:36
📜 customize-models.js
js
6.7 KB
2020-06-25 16:43
📜 customize-models.min.js
js
3.6 KB
2023-02-02 21:36
📜 customize-preview-nav-menus.js
js
14.7 KB
2020-07-28 03:35
📜 customize-preview-nav-menus.min.js
js
4.9 KB
2025-04-16 03:36
📜 customize-preview-widgets.js
js
22.7 KB
2020-06-20 16:58
📜 customize-preview-widgets.min.js
js
7.6 KB
2025-04-16 03:36
📜 customize-preview.js
js
27.9 KB
2025-12-03 04:15
📜 customize-preview.min.js
js
10.8 KB
2025-12-03 04:15
📜 customize-selective-refresh.js
js
32.6 KB
2024-04-12 21:47
📜 customize-selective-refresh.min.js
js
10.4 KB
2025-04-16 03:36
📜 customize-views.js
js
5.1 KB
2025-12-03 04:15
📜 customize-views.min.js
js
2.5 KB
2025-12-03 04:15
📜 heartbeat.js
js
23.5 KB
2024-09-12 03:09
📜 heartbeat.min.js
js
5.8 KB
2024-09-12 03:09
📜 hoverIntent.js
js
7.1 KB
2022-01-03 20:03
📜 hoverIntent.min.js
js
1.5 KB
2024-06-27 16:55
📜 hoverintent-js.min.js
js
1.7 KB
2019-12-10 06:03
📜 imagesloaded.min.js
js
5.4 KB
2023-08-11 22:18
📜 json2.js
js
31 B
2025-12-03 04:15
📜 json2.min.js
js
35 B
2025-12-03 04:15
📜 masonry.min.js
js
23.6 KB
2020-06-13 22:53
📜 mce-view.js
js
25.2 KB
2023-10-10 01:31
📜 mce-view.min.js
js
9.5 KB
2024-06-27 16:55
📜 media-audiovideo.js
js
24.1 KB
2026-05-21 04:46
📜 media-audiovideo.min.js
js
11.8 KB
2026-05-21 04:46
📜 media-editor.js
js
28.8 KB
2026-05-21 04:46
📜 media-editor.min.js
js
10.8 KB
2026-05-21 04:46
📜 media-grid.js
js
26 KB
2026-05-21 04:46
📜 media-grid.min.js
js
13 KB
2026-05-21 04:46
📜 media-models.js
js
42.5 KB
2026-05-21 04:46
📜 media-models.min.js
js
13 KB
2026-05-21 04:46
📜 media-views.js
js
266.5 KB
2026-05-21 04:46
📜 media-views.min.js
js
108.1 KB
2026-05-21 04:46
📜 quicktags.js
js
22.1 KB
2021-09-09 03:29
📜 quicktags.min.js
js
10.9 KB
2023-02-02 21:36
📜 shortcode.js
js
10.5 KB
2020-01-29 05:45
📜 shortcode.min.js
js
2.6 KB
2022-09-23 23:55
📜 swfobject.js
js
0 B
2025-12-03 04:15
📜 swfobject.min.js
js
35 B
2025-12-03 04:15
📜 tw-sack.js
js
4.9 KB
2025-12-03 04:15
📜 tw-sack.min.js
js
3.2 KB
2022-04-09 00:07
📜 twemoji.js
js
36.3 KB
2025-12-03 04:15
📜 twemoji.min.js
js
19.4 KB
2025-12-03 04:15
📜 underscore.js
js
67.3 KB
2026-05-21 04:46
📜 underscore.min.js
js
18.6 KB
2026-05-21 04:46
📜 utils.js
js
4.6 KB
2020-01-29 05:45
📜 utils.min.js
js
1.8 KB
2022-09-23 23:55
📜 wp-ajax-response.js
js
3.8 KB
2025-04-16 03:36
📜 wp-ajax-response.min.js
js
2.5 KB
2025-04-16 03:36
📜 wp-api.js
js
45.9 KB
2023-01-10 14:30
📜 wp-api.min.js
js
14.3 KB
2024-06-27 16:55
📜 wp-auth-check.js
js
4.3 KB
2026-05-21 04:46
📜 wp-auth-check.min.js
js
1.6 KB
2026-05-21 04:46
📜 wp-backbone.js
js
14.9 KB
2024-04-12 21:47
📜 wp-backbone.min.js
js
3 KB
2022-04-09 00:07
📜 wp-custom-header.js
js
10.2 KB
2021-04-10 16:40
📜 wp-custom-header.min.js
js
4.3 KB
2023-02-02 21:36
📜 wp-embed-template.js
js
6.6 KB
2021-11-11 07:49
📜 wp-embed-template.min.js
js
3.1 KB
2024-06-27 16:55
📜 wp-embed.js
js
3.1 KB
2023-08-10 23:49
📜 wp-embed.min.js
js
1.2 KB
2024-06-27 16:55
📜 wp-emoji-loader.js
js
12.9 KB
2025-12-03 04:15
📜 wp-emoji-loader.min.js
js
2.8 KB
2025-12-03 04:15
📜 wp-emoji-release.min.js
js
22.2 KB
2025-12-03 04:15
📜 wp-emoji.js
js
8.6 KB
2025-12-03 04:15
📜 wp-emoji.min.js
js
2.8 KB
2025-12-03 04:15
📜 wp-list-revisions.js
js
970 B
2018-06-28 06:30
📜 wp-list-revisions.min.js
js
597 B
2021-01-06 20:29
📜 wp-lists.js
js
24.7 KB
2023-06-24 18:32
📜 wp-lists.min.js
js
7.3 KB
2023-06-24 18:32
📜 wp-pointer.js
js
10 KB
2021-02-17 01:25
📜 wp-pointer.min.js
js
3.5 KB
2022-04-09 00:07
📜 wp-sanitize.js
js
1.6 KB
2026-05-21 04:46
📜 wp-sanitize.min.js
js
402 B
2026-05-21 04:46
📜 wp-util.js
js
4.6 KB
2026-03-11 03:41
📜 wp-util.min.js
js
1.4 KB
2026-03-11 03:41
📜 wpdialog.js
js
569 B
2023-01-25 02:13
📜 wpdialog.min.js
js
281 B
2023-01-25 02:13
📜 wplink.js
js
20.7 KB
2025-04-16 03:36
📜 wplink.min.js
js
11.1 KB
2024-09-30 09:19
📜 zxcvbn-async.js
js
821 B
2018-06-28 06:30
📜 zxcvbn-async.min.js
js
351 B
2021-02-23 21:45
📜 zxcvbn.min.js
js
803 KB
2019-10-26 04:17