WordPress.org

Make WordPress Core

Ticket #46922: 0002-Use-phpcs-ignore-to-selectively-ignore-EmbeddedPhpSn.patch

File 0002-Use-phpcs-ignore-to-selectively-ignore-EmbeddedPhpSn.patch, 1.7 KB (added by josephwa, 9 months ago)
  • wp-includes/feed-atom-comments.php

    From 2f276d6d151957dd3c5f5097e2b8b2cb599b22f1 Mon Sep 17 00:00:00 2001
    From: Joseph Walton <joe@kafsemo.org>
    Date: Mon, 15 Apr 2019 21:35:15 +1000
    Subject: [PATCH] Use phpcs:ignore to selectively ignore EmbeddedPhpSniff rules
    
    Use phpcs:ignore to disable rules selectively for the
    opening and closing php tags.
    ---
     wp-includes/feed-atom-comments.php | 3 ++-
     wp-includes/feed-atom.php          | 3 ++-
     2 files changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/wp-includes/feed-atom-comments.php b/wp-includes/feed-atom-comments.php
    index 4acd36330e..4b90f010f7 100644
    a b do_action( 'rss_tag_pre', 'atom-comments' ); 
    4343        </title>
    4444        <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
    4545
    46         <updated><?php
     46        <updated><?php // phpcs:ignore
    4747                $date = get_last_build_date();
    4848                echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' );
     49        // phpcs:ignore
    4950        ?></updated>
    5051
    5152<?php if ( is_singular() ) { ?>
  • wp-includes/feed-atom.php

    diff --git a/wp-includes/feed-atom.php b/wp-includes/feed-atom.php
    index f801f79860..d84d0cd925 100644
    a b do_action( 'rss_tag_pre', 'atom' ); 
    3030        <title type="text"><?php wp_title_rss(); ?></title>
    3131        <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle>
    3232
    33         <updated><?php
     33        <updated><?php // phpcs:ignore
    3434                $date = get_last_build_date();
    3535                echo $date ? mysql2date( 'Y-m-d\TH:i:s\Z', $date, false ) : date( 'Y-m-d\TH:i:s\Z' );
     36        // phpcs:ignore
    3637        ?></updated>
    3738
    3839        <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php bloginfo_rss( 'url' ); ?>" />