Changeset 53236
- Timestamp:
- 04/20/2022 02:22:21 PM (3 years ago)
- Location:
- trunk/src/wp-content/themes
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentynineteen/inc/template-functions.php
r51607 r53236 36 36 * Adds custom class to the array of posts classes. 37 37 */ 38 function twentynineteen_post_classes( $classes, $c lass, $post_id ) {38 function twentynineteen_post_classes( $classes, $css_class, $post_id ) { 39 39 $classes[] = 'entry'; 40 40 -
trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php
r47550 r53236 162 162 * @since Twenty Sixteen 1.0 163 163 * 164 * @param string $c lass Optional. Class string of the div element. Defaults to 'entry-summary'.165 */ 166 function twentysixteen_excerpt( $c lass = 'entry-summary' ) {167 $c lass = esc_attr( $class );164 * @param string $css_class Optional. Class string of the div element. Defaults to 'entry-summary'. 165 */ 166 function twentysixteen_excerpt( $css_class = 'entry-summary' ) { 167 $css_class = esc_attr( $css_class ); 168 168 169 169 if ( has_excerpt() || is_search() ) : 170 170 ?> 171 <div class="<?php echo $c lass; ?>">171 <div class="<?php echo $css_class; ?>"> 172 172 <?php the_excerpt(); ?> 173 </div><!-- .<?php echo $c lass; ?> -->173 </div><!-- .<?php echo $css_class; ?> --> 174 174 <?php 175 175 endif; -
trunk/src/wp-content/themes/twentythirteen/functions.php
r52929 r53236 563 563 * @since Twenty Thirteen 1.0 564 564 * 565 * @param bool $ echo (optional) Whether to echothe date. Default true.565 * @param bool $display (optional) Whether to display the date. Default true. 566 566 * @return string The HTML-formatted post date. 567 567 */ 568 function twentythirteen_entry_date( $ echo= true ) {568 function twentythirteen_entry_date( $display = true ) { 569 569 if ( has_post_format( array( 'chat', 'status' ) ) ) { 570 570 /* translators: 1: Post format name, 2: Date. */ … … 583 583 ); 584 584 585 if ( $ echo) {585 if ( $display ) { 586 586 echo $date; 587 587 } -
trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php
r51322 r53236 20 20 * @param string $prefix The CSS prefix. 21 21 * @param string $suffix The CSS suffix. 22 * @param bool $ echo Echothe styles.22 * @param bool $display Output the styles. 23 23 */ 24 function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $ echo= true ) {24 function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $display = true ) { 25 25 26 26 $return = ''; … … 36 36 $return = sprintf( '%s { %s: %s; }', $selector, $style, $prefix . $value . $suffix ); 37 37 38 if ( $ echo) {38 if ( $display ) { 39 39 40 40 echo $return; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;) -
trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php
r51322 r53236 28 28 * @since Twenty Twenty 1.0 29 29 * 30 * @param array $args Arguments for displaying the site logo either as an image or text.31 * @param bool $ echo Echoor return the HTML.30 * @param array $args Arguments for displaying the site logo either as an image or text. 31 * @param bool $display Display or return the HTML. 32 32 * @return string Compiled HTML based on our arguments. 33 33 */ 34 function twentytwenty_site_logo( $args = array(), $ echo= true ) {34 function twentytwenty_site_logo( $args = array(), $display = true ) { 35 35 $logo = get_custom_logo(); 36 36 $site_title = get_bloginfo( 'name' ); … … 84 84 $html = apply_filters( 'twentytwenty_site_logo', $html, $args, $classname, $contents ); 85 85 86 if ( ! $ echo) {86 if ( ! $display ) { 87 87 return $html; 88 88 } … … 97 97 * @since Twenty Twenty 1.0 98 98 * 99 * @param bool $ echo Echo or return the html.99 * @param bool $display Display or return the HTML. 100 100 * @return string The HTML to display. 101 101 */ 102 function twentytwenty_site_description( $ echo= true ) {102 function twentytwenty_site_description( $display = true ) { 103 103 $description = get_bloginfo( 'description' ); 104 104 … … 122 122 $html = apply_filters( 'twentytwenty_site_description', $html, $description, $wrapper ); 123 123 124 if ( ! $ echo) {124 if ( ! $display ) { 125 125 return $html; 126 126 } -
trunk/src/wp-content/themes/twentytwentyone/inc/custom-css.php
r51294 r53236 18 18 * @param string $prefix The CSS prefix. 19 19 * @param string $suffix The CSS suffix. 20 * @param bool $ echo Echothe styles.20 * @param bool $display Output the styles. 21 21 * @return string 22 22 */ 23 function twenty_twenty_one_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $ echo= true ) {23 function twenty_twenty_one_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $display = true ) { 24 24 25 25 // Bail early if there is no $selector elements or properties and $value. … … 30 30 $css = sprintf( '%s { %s: %s; }', $selector, $style, $prefix . $value . $suffix ); 31 31 32 if ( $ echo) {32 if ( $display ) { 33 33 /* 34 34 * Note to reviewers: $css contains auto-generated CSS.
Note: See TracChangeset
for help on using the changeset viewer.