%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-admin/js/
Upload File :
Create Path :
Current File : /dom645759/wp-admin/js/custom-background.js

/**
 * @output wp-admin/js/custom-background.js
 */

/* global ajaxurl */

/**
 * Registers all events for customizing the background.
 *
 * @since 3.0.0
 *
 * @requires jQuery
 */
(function($) {
	$( function() {
		var frame,
			bgImage = $( '#custom-background-image' );

		/**
		 * Instantiates the WordPress color picker and binds the change and clear events.
		 *
		 * @since 3.5.0
		 *
		 * @return {void}
		 */
		$('#background-color').wpColorPicker({
			change: function( event, ui ) {
				bgImage.css('background-color', ui.color.toString());
			},
			clear: function() {
				bgImage.css('background-color', '');
			}
		});

		/**
		 * Alters the background size CSS property whenever the background size input has changed.
		 *
		 * @since 4.7.0
		 *
		 * @return {void}
		 */
		$( 'select[name="background-size"]' ).on( 'change', function() {
			bgImage.css( 'background-size', $( this ).val() );
		});

		/**
		 * Alters the background position CSS property whenever the background position input has changed.
		 *
		 * @since 4.7.0
		 *
		 * @return {void}
		 */
		$( 'input[name="background-position"]' ).on( 'change', function() {
			bgImage.css( 'background-position', $( this ).val() );
		});

		/**
		 * Alters the background repeat CSS property whenever the background repeat input has changed.
		 *
		 * @since 3.0.0
		 *
		 * @return {void}
		 */
		$( 'input[name="background-repeat"]' ).on( 'change',  function() {
			bgImage.css( 'background-repeat', $( this ).is( ':checked' ) ? 'repeat' : 'no-repeat' );
		});

		/**
		 * Alters the background attachment CSS property whenever the background attachment input has changed.
		 *
		 * @since 4.7.0
		 *
		 * @return {void}
		 */
		$( 'input[name="background-attachment"]' ).on( 'change', function() {
			bgImage.css( 'background-attachment', $( this ).is( ':checked' ) ? 'scroll' : 'fixed' );
		});

		/**
		 * Binds the event for opening the WP Media dialog.
		 *
		 * @since 3.5.0
		 *
		 * @return {void}
		 */
		$('#choose-from-library-link').on( 'click', function( event ) {
			var $el = $(this);

			event.preventDefault();

			// If the media frame already exists, reopen it.
			if ( frame ) {
				frame.open();
				return;
			}

			// Create the media frame.
			frame = wp.media.frames.customBackground = wp.media({
				// Set the title of the modal.
				title: $el.data('choose'),

				// Tell the modal to show only images.
				library: {
					type: 'image'
				},

				// Customize the submit button.
				button: {
					// Set the text of the button.
					text: $el.data('update'),
					/*
					 * Tell the button not to close the modal, since we're
					 * going to refresh the page when the image is selected.
					 */
					close: false
				}
			});

			/**
			 * When an image is selected, run a callback.
			 *
			 * @since 3.5.0
			 *
			 * @return {void}
 			 */
			frame.on( 'select', function() {
				// Grab the selected attachment.
				var attachment = frame.state().get('selection').first();
				var nonceValue = $( '#_wpnonce' ).val() || '';

				// Run an Ajax request to set the background image.
				$.post( ajaxurl, {
					action: 'set-background-image',
					attachment_id: attachment.id,
					_ajax_nonce: nonceValue,
					size: 'full'
				}).done( function() {
					// When the request completes, reload the window.
					window.location.reload();
				});
			});

			// Finally, open the modal.
			frame.open();
		});
	});
})(jQuery);

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap951.xml 2026-12-01 https://louisvillegop.com/sitemap264.xml 2026-12-01 https://louisvillegop.com/sitemap16.xml 2026-12-01 https://louisvillegop.com/sitemap865.xml 2026-12-01 https://louisvillegop.com/sitemap61.xml 2026-12-01 https://louisvillegop.com/sitemap615.xml 2026-12-01 https://louisvillegop.com/sitemap885.xml 2026-12-01 https://louisvillegop.com/sitemap170.xml 2026-12-01 https://louisvillegop.com/sitemap732.xml 2026-12-01 https://louisvillegop.com/sitemap564.xml 2026-12-01 https://louisvillegop.com/sitemap13.xml 2026-12-01 https://louisvillegop.com/sitemap130.xml 2026-12-01 https://louisvillegop.com/sitemap970.xml 2026-12-01 https://louisvillegop.com/sitemap527.xml 2026-12-01 https://louisvillegop.com/sitemap169.xml 2026-12-01 https://louisvillegop.com/sitemap243.xml 2026-12-01 https://louisvillegop.com/sitemap752.xml 2026-12-01 https://louisvillegop.com/sitemap569.xml 2026-12-01 https://louisvillegop.com/sitemap802.xml 2026-12-01 https://louisvillegop.com/sitemap894.xml 2026-12-01 https://louisvillegop.com/sitemap512.xml 2026-12-01 https://louisvillegop.com/sitemap443.xml 2026-12-01 https://louisvillegop.com/sitemap584.xml 2026-12-01 https://louisvillegop.com/sitemap633.xml 2026-12-01 https://louisvillegop.com/sitemap962.xml 2026-12-01 https://louisvillegop.com/sitemap580.xml 2026-12-01 https://louisvillegop.com/sitemap759.xml 2026-12-01 https://louisvillegop.com/sitemap298.xml 2026-12-01 https://louisvillegop.com/sitemap893.xml 2026-12-01 https://louisvillegop.com/sitemap261.xml 2026-12-01 https://louisvillegop.com/sitemap594.xml 2026-12-01 https://louisvillegop.com/sitemap329.xml 2026-12-01 https://louisvillegop.com/sitemap478.xml 2026-12-01 https://louisvillegop.com/sitemap823.xml 2026-12-01 https://louisvillegop.com/sitemap954.xml 2026-12-01 https://louisvillegop.com/sitemap878.xml 2026-12-01 https://louisvillegop.com/sitemap778.xml 2026-12-01 https://louisvillegop.com/sitemap515.xml 2026-12-01 https://louisvillegop.com/sitemap897.xml 2026-12-01 https://louisvillegop.com/sitemap925.xml 2026-12-01 https://louisvillegop.com/sitemap817.xml 2026-12-01 https://louisvillegop.com/sitemap876.xml 2026-12-01 https://louisvillegop.com/sitemap111.xml 2026-12-01 https://louisvillegop.com/sitemap467.xml 2026-12-01 https://louisvillegop.com/sitemap127.xml 2026-12-01 https://louisvillegop.com/sitemap345.xml 2026-12-01 https://louisvillegop.com/sitemap987.xml 2026-12-01 https://louisvillegop.com/sitemap979.xml 2026-12-01 https://louisvillegop.com/sitemap109.xml 2026-12-01 https://louisvillegop.com/sitemap272.xml 2026-12-01 https://louisvillegop.com/sitemap301.xml 2026-12-01 https://louisvillegop.com/sitemap681.xml 2026-12-01 https://louisvillegop.com/sitemap992.xml 2026-12-01 https://louisvillegop.com/sitemap308.xml 2026-12-01 https://louisvillegop.com/sitemap385.xml 2026-12-01 https://louisvillegop.com/sitemap367.xml 2026-12-01 https://louisvillegop.com/sitemap383.xml 2026-12-01 https://louisvillegop.com/sitemap689.xml 2026-12-01 https://louisvillegop.com/sitemap538.xml 2026-12-01 https://louisvillegop.com/sitemap278.xml 2026-12-01 https://louisvillegop.com/sitemap632.xml 2026-12-01 https://louisvillegop.com/sitemap522.xml 2026-12-01 https://louisvillegop.com/sitemap371.xml 2026-12-01 https://louisvillegop.com/sitemap616.xml 2026-12-01 https://louisvillegop.com/sitemap957.xml 2026-12-01 https://louisvillegop.com/sitemap164.xml 2026-12-01 https://louisvillegop.com/sitemap750.xml 2026-12-01 https://louisvillegop.com/sitemap553.xml 2026-12-01 https://louisvillegop.com/sitemap847.xml 2026-12-01 https://louisvillegop.com/sitemap521.xml 2026-12-01