diff options
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/site-logo')
11 files changed, 33 insertions, 451 deletions
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css deleted file mode 100644 index e0d9a2c4..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css +++ /dev/null @@ -1,49 +0,0 @@ -/* Do not modify this file directly. It is concatenated from individual module CSS files. */ -/** - * Styles for the Site Logo control. - */ -#customize-control-site_logo .current { - margin-bottom: 6px; -} - -#customize-control-site_logo .current span { - border: 1px solid #eee; - border-radius: 2px; - color: #555; - display: block; - overflow: hidden; - line-height: 40px; - min-height: 40px; - padding: 0 6px; - text-align: center; - text-overflow: ellipsis; - white-space: nowrap; -} - -#customize-control-site_logo .current img { - max-width: 100%; -} - -#customize-control-site_logo button.new, -#customize-control-site_logo button.change, -#customize-control-site_logo button.remove { - height: auto; - width: 48%; - white-space: normal; -} - -#customize-control-site_logo .remove { - float: right; - margin-left: 3px; -} - -#customize-control-site_logo .new, -#customize-control-site_logo .change { - float: left; -} - -#customize-control-site_logo .customize-control-description { - display: block; - clear: both; - margin-bottom: 10px; -}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css deleted file mode 100644 index f07c2f74..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css +++ /dev/null @@ -1 +0,0 @@ -#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:right;margin-left:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:left}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.css deleted file mode 100644 index b9a10fe6..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.css +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Styles for the Site Logo control. - */ -#customize-control-site_logo .current { - margin-bottom: 6px; -} - -#customize-control-site_logo .current span { - border: 1px solid #eee; - -webkit-border-radius: 2px; - border-radius: 2px; - color: #555; - display: block; - overflow: hidden; - line-height: 40px; - min-height: 40px; - padding: 0 6px; - text-align: center; - text-overflow: ellipsis; - white-space: nowrap; -} - -#customize-control-site_logo .current img { - max-width: 100%; -} - -#customize-control-site_logo button.new, -#customize-control-site_logo button.change, -#customize-control-site_logo button.remove { - height: auto; - width: 48%; - white-space: normal; -} - -#customize-control-site_logo .remove { - float: left; - margin-right: 3px; -} - -#customize-control-site_logo .new, -#customize-control-site_logo .change { - float: right; -} - -#customize-control-site_logo .customize-control-description { - display: block; - clear: both; - margin-bottom: 10px; -}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css deleted file mode 100644 index 0c1eede3..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css +++ /dev/null @@ -1,2 +0,0 @@ -/* Do not modify this file directly. It is concatenated from individual module CSS files. */ -#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:left;margin-right:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:right}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php deleted file mode 100644 index 209cc000..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -/** - * Custom logo uploader control for the Customizer. - * - * @package Jetpack - */ -class Site_Logo_Image_Control extends WP_Customize_Control { - /** - * Constructor for our custom control. - * - * @param object $wp_customize - * @param string $control_id - * @param array $args - * @uses Site_Logo_Image_Control::l10n() - */ - public function __construct( $wp_customize, $control_id, $args = array() ) { - // declare these first so they can be overridden - $this->l10n = array( - 'upload' => __( 'Add logo', 'jetpack' ), - 'set' => __( 'Set as logo', 'jetpack' ), - 'choose' => __( 'Choose logo', 'jetpack' ), - 'change' => __( 'Change logo', 'jetpack' ), - 'remove' => __( 'Remove logo', 'jetpack' ), - 'placeholder' => __( 'No logo set', 'jetpack' ), - ); - - parent::__construct( $wp_customize, $control_id, $args ); - } - - /** - * This will be critical for our JS constructor. - */ - public $type = 'site_logo'; - - /** - * Allows overriding of global labels by a specific control. - */ - public $l10n = array(); - - /** - * The type of files that should be allowed by the media modal. - */ - public $mime_type = 'image'; - - /** - * Enqueue our media manager resources, scripts, and styles. - * - * @uses wp_enqueue_media() - * @uses wp_enqueue_style() - * @uses wp_enqueue_script() - * @uses plugins_url() - */ - public function enqueue() { - // Enqueues all needed media resources. - wp_enqueue_media(); - - /* - * Enqueue our control script and styles. - */ - - // We only enqueue a minified version of the file on prod. Jetpack. - $min = ( - ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) - || ( defined( 'IS_WPCOM' ) && IS_WPCOM ) - ) - ? '' - : '.min'; - - wp_enqueue_style( - 'site-logo-control', - plugins_url( '../css/site-logo-control.css', __FILE__ ), - array(), - JETPACK__VERSION - ); - wp_style_add_data( 'site-logo-control', 'rtl', 'replace' ); - wp_style_add_data( 'site-logo-control', 'suffix', $min ); - - wp_enqueue_script( 'site-logo-control', plugins_url( '../js/site-logo-control.js', __FILE__ ), array( 'media-views', 'customize-controls', 'underscore' ), '', true ); - } - - /** - * Check if we have an active site logo. - * - * @uses get_option() - * @return boolean - */ - public function has_site_logo() { - $logo = get_option( 'site_logo' ); - - if ( empty( $logo['url'] ) ) { - return false; - } else { - return true; - } - } - - /** - * Display our custom control in the Customizer. - * - * @uses Site_Logo_Image_Control::l10n() - * @uses Site_Logo_Image_Control::mime_type() - * @uses Site_Logo_Image_Control::label() - * @uses Site_Logo_Image_Control::description() - * @uses esc_attr() - * @uses esc_html() - */ - public function render_content() { - // We do this to allow the upload control to specify certain labels - $l10n = json_encode( $this->l10n ); - - // Control title - printf( - '<span class="customize-control-title" data-l10n="%s" data-mime="%s">%s</span>', - esc_attr( $l10n ), - esc_attr( $this->mime_type ), - esc_html( $this->label ) - ); - - // Control description - if ( ! empty( $this->description ) ) : ?> - <span class="description customize-control-description"><?php echo $this->description; ?></span> - <?php endif; ?> - - <div class="current"></div> - <div class="actions"></div> - <?php - } -} diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo.php index 6793bf0a..66e77102 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo.php +++ b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo.php @@ -1,17 +1,25 @@ <?php /** - * Our Site Logo class for managing a theme-agnostic logo through the Customizer. + * Site Logo class main class file. * * @package automattic/jetpack */ + +/** + * Site Logo class for managing a theme-agnostic logo through the Customizer. + */ class Site_Logo { /** * Stores our single instance. + * + * @var Site_Logo */ private static $instance; /** * Stores the attachment ID of the site logo. + * + * @var int */ public $logo; @@ -173,7 +181,13 @@ class Site_Logo { // Don't bother passing in header text classes if the theme supports custom headers. if ( ! current_theme_supports( 'custom-header' ) ) { $classes = jetpack_sanitize_header_text_classes( $this->header_text_classes() ); - wp_enqueue_script( 'site-logo-header-text', plugins_url( '../js/site-logo-header-text.js', __FILE__ ), array( 'media-views' ), '', true ); + wp_enqueue_script( + 'site-logo-header-text', + plugins_url( '../js/site-logo-header-text.js', __FILE__ ), + array( 'media-views' ), + JETPACK__VERSION, + true + ); wp_localize_script( 'site-logo-header-text', 'site_logo_header_classes', array( 'classes' => $classes ) ); } } @@ -228,7 +242,7 @@ class Site_Logo { ?> <!-- Site Logo: hide header text --> <style type="text/css"> - <?php echo jetpack_sanitize_header_text_classes( $classes ); ?> { + <?php echo jetpack_sanitize_header_text_classes( $classes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> { position: absolute; clip: rect(1px, 1px, 1px, 1px); } @@ -251,7 +265,7 @@ class Site_Logo { $valid_sizes[] = 'full'; // If the size declared in add_theme_support is valid, use it; otherwise, just go with 'thumbnail'. - $size = ( isset( $args[0]['size'] ) && in_array( $args[0]['size'], $valid_sizes ) ) ? $args[0]['size'] : 'thumbnail'; + $size = ( isset( $args[0]['size'] ) && in_array( $args[0]['size'], $valid_sizes, true ) ) ? $args[0]['size'] : 'thumbnail'; return $size; } @@ -259,7 +273,7 @@ class Site_Logo { /** * Make custom image sizes available to the media manager. * - * @param array $sizes + * @param array $sizes List of image sizes. * @uses get_intermediate_image_sizes() * @return array All default and registered custom image sizes. */ @@ -269,7 +283,7 @@ class Site_Logo { // Have we got anything fun to work with? if ( is_array( $intermediate ) && ! empty( $intermediate ) ) { - foreach ( $intermediate as $key => $size ) { + foreach ( $intermediate as $size ) { // If the size isn't already in the $sizes array, add it. if ( ! array_key_exists( $size, $sizes ) ) { $sizes[ $size ] = $size; @@ -283,6 +297,8 @@ class Site_Logo { /** * Add site logos to media states in the Media Manager. * + * @param array $media_states An array of media states. + * * @return array The current attachment's media states. */ public function add_media_state( $media_states ) { @@ -302,7 +318,7 @@ class Site_Logo { /** * Reset the site logo if the current logo is deleted in the media manager. * - * @param int $site_id + * @param int $post_id Attachment ID. * @uses Site_Logo::remove_site_logo() */ public function reset_on_attachment_delete( $post_id ) { @@ -334,6 +350,7 @@ class Site_Logo { * Adds custom classes to the array of body classes. * * @uses Site_Logo::has_site_logo() + * @param array $classes Classes for the body element. * @return array Array of <body> classes */ public function body_classes( $classes ) { @@ -348,18 +365,18 @@ class Site_Logo { /** * Sanitize our header text Customizer setting. * - * @param $input - * @return mixed 1 if checked, empty string if not checked. + * @param any $input The input value to sanitize. + * @return bool|string 1 if checked, empty string if not checked. */ public function sanitize_checkbox( $input ) { - return ( 1 == $input ) ? 1 : ''; + return ( 1 === (int) $input ) ? 1 : ''; } /** * Validate and sanitize a new site logo setting. * - * @param $input - * @return mixed 1 if checked, empty string if not checked. + * @param any $input Logo setting value to sanitize. + * @return int Attachment post ID, or 0 if invalid. */ public function sanitize_logo_setting( $input ) { $input = absint( $input ); diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php index 22e6c942..0d7881ae 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php +++ b/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php @@ -1,6 +1,6 @@ <?php /** - * Functions and template tags for using site logos. + * Functions and template tags for Site Logo theme tool. * * @package automattic/jetpack */ @@ -11,6 +11,7 @@ * @uses get_option() * @uses esc_url_raw() * @uses set_url_scheme() + * @param string $show 'url' or 'id' for site logo. * @return mixed The URL or ID of our site logo, false if not set * @since 1.0 */ @@ -55,7 +56,7 @@ function jetpack_get_site_logo_dimensions() { // If the size is the default `thumbnail`, get its dimensions. Otherwise, get them from $_wp_additional_image_sizes if ( empty( $size ) ) { return false; - } elseif ( 'thumbnail' == $size ) { + } elseif ( 'thumbnail' === $size ) { $dimensions = array( 'width' => get_option( 'thumbnail_size_w' ), 'height' => get_option( 'thumbnail_size_h' ), @@ -197,6 +198,7 @@ function jetpack_is_customize_preview() { * Sanitize the string of classes used for header text. * Limit to A-Z,a-z,0-9,(space),(comma),_,- * + * @param string $classes Unsanitized string of CSS classes. * @return string Sanitized string of CSS classes. */ function jetpack_sanitize_header_text_classes( $classes ) { diff --git a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-control.js b/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-control.js deleted file mode 100644 index c4cce6c2..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-control.js +++ /dev/null @@ -1,160 +0,0 @@ -/** - * JS for handling the Site Logo Customizer control. - */ -( function( wp, $ ) { - // nice shortcut - var api = wp.customize; - /** - * The Customizer looks for wp.customizer.controlConstructor[type] functions - * where type == the type member of a WP_Customize_Control - */ - api.controlConstructor.site_logo = api.Control.extend( { - /** - * This method is called when the control is ready to run. - * Do all of your setup and event binding here. - */ - ready: function() { - // this.container is a jQuery object of your container - - // grab the bits of data from the title for specifying this control - var data = this.container.find( '.customize-control-title' ).data(); - - // Use specific l10n data for this control where available - this.l10n = data.l10n; - // Grab mime type - this.mime = data.mime; - - // Set up image container and button elements. Cache for re-use. - this.$imgContainer = $( '#customize-control-site_logo .current' ); - this.$btnContainer = $( '#customize-control-site_logo .actions' ); - this.$img = $( '<img class="site-logo-thumbnail" />' ).prependTo( this.$imgContainer ); - this.$placeholder = $( '<span>' + this.l10n.placeholder + '</span>' ).prependTo( - this.$imgContainer - ); - this.$btnAdd = $( - '<button type="button" class="button new">' + this.l10n.upload + '</button>' - ).prependTo( this.$btnContainer ); - this.$btnChange = $( - '<button type="button" class="button change">' + this.l10n.change + '</button>' - ).prependTo( this.$btnContainer ); - this.$btnRemove = $( - '<button type="button" class="button remove">' + this.l10n.remove + '</button>' - ).prependTo( this.$btnContainer ); - - // handy shortcut so we don't have to us _.bind every time we add a callback - _.bindAll( this, 'removeImg', 'upload', 'render', 'pick' ); - - this.$btnAdd.on( 'click', this.upload ); - this.$btnChange.on( 'click', this.upload ); - this.$btnRemove.on( 'click', this.removeImg ); - - // Call render method whenever setting is changed. - this.setting.bind( 'change', this.render ); - // Do initial rendering. - this.render(); - }, - /** - * Remember that _.bind was used to maintain `this` as the control - * object rather than the usual jQuery way of binding to the DOM element. - */ - upload: function( event ) { - event.preventDefault(); - - if ( ! this.frame ) { - this.initFrame(); - } - - this.frame.open(); - }, - /** - * Set the media frame so that it can be reused and accessed when needed. - */ - initFrame: function() { - this.frame = wp.media( { - // The title of the media modal - title: this.l10n.choose, - // restrict to specified mime type - library: { - type: this.mime, - }, - // Customize the submit button. - button: { - // Set the text of the button. - text: this.l10n.set, - }, - // Just one, thanks. - multiple: false, - } ); - - // When an image is selected, run a callback. - this.frame.on( 'select', this.pick ); - }, - /** - * Fired when an image is selected in the media modal. Gets the selected - * image information, and sets it within the control. - */ - pick: function() { - // get the attachment from the modal frame - var attachment = this.frame - .state() - .get( 'selection' ) - .single(); - if ( 'image' === attachment.get( 'type' ) ) { - // set the setting - the callback will take care of rendering - this.setting( this.reduceMembers( attachment.toJSON() ) ); - } - }, - /** - * Reduces the attachment object to just the few desired members. - * @param {object} attachment An attachment object provided by the - * medial modal. - * @return {object} A reduced media object. - */ - reduceMembers: function( attachment ) { - var desired = [ 'id', 'sizes', 'url' ], - output = {}; - $.each( desired, function( i, key ) { - output[ key ] = attachment[ key ]; - } ); - return output; - }, - /** - * Called on init and whenever a setting is changed. Shows the thumbnail - * when there is one or the upload button when there isn't. - */ - render: function() { - var value = this.setting(); - - if ( value && value.url ) { - this.$placeholder.hide(); - if ( ! value.sizes || ! value.sizes.medium ) { - this.$img.attr( 'src', value.url ); - } else { - this.$img.attr( 'src', value.sizes.medium.url ); - } - this.$img.show(); - this.$btnRemove.show(); - this.$btnChange.show(); - this.$btnAdd.hide(); - } else { - this.$img.hide(); - this.$placeholder.show(); - this.$btnRemove.hide(); - this.$btnChange.hide(); - this.$btnAdd.show(); - } - }, - /** - * Called when the "Remove Image" link is clicked. Sets thes setting back - * to its default state. - * @param {object} event jQuery Event object from click event - */ - removeImg: function( event ) { - event.preventDefault(); - this.setting( { - url: '', - id: 0, - } ); - }, - } ); -} )( this.wp, jQuery ); diff --git a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-control.min.js b/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-control.min.js deleted file mode 100644 index 171d98e8..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-control.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(a,c){var b=a.customize;b.controlConstructor.site_logo=b.Control.extend({ready:function(){var d=this.container.find(".customize-control-title").data();this.l10n=d.l10n;this.mime=d.mime;this.$imgContainer=c("#customize-control-site_logo .current");this.$btnContainer=c("#customize-control-site_logo .actions");this.$img=c('<img class="site-logo-thumbnail" />').prependTo(this.$imgContainer);this.$placeholder=c("<span>"+this.l10n.placeholder+"</span>").prependTo(this.$imgContainer);this.$btnAdd=c('<button type="button" class="button new">'+this.l10n.upload+"</button>").prependTo(this.$btnContainer);this.$btnChange=c('<button type="button" class="button change">'+this.l10n.change+"</button>").prependTo(this.$btnContainer);this.$btnRemove=c('<button type="button" class="button remove">'+this.l10n.remove+"</button>").prependTo(this.$btnContainer);_.bindAll(this,"removeImg","upload","render","pick");this.$btnAdd.on("click",this.upload);this.$btnChange.on("click",this.upload);this.$btnRemove.on("click",this.removeImg);this.setting.bind("change",this.render);this.render()},upload:function(d){d.preventDefault();if(!this.frame){this.initFrame()}this.frame.open()},initFrame:function(){this.frame=a.media({title:this.l10n.choose,library:{type:this.mime},button:{text:this.l10n.set},multiple:false});this.frame.on("select",this.pick)},pick:function(){var d=this.frame.state().get("selection").first().toJSON();d=this.reduceMembers(d);this.setting(d)},reduceMembers:function(f){var e=["id","sizes","url"],d={};c.each(e,function(h,g){d[g]=f[g]});return d},render:function(){var d=this.setting();if(d&&d.url){this.$placeholder.hide();if(!d.sizes||!d.sizes.medium){this.$img.attr("src",d.url)}else{this.$img.attr("src",d.sizes.medium.url)}this.$img.show();this.$btnRemove.show();this.$btnChange.show();this.$btnAdd.hide()}else{this.$img.hide();this.$placeholder.show();this.$btnRemove.hide();this.$btnChange.hide();this.$btnAdd.show()}},removeImg:function(d){d.preventDefault();this.setting({url:"",id:0})}})})(this.wp,jQuery);
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo.js b/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo.js deleted file mode 100644 index 6c959c0c..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * JS for handling the Site Logo real-time display in the Customizer preview frame. - */ -( function( $ ) { - var api = wp.customize, - $body, - $anchor, - $logo, - size; - - function cacheSelectors() { - $body = $( 'body' ); - $anchor = $( '.site-logo-link' ); - $logo = $( '.site-logo' ); - size = $logo.attr( 'data-size' ); - } - - api( 'site_logo', function( value ) { - value.bind( function( newVal ) { - // grab selectors the first time through - if ( ! $body ) { - cacheSelectors(); - } - - // Let's update our preview logo. - if ( newVal && newVal.url ) { - // If the source was smaller than the size required by the theme, give the biggest we've got. - if ( ! newVal.sizes[ size ] ) { - size = 'full'; - } - - $logo.attr( { - height: newVal.sizes[ size ].height, - width: newVal.sizes[ size ].width, - src: newVal.sizes[ size ].url, - } ); - - $anchor.show(); - $body.addClass( 'has-site-logo' ); - } else { - $anchor.hide(); - $body.removeClass( 'has-site-logo' ); - } - } ); - } ); -} )( jQuery ); diff --git a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo.min.js b/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo.min.js deleted file mode 100644 index a6fe41eb..00000000 --- a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(d){var e=wp.customize,c,f,g,a;e("site_logo",function(e){e.bind(function(b){c||(c=d("body"),f=d(".site-logo-link"),g=d(".site-logo"),a=g.attr("data-size"));b&&b.url?(b.sizes[a]||(a="full"),g.attr({height:b.sizes[a].height,width:b.sizes[a].width,src:b.sizes[a].url}),f.show(),c.addClass("has-site-logo")):(f.hide(),c.removeClass("has-site-logo"))})})})(jQuery);
\ No newline at end of file |