Skip to content

Commit c9e3aed

Browse files
committed
Update PHPCS configuration
1 parent e159897 commit c9e3aed

2 files changed

Lines changed: 33 additions & 33 deletions

File tree

mf2-feed.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
2-
/**
3-
* Plugin Name: MF2 Feed
4-
* Plugin URI: http://github.com/indieweb/wordpress-mf2-feed/
5-
* Description: Adds a Microformats2 JSON feed for every entry
6-
* Version: 2.1.0
7-
* Author: Matthias Pfefferle
8-
* Author URI: https://notiz.blog/
9-
* License: MIT
10-
* License URI: http://opensource.org/licenses/MIT
11-
* Text Domain: mf2-feed
12-
* Domain Path: /languages
13-
*/
2+
/**
3+
* Plugin Name: MF2 Feed
4+
* Plugin URI: http://github.com/indieweb/wordpress-mf2-feed/
5+
* Description: Adds a Microformats2 JSON feed for every entry
6+
* Version: 2.1.0
7+
* Author: Matthias Pfefferle
8+
* Author URI: https://notiz.blog/
9+
* License: MIT
10+
* License URI: http://opensource.org/licenses/MIT
11+
* Text Domain: mf2-feed
12+
* Domain Path: /languages
13+
*/
1414

1515
add_action( 'init', array( 'Mf2Feed', 'init' ) );
1616

@@ -62,20 +62,20 @@ public static function do_feed_mf2( $for_comments ) {
6262

6363
$post = $post->to_mf2();
6464

65-
$items = array();
66-
$items['items'] = $post;
65+
$items = array();
66+
$items['items'] = $post;
6767
} else {
6868
$items = array(
69-
"items" => array(
69+
'items' => array(
7070
array(
71-
'type' => array( 'h-feed' ),
71+
'type' => array( 'h-feed' ),
7272
'properties' => array(
73-
'name' => array( get_bloginfo( 'name' ) ),
73+
'name' => array( get_bloginfo( 'name' ) ),
7474
'summary' => array( get_bloginfo( 'description' ) ),
75-
'url' => array( site_url( '/' ) )
76-
)
77-
)
78-
)
75+
'url' => array( site_url( '/' ) ),
76+
),
77+
),
78+
),
7979
);
8080

8181
while ( have_posts() ) {
@@ -119,7 +119,7 @@ public static function do_feed_jf2( $for_comments ) {
119119
require_once dirname( __FILE__ ) . '/includes/class-mf2-feed-entry.php';
120120

121121
if ( $for_comments ) {
122-
$post = new Mf2_Feed_Entry( get_the_ID(), $for_comments );
122+
$post = new Mf2_Feed_Entry( get_the_ID(), $for_comments );
123123
$items = $post->to_jf2();
124124
} else {
125125
$items = array( 'type' => 'feed' );
@@ -193,15 +193,15 @@ public static function query_vars( $vars ) {
193193
*/
194194
public static function add_html_header() {
195195
if ( is_singular() ) {
196-
?>
196+
?>
197197
<link rel="alternate" type="<?php echo esc_attr( feed_content_type( 'mf2' ) ); ?>" href="<?php echo esc_url( get_post_comments_feed_link( null, 'mf2' ) ); ?>" />
198198
<link rel="alternate" type="<?php echo esc_attr( feed_content_type( 'jf2' ) ); ?>" href="<?php echo esc_url( get_post_comments_feed_link( null, 'jf2' ) ); ?>" />
199-
<?php
200-
} elseif ( is_home() ) {
201-
?>
199+
<?php
200+
} elseif ( is_home() ) {
201+
?>
202202
<link rel="alternate" type="<?php echo esc_attr( feed_content_type( 'mf2' ) ); ?>" href="<?php echo esc_url( get_feed_link( 'mf2' ) ); ?>" />
203203
<link rel="alternate" type="<?php echo esc_attr( feed_content_type( 'jf2' ) ); ?>" href="<?php echo esc_url( get_feed_link( 'jf2' ) ); ?>" />
204-
<?php
204+
<?php
205205
}
206206
}
207207
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0"?>
2-
<ruleset name="WordPress Indieauth">
3-
<description>WordPress Indieauth Standards</description>
2+
<ruleset name="WordPress MF2 Feed">
3+
<description>WordPress MF2 Feed Standards</description>
44

5-
<file>./indieauth.php</file>
5+
<file>./mf2-feed.php</file>
66
<file>./includes/</file>
77
<exclude-pattern>*/includes/*\.(inc|css|js|svg)</exclude-pattern>
88
<exclude-pattern>*/vendor/*</exclude-pattern>
99
<rule ref="PHPCompatibility"/>
10-
<config name="testVersion" value="5.3-"/>
10+
<config name="testVersion" value="5.6-"/>
1111
<rule ref="PHPCompatibilityWP"/>
12-
<config name="minimum_supported_wp_version" value="4.7"/>
12+
<config name="minimum_supported_wp_version" value="4.9"/>
1313
<rule ref="WordPress.WP.DeprecatedFunctions" />
1414
<rule ref="WordPress-Core" />
1515
<rule ref="WordPress.Files.FileName">
@@ -20,5 +20,5 @@
2020

2121
<rule ref="WordPress-Extra" />
2222
<rule ref="WordPress.WP.I18n"/>
23-
<config name="text_domain" value="indieauth,default"/>
23+
<config name="text_domain" value="mf2-feed,default"/>
2424
</ruleset>

0 commit comments

Comments
 (0)