File manager - Edit - /home/thefreecuj/www/customize.zip
Back
PK �}[=j_=5 5 ( class-wp-customize-site-icon-control.phpnu �[��� <?php /** * Customize API: WP_Customize_Site_Icon_Control class * * @package WordPress * @subpackage Customize * @since 4.4.0 */ /** * Customize Site Icon control class. * * Used only for custom functionality in JavaScript. * * @since 4.3.0 * * @see WP_Customize_Cropped_Image_Control */ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control { /** * Control type. * * @since 4.3.0 * @var string */ public $type = 'site_icon'; /** * Constructor. * * @since 4.3.0 * * @see WP_Customize_Control::__construct() * * @param WP_Customize_Manager $manager Customizer bootstrap instance. * @param string $id Control ID. * @param array $args Optional. Arguments to override class property defaults. * See WP_Customize_Control::__construct() for information * on accepted arguments. Default empty array. */ public function __construct( $manager, $id, $args = array() ) { parent::__construct( $manager, $id, $args ); add_action( 'customize_controls_print_styles', 'wp_site_icon', 99 ); } /** * Renders a JS template for the content of the site icon control. * * @since 4.5.0 */ public function content_template() { ?> <# if ( data.label ) { #> <span class="customize-control-title">{{ data.label }}</span> <# } #> <# if ( data.attachment && data.attachment.id ) { #> <div class="attachment-media-view"> <# if ( data.attachment.sizes ) { #> <style> :root{ --site-icon-url: url( '{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}' ); } </style> <div class="site-icon-preview customizer"> <div class="direction-wrap"> <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" class="app-icon-preview" alt="{{ data.attachment.alt ? wp.i18n.sprintf( <?php /* translators: %s: The selected image alt text. */ echo wp_json_encode( __( 'App icon preview: Current image: %s' ) ) ?> , data.attachment.alt ) : wp.i18n.sprintf( <?php /* translators: %s: The selected image filename. */ echo wp_json_encode( __( 'App icon preview: The current image has no alternative text. The file name is: %s' ) ); ?> , data.attachment.filename ) }}" /> <div class="site-icon-preview-browser"> <svg role="img" aria-hidden="true" fill="none" xmlns="http://www.w3.org/2000/svg" class="browser-buttons"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 20a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm18 0a6 6 0 1 1 12 0 6 6 0 0 1-12 0Zm24-6a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z" /></svg> <div class="site-icon-preview-tab"> <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" class="browser-icon-preview" alt="{{ data.attachment.alt ? wp.i18n.sprintf( <?php /* translators: %s: The selected image alt text. */ echo wp_json_encode( __( 'Browser icon preview: Current image: %s' ) ); ?> , data.attachment.alt ) : wp.i18n.sprintf( <?php /* translators: %s: The selected image filename. */ echo wp_json_encode( __( 'Browser icon preview: The current image has no alternative text. The file name is: %s' ) ); ?> , data.attachment.filename ) }}" /> <div class="site-icon-preview-site-title" aria-hidden="true"><# print( '<?php echo esc_js( get_bloginfo( 'name' ) ); ?>' ) #></div> <svg role="img" aria-hidden="true" fill="none" xmlns="http://www.w3.org/2000/svg" class="close-button"> <path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" /> </svg> </div> </div> </div> </div> </div> <# } #> <div class="actions"> <# if ( data.canUpload ) { #> <button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button> <button type="button" class="button upload-button"><?php echo $this->button_labels['change']; ?></button> <# } #> </div> </div> <# } else { #> <div class="attachment-media-view"> <# if ( data.canUpload ) { #> <button type="button" class="upload-button button-add-media"><?php echo $this->button_labels['site_icon']; ?></button> <# } #> <div class="actions"> <# if ( data.defaultAttachment ) { #> <button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button> <# } #> </div> </div> <# } #> <# if ( data.description ) { #> <span class="description customize-control-description">{{{ data.description }}}</span> <# } #> <?php } } PK �}[���^ ^ + class-wp-customize-header-image-control.phpnu �[��� <?php /** * Customize API: WP_Customize_Header_Image_Control class * * @package WordPress * @subpackage Customize * @since 4.4.0 */ /** * Customize Header Image Control class. * * @since 3.4.0 * * @see WP_Customize_Image_Control */ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { /** * Customize control type. * * @since 4.2.0 * @var string */ public $type = 'header'; /** * Uploaded header images. * * @since 3.9.0 * @var string */ public $uploaded_headers; /** * Default header images. * * @since 3.9.0 * @var string */ public $default_headers; /** * Constructor. * * @since 3.4.0 * * @param WP_Customize_Manager $manager Customizer bootstrap instance. */ public function __construct( $manager ) { parent::__construct( $manager, 'header_image', array( 'label' => __( 'Header Image' ), 'settings' => array( 'default' => 'header_image', 'data' => 'header_image_data', ), 'section' => 'header_image', 'removed' => 'remove-header', 'get_url' => 'get_header_image', ) ); } /** */ public function enqueue() { wp_enqueue_media(); wp_enqueue_script( 'customize-views' ); $this->prepare_control(); wp_localize_script( 'customize-views', '_wpCustomizeHeader', array( 'data' => array( 'width' => absint( get_theme_support( 'custom-header', 'width' ) ), 'height' => absint( get_theme_support( 'custom-header', 'height' ) ), 'flex-width' => absint( get_theme_support( 'custom-header', 'flex-width' ) ), 'flex-height' => absint( get_theme_support( 'custom-header', 'flex-height' ) ), 'currentImgSrc' => $this->get_current_image_src(), ), 'nonces' => array( 'add' => wp_create_nonce( 'header-add' ), 'remove' => wp_create_nonce( 'header-remove' ), ), 'uploads' => $this->uploaded_headers, 'defaults' => $this->default_headers, ) ); parent::enqueue(); } /** * @global Custom_Image_Header $custom_image_header */ public function prepare_control() { global $custom_image_header; if ( empty( $custom_image_header ) ) { return; } add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_header_image_template' ) ); // Process default headers and uploaded headers. $custom_image_header->process_default_headers(); $this->default_headers = $custom_image_header->get_default_header_images(); $this->uploaded_headers = $custom_image_header->get_uploaded_header_images(); } /** */ public function print_header_image_template() { ?> <script type="text/template" id="tmpl-header-choice"> <# if (data.random) { #> <button type="button" class="button display-options random"> <span class="dashicons dashicons-randomize dice"></span> <# if ( data.type === 'uploaded' ) { #> <?php _e( 'Randomize uploaded headers' ); ?> <# } else if ( data.type === 'default' ) { #> <?php _e( 'Randomize suggested headers' ); ?> <# } #> </button> <# } else { #> <button type="button" class="choice thumbnail" data-customize-image-value="{{data.header.url}}" data-customize-header-image-data="{{JSON.stringify(data.header)}}"> <span class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Set image' ); ?> </span> <img src="{{data.header.thumbnail_url}}" alt="{{data.header.alt_text || data.header.description}}" /> </button> <# if ( data.type === 'uploaded' ) { #> <button type="button" class="dashicons dashicons-no close"> <span class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Remove image' ); ?> </span> </button> <# } #> <# } #> </script> <script type="text/template" id="tmpl-header-current"> <# if (data.choice) { #> <# if (data.random) { #> <div class="placeholder"> <span class="dashicons dashicons-randomize dice"></span> <# if ( data.type === 'uploaded' ) { #> <?php _e( 'Randomizing uploaded headers' ); ?> <# } else if ( data.type === 'default' ) { #> <?php _e( 'Randomizing suggested headers' ); ?> <# } #> </div> <# } else { #> <img src="{{data.header.thumbnail_url}}" alt="{{data.header.alt_text || data.header.description}}" /> <# } #> <# } else { #> <div class="placeholder"> <?php _e( 'No image set' ); ?> </div> <# } #> </script> <?php } /** * @return string|void */ public function get_current_image_src() { $src = $this->value(); if ( isset( $this->get_url ) ) { $src = call_user_func( $this->get_url, $src ); return $src; } } /** */ public function render_content() { $visibility = $this->get_current_image_src() ? '' : ' style="display:none" '; $width = absint( get_theme_support( 'custom-header', 'width' ) ); $height = absint( get_theme_support( 'custom-header', 'height' ) ); ?> <div class="customize-control-content"> <?php if ( current_theme_supports( 'custom-header', 'video' ) ) { echo '<span class="customize-control-title">' . $this->label . '</span>'; } ?> <div class="customize-control-notifications-container"></div> <p class="customizer-section-intro customize-control-description"> <?php if ( current_theme_supports( 'custom-header', 'video' ) ) { _e( 'Click “Add Image” to upload an image file from your computer. Your theme works best with an image that matches the size of your video — you’ll be able to crop your image once you upload it for a perfect fit.' ); } elseif ( $width && $height ) { printf( /* translators: %s: Header size in pixels. */ __( 'Click “Add Image” to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ), sprintf( '<strong>%s × %s</strong>', $width, $height ) ); } elseif ( $width ) { printf( /* translators: %s: Header width in pixels. */ __( 'Click “Add Image” to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ), sprintf( '<strong>%s</strong>', $width ) ); } else { printf( /* translators: %s: Header height in pixels. */ __( 'Click “Add Image” to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ), sprintf( '<strong>%s</strong>', $height ) ); } ?> </p> <div class="current"> <label for="header_image-button"> <span class="customize-control-title"> <?php _e( 'Current header' ); ?> </span> </label> <div class="container"> </div> </div> <div class="actions"> <?php if ( current_user_can( 'upload_files' ) ) : ?> <button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button> <button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add Header Image' ); ?>"><?php _e( 'Add Image' ); ?></button> <?php endif; ?> </div> <div class="choices"> <span class="customize-control-title header-previously-uploaded"> <?php _ex( 'Previously uploaded', 'custom headers' ); ?> </span> <div class="uploaded"> <div class="list"> </div> </div> <span class="customize-control-title header-default"> <?php _ex( 'Suggested', 'custom headers' ); ?> </span> <div class="default"> <div class="list"> </div> </div> </div> </div> <?php } } PK �}[�-��� � '