Make WordPress Core

Ticket #45424: 45424.8.patch

File 45424.8.patch, 721 bytes (added by allancole, 7 years ago)

Fix image_filter theme option conditional function. More info here: https://github.com/WordPress/twentynineteen/pull/680

  • src/wp-content/themes/twentynineteen/inc/template-functions.php

     
    106106 * Returns true if image filters are enabled on the theme options.
    107107 */
    108108function twentynineteen_image_filters_enabled() {
    109         if ( get_theme_mod( 'image_filter', 1 ) ) {
    110                 return true;
    111         }
    112         return false;
     109        return 0 !== get_theme_mod( 'image_filter', 1 );
    113110}
    114111
    115112/**
     
    418415
    419416                return "#$r$g$b";
    420417
    421         } else {
     418        }
    422419
    423                 return "rgb($r, $g, $b)";
    424         }
     420        return "rgb($r, $g, $b)";
    425421}