equal
deleted
inserted
replaced
452 if ( $this->doing_ajax() ) { |
452 if ( $this->doing_ajax() ) { |
453 wp_die( $ajax_message ); |
453 wp_die( $ajax_message ); |
454 } |
454 } |
455 |
455 |
456 if ( ! $message ) { |
456 if ( ! $message ) { |
457 $message = __( 'Something went wrong.' ); |
457 $message = __( 'An error occurred while customizing. Please refresh the page and try again.' ); |
458 } |
458 } |
459 |
459 |
460 if ( $this->messenger_channel ) { |
460 if ( $this->messenger_channel ) { |
461 ob_start(); |
461 ob_start(); |
462 wp_enqueue_scripts(); |
462 wp_enqueue_scripts(); |
3332 |
3332 |
3333 if ( ! $lock_user ) { |
3333 if ( ! $lock_user ) { |
3334 return null; |
3334 return null; |
3335 } |
3335 } |
3336 |
3336 |
3337 return array( |
3337 $user_details = array( |
3338 'id' => $lock_user->ID, |
3338 'id' => $lock_user->ID, |
3339 'name' => $lock_user->display_name, |
3339 'name' => $lock_user->display_name, |
3340 'avatar' => get_avatar_url( $lock_user->ID, array( 'size' => 128 ) ), |
3340 ); |
3341 ); |
3341 |
|
3342 if ( get_option( 'show_avatars' ) ) { |
|
3343 $user_details['avatar'] = get_avatar_url( $lock_user->ID, array( 'size' => 128 ) ); |
|
3344 } |
|
3345 |
|
3346 return $user_details; |
3342 } |
3347 } |
3343 |
3348 |
3344 /** |
3349 /** |
3345 * Checks locked changeset with heartbeat API. |
3350 * Checks locked changeset with heartbeat API. |
3346 * |
3351 * |
4305 </li> |
4310 </li> |
4306 </script> |
4311 </script> |
4307 |
4312 |
4308 <script type="text/html" id="tmpl-customize-changeset-locked-notification"> |
4313 <script type="text/html" id="tmpl-customize-changeset-locked-notification"> |
4309 <li class="notice notice-{{ data.type || 'info' }} {{ data.containerClasses || '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}"> |
4314 <li class="notice notice-{{ data.type || 'info' }} {{ data.containerClasses || '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}"> |
4310 <div class="notification-message customize-changeset-locked-message"> |
4315 <div class="notification-message customize-changeset-locked-message {{ data.lockUser.avatar ? 'has-avatar' : '' }}"> |
4311 <img class="customize-changeset-locked-avatar" src="{{ data.lockUser.avatar }}" alt="{{ data.lockUser.name }}" /> |
4316 <# if ( data.lockUser.avatar ) { #> |
|
4317 <img class="customize-changeset-locked-avatar" src="{{ data.lockUser.avatar }}" alt="{{ data.lockUser.name }}" /> |
|
4318 <# } #> |
4312 <p class="currently-editing"> |
4319 <p class="currently-editing"> |
4313 <# if ( data.message ) { #> |
4320 <# if ( data.message ) { #> |
4314 {{{ data.message }}} |
4321 {{{ data.message }}} |
4315 <# } else if ( data.allowOverride ) { #> |
4322 <# } else if ( data.allowOverride ) { #> |
4316 <?php |
4323 <?php |
5201 $this, |
5208 $this, |
5202 'site_icon', |
5209 'site_icon', |
5203 array( |
5210 array( |
5204 'label' => __( 'Site Icon' ), |
5211 'label' => __( 'Site Icon' ), |
5205 'description' => sprintf( |
5212 'description' => sprintf( |
5206 /* translators: %s: Site Icon size in pixels. */ |
5213 /* translators: 1: pixel value for icon size. 2: pixel value for icon size. */ |
5207 '<p>' . __( 'The Site Icon is what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. It should be square and at least %s pixels.' ) . '</p>', |
5214 '<p>' . __( 'The Site Icon is what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. It should be square and at least <code>%1$s by %2$s</code> pixels.' ) . '</p>', |
5208 '<code>512 × 512</code>' |
5215 512, |
|
5216 512 |
5209 ), |
5217 ), |
5210 'section' => 'title_tagline', |
5218 'section' => 'title_tagline', |
5211 'priority' => 60, |
5219 'priority' => 60, |
5212 'height' => 512, |
5220 'height' => 512, |
5213 'width' => 512, |
5221 'width' => 512, |
6139 * Callback for rendering the custom logo, used in the custom_logo partial. |
6147 * Callback for rendering the custom logo, used in the custom_logo partial. |
6140 * |
6148 * |
6141 * This method exists because the partial object and context data are passed |
6149 * This method exists because the partial object and context data are passed |
6142 * into a partial's render_callback so we cannot use get_custom_logo() as |
6150 * into a partial's render_callback so we cannot use get_custom_logo() as |
6143 * the render_callback directly since it expects a blog ID as the first |
6151 * the render_callback directly since it expects a blog ID as the first |
6144 * argument. When WP no longer supports PHP 5.3, this method can be removed |
6152 * argument. |
6145 * in favor of an anonymous function. |
|
6146 * |
6153 * |
6147 * @see WP_Customize_Manager::register_controls() |
6154 * @see WP_Customize_Manager::register_controls() |
6148 * |
6155 * |
6149 * @since 4.5.0 |
6156 * @since 4.5.0 |
6150 * |
6157 * |