Ticket #45424: 45424.1.patch
File 45424.1.patch, 13.0 KB (added by , 6 years ago) |
---|
-
src/wp-content/themes/twentynineteen/archive.php
20 20 <header class="page-header"> 21 21 <?php 22 22 the_archive_title( '<h1 class="page-title">', '</h1>' ); 23 // Remove for now @TODO24 // the_archive_description( '<div class="page-description">', '</div>' );25 23 ?> 26 24 </header><!-- .page-header --> 27 25 -
src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php
205 205 'facebook.com', 206 206 'fb.me', 207 207 ), 208 'feed' => array(208 'feed' => array( 209 209 'feed', 210 210 ), 211 211 'google-plus' => array( 212 212 'plus.google.com', 213 213 ), 214 'lastfm' => array(214 'lastfm' => array( 215 215 'last.fm', 216 216 ), 217 'mail' => array(217 'mail' => array( 218 218 'mailto:', 219 219 ), 220 220 'slideshare' => array( -
src/wp-content/themes/twentynineteen/functions.php
263 263 264 264 require_once get_parent_theme_file_path( '/inc/color-patterns.php' ); 265 265 266 if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) { 267 $primary_color = 199; 268 } else { 269 $primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) ); 266 $primary_color = 199; 267 if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) { 268 $primary_color = get_theme_mod( 'primary_color_hue', 199 ); 270 269 } 271 270 ?> 272 271 273 <style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . $primary_color. '"' : ''; ?>>272 <style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . absint( $primary_color ) . '"' : ''; ?>> 274 273 <?php echo twentynineteen_custom_colors_css(); ?> 275 274 </style> 276 275 <?php -
src/wp-content/themes/twentynineteen/header.php
31 31 32 32 <?php if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) : ?> 33 33 <div class="site-featured-image"> 34 <?php twentynineteen_post_thumbnail(); ?> 35 <?php the_post(); ?> 36 <?php $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; ?> 37 <div class="<?php echo ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) ? 'entry-header has-discussion' : 'entry-header'; ?>"> 34 <?php 35 twentynineteen_post_thumbnail(); 36 the_post(); 37 $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; 38 39 $classes = 'entry-header'; 40 if ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) { 41 $classes = 'entry-header has-discussion'; 42 } 43 ?> 44 <div class="<?php echo $classes; ?>"> 38 45 <?php get_template_part( 'template-parts/header/entry', 'header' ); ?> 39 46 </div><!-- .entry-header --> 40 47 <?php rewind_posts(); ?> -
src/wp-content/themes/twentynineteen/image.php
41 41 echo wp_get_attachment_image( get_the_ID(), $image_size ); 42 42 ?> 43 43 44 <figcaption class="wp-caption-text"><?php echo get_the_excerpt(); ?></figcaption>44 <figcaption class="wp-caption-text"><?php the_excerpt(); ?></figcaption> 45 45 46 46 </figure><!-- .entry-attachment --> 47 47 -
src/wp-content/themes/twentynineteen/inc/color-patterns.php
12 12 */ 13 13 function twentynineteen_custom_colors_css() { 14 14 15 if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) { 16 $primary_color = 199; 17 } else { 18 $primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) ); 15 $primary_color = 199; 16 if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) { 17 $primary_color = absint( get_theme_mod( 'primary_color', 199 ) ); 19 18 } 20 19 21 20 /** … … 25 24 * 26 25 * @param int $saturation Color saturation level. 27 26 */ 27 $saturation = apply_filters( 'twentynineteen_custom_colors_saturation', 100 ); 28 $saturation = absint( $saturation ) . '%'; 28 29 29 $saturation = absint( apply_filters( 'twentynineteen_custom_colors_saturation', 100 ) ); 30 $saturation = $saturation . '%'; 31 30 /** 31 * Filter Twenty Nineteen default selection saturation level. 32 * 33 * @since Twenty Nineteen 1.0 34 * 35 * @param int $saturation_selection Selection color saturation level. 36 */ 32 37 $saturation_selection = absint( apply_filters( 'twentynineteen_custom_colors_saturation_selection', 50 ) ); 33 38 $saturation_selection = $saturation_selection . '%'; 34 39 35 $lightness = absint( apply_filters( 'twentynineteen_custom_colors_lightness', 33 ) ); 36 $lightness = $lightness . '%'; 40 /** 41 * Filter Twenty Nineteen default lightness level. 42 * 43 * @since Twenty Nineteen 1.0 44 * 45 * @param int $lightness Color lightness level. 46 */ 47 $lightness = apply_filters( 'twentynineteen_custom_colors_lightness', 33 ); 48 $lightness = absint( $lightness ) . '%'; 37 49 38 $lightness_hover = absint( apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ) ); 39 $lightness_hover = $lightness_hover . '%'; 50 /** 51 * Filter Twenty Nineteen default hover lightness level. 52 * 53 * @since Twenty Nineteen 1.0 54 * 55 * @param int $lightness_hover Hover color lightness level. 56 */ 57 $lightness_hover = apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ); 58 $lightness_hover = absint( $lightness_hover ) . '%'; 40 59 41 $lightness_selection = absint( apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 ) ); 42 $lightness_selection = $lightness_selection . '%'; 60 /** 61 * Filter Twenty Nineteen default selection lightness level. 62 * 63 * @since Twenty Nineteen 1.0 64 * 65 * @param int $lightness_selection Selection color lightness level. 66 */ 67 $lightness_selection = apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 ); 68 $lightness_selection = absint( $lightness_selection ) . '%'; 43 69 44 70 $theme_css = ' 45 71 /* … … 233 259 color: inherit; 234 260 } 235 261 '; 236 $css = ''; 262 237 263 if ( function_exists( 'register_block_type' ) && is_admin() ) { 238 $css .= $editor_css; 239 } else if ( ! is_admin() ) { 240 $css = $theme_css; 264 $theme_css = $editor_css; 241 265 } 242 266 243 267 /** … … 249 273 * @param int $primary_color The user's selected color hue. 250 274 * @param string $saturation Filtered theme color saturation level. 251 275 */ 252 return apply_filters( 'twentynineteen_custom_colors_css', $ css, $primary_color, $saturation );276 return apply_filters( 'twentynineteen_custom_colors_css', $theme_css, $primary_color, $saturation ); 253 277 } -
src/wp-content/themes/twentynineteen/inc/customizer.php
125 125 * Bind JS handlers to instantly live-preview changes. 126 126 */ 127 127 function twentynineteen_customize_preview_js() { 128 wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '201 51215', true );128 wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181108', true ); 129 129 } 130 130 add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); 131 131 … … 133 133 * Load dynamic logic for the customizer controls area. 134 134 */ 135 135 function twentynineteen_panels_js() { 136 wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), ' 1.0', true );136 wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181031', true ); 137 137 } 138 138 add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' ); 139 139 -
src/wp-content/themes/twentynineteen/inc/template-functions.php
106 106 * Returns true if image filters are enabled on the theme options. 107 107 */ 108 108 function twentynineteen_image_filters_enabled() { 109 if ( get_theme_mod( 'image_filter', 1 ) ) { 110 return true; 111 } 112 return false; 109 return 'inactive' !== get_theme_mod( 'image_filter', 1 ); 113 110 } 114 111 115 112 /** … … 418 415 419 416 return "#$r$g$b"; 420 417 421 } else {418 } 422 419 423 return "rgb($r, $g, $b)"; 424 } 420 return "rgb($r, $g, $b)"; 425 421 } -
src/wp-content/themes/twentynineteen/inc/template-tags.php
157 157 158 158 <figure class="post-thumbnail"> 159 159 <a class="post-thumbnail-inner" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1"> 160 <?php 161 the_post_thumbnail( 'post-thumbnail' ); 162 ?> 160 <?php the_post_thumbnail( 'post-thumbnail' ); ?> 163 161 </a> 164 162 </figure> 165 163 … … 210 208 211 209 comment_form( 212 210 array( 213 'logged_in_as' 214 'title_reply' 211 'logged_in_as' => null, 212 'title_reply' => null, 215 213 ) 216 214 ); 217 215 } … … 223 221 * Documentation for function. 224 222 */ 225 223 function twentynineteen_the_posts_navigation() { 226 $prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 );227 $next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 );228 224 the_posts_pagination( 229 225 array( 230 226 'mid_size' => 2, 231 'prev_text' => sprintf( '%s <span class="nav-prev-text">%s</span>', $prev_icon, __( 'Newer posts', 'twentynineteen' ) ), 232 'next_text' => sprintf( '<span class="nav-next-text">%s</span> %s', __( 'Older posts', 'twentynineteen' ), $next_icon ), 227 'prev_text' => sprintf( 228 '%s <span class="nav-prev-text">%s</span>', 229 twentynineteen_get_icon_svg( 'chevron_left', 22 ), 230 __( 'Newer posts', 'twentynineteen' ) 231 ), 232 'next_text' => sprintf( 233 '<span class="nav-next-text">%s</span> %s', 234 __( 'Older posts', 'twentynineteen' ), 235 twentynineteen_get_icon_svg( 'chevron_right', 22 ) 236 ), 233 237 ) 234 238 ); 235 239 } -
src/wp-content/themes/twentynineteen/index.php
39 39 40 40 } 41 41 ?> 42 42 43 43 </main><!-- .site-main --> 44 44 </section><!-- .content-area --> 45 45 -
src/wp-content/themes/twentynineteen/sass/navigation/_menu-social-navigation.scss
45 45 width: 32px; 46 46 height: 32px; 47 47 48 // Prevent icons from jumping in Safari using hardware acceleration. 49 transform: translateZ(0); 50 48 51 &#ui-icon-link { 49 52 transform: rotate(-45deg); 50 53 } -
src/wp-content/themes/twentynineteen/style-rtl.css
1592 1592 display: block; 1593 1593 width: 32px; 1594 1594 height: 32px; 1595 transform: translateZ(0); 1595 1596 } 1596 1597 1597 1598 .social-navigation ul.social-links-menu li a svg#ui-icon-link { -
src/wp-content/themes/twentynineteen/style.css
1592 1592 display: block; 1593 1593 width: 32px; 1594 1594 height: 32px; 1595 transform: translateZ(0); 1595 1596 } 1596 1597 1597 1598 .social-navigation ul.social-links-menu li a svg#ui-icon-link {