Skip to content

Commit db21470

Browse files
committed
phpcbf
1 parent 289abb1 commit db21470

7 files changed

Lines changed: 14 additions & 27 deletions

includes/class-general-settings.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public static function register_settings() {
6565
'default' => 0,
6666
)
6767
);
68-
6968
}
7069

7170
public static function admin_settings() {
@@ -126,7 +125,6 @@ public static function admin_settings() {
126125
'disabled' => false,
127126
)
128127
);
129-
130128
}
131129

132130

includes/class-hcard-author-widget.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public function __construct() {
1919
'description' => __( 'A widget that allows you to display author profile marked up as an h-card', 'indieweb' ),
2020
)
2121
);
22-
2322
} // end constructor
2423

2524
/**
@@ -33,13 +32,11 @@ public function __construct() {
3332
public function widget( $args, $instance ) {
3433
if ( 1 === (int) get_option( 'iw_single_author' ) ) {
3534
$display_author = get_option( 'iw_default_author' );
36-
} else {
37-
if ( is_single() ) {
35+
} elseif ( is_single() ) {
3836
global $wp_query;
3937
$display_author = $wp_query->post->post_author;
40-
} else {
41-
return;
42-
}
38+
} else {
39+
return;
4340
}
4441

4542
$user_info = get_userdata( $display_author );

includes/class-hcard-user.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public static function rest_fields() {
202202
'user',
203203
'me',
204204
array(
205-
'get_callback' => function( $user, $attr, $request, $object_type ) {
205+
'get_callback' => function ( $user, $attr, $request, $object_type ) {
206206
return array_values( self::get_rel_me( $user['id'] ) );
207207
},
208208
)
@@ -211,7 +211,7 @@ public static function rest_fields() {
211211
'user',
212212
'first_name',
213213
array(
214-
'get_callback' => function( $user, $attr, $request, $object_type ) {
214+
'get_callback' => function ( $user, $attr, $request, $object_type ) {
215215
return get_user_meta( $user['id'], 'first_name' );
216216
},
217217
)
@@ -432,7 +432,7 @@ public static function get_hcard_display_defaults() {
432432
*/
433433
public static function get_template_file( $file_name ) {
434434
$theme_template_file = locate_template( 'templates/' . $file_name );
435-
return $theme_template_file ? $theme_template_file : dirname( __FILE__ ) . '/../templates/' . $file_name;
435+
return $theme_template_file ? $theme_template_file : __DIR__ . '/../templates/' . $file_name;
436436
}
437437

438438
public static function hcard( $user, $args = array() ) {

includes/class-plugin-installer.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public function start() {
2727
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) ); // Enqueue scripts and Localize
2828
add_action( 'wp_ajax_cnkt_plugin_installer', array( &$this, 'cnkt_plugin_installer' ) ); // Install plugin
2929
add_action( 'wp_ajax_cnkt_plugin_activation', array( &$this, 'cnkt_plugin_activation' ) ); // Activate plugin
30-
3130
}
3231

3332

@@ -231,7 +230,6 @@ public function cnkt_plugin_installer() {
231230
);
232231

233232
wp_send_json( $json );
234-
235233
}
236234

237235

@@ -303,7 +301,6 @@ public function cnkt_plugin_activation() {
303301
);
304302

305303
wp_send_json( $json );
306-
307304
}
308305

309306

@@ -388,7 +385,6 @@ public function enqueue_scripts() {
388385

389386
wp_enqueue_style( 'plugin-installer', CNKT_INSTALLER_PATH . 'static/css/installer.css', array(), IndieWeb_Plugin::$version );
390387
}
391-
392388
}
393389

394390

includes/class-relme-domain-icon-map.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,4 @@ public static function url_to_name( $url ) {
161161
$return = apply_filters( 'indieweb_links_url_to_name', $return, $url );
162162
return $return;
163163
}
164-
165164
}
166-

includes/simple-icons.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,6 @@ function simpleicons_iw_get_names() {
823823
'hackster' => 'Hackster',
824824
'handlebarsdotjs' => 'Handlebars.js',
825825
'handshake' => 'Handshake',
826-
'handshake' => 'Handshake',
827826
'happycow' => 'HappyCow',
828827
'harbor' => 'Harbor',
829828
'hashnode' => 'Hashnode',
@@ -845,7 +844,6 @@ function simpleicons_iw_get_names() {
845844
'hilton' => 'Hilton',
846845
'hitachi' => 'Hitachi',
847846
'hive' => 'Hive',
848-
'hive' => 'Hive',
849847
'homeassistant' => 'Home Assistant',
850848
'homeassistantcommunitystore' => 'Home Assistant Community Store',
851849
'homeadvisor' => 'HomeAdvisor',

indieweb.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,31 @@ public static function init() {
3535
// enable translation
3636
self::enable_translation();
3737

38-
require_once dirname( __FILE__ ) . '/includes/class-plugin-installer.php';
38+
require_once __DIR__ . '/includes/class-plugin-installer.php';
3939

4040
if ( INDIEWEB_ADD_HCARD_SUPPORT ) {
4141
// Require H-Card Enhancements to User Profile
4242

43-
require_once dirname( __FILE__ ) . '/includes/class-relme-domain-icon-map.php';
44-
require_once dirname( __FILE__ ) . '/includes/class-hcard-user.php';
45-
require_once dirname( __FILE__ ) . '/includes/class-hcard-author-widget.php';
43+
require_once __DIR__ . '/includes/class-relme-domain-icon-map.php';
44+
require_once __DIR__ . '/includes/class-hcard-user.php';
45+
require_once __DIR__ . '/includes/class-hcard-author-widget.php';
4646

4747
}
4848

4949
if ( INDIEWEB_ADD_RELME_SUPPORT ) {
5050
// Require Rel Me Widget Class
51-
require_once dirname( __FILE__ ) . '/includes/class-relme-widget.php';
51+
require_once __DIR__ . '/includes/class-relme-widget.php';
5252
}
5353

5454
add_action( 'wp_enqueue_scripts', array( 'IndieWeb_Plugin', 'enqueue_style' ) );
5555

5656
add_action( 'admin_enqueue_scripts', array( 'IndieWeb_Plugin', 'enqueue_admin_style' ) );
5757

5858
// Add General Settings Page
59-
require_once dirname( __FILE__ ) . '/includes/class-general-settings.php';
59+
require_once __DIR__ . '/includes/class-general-settings.php';
6060

6161
// Add third party integrations
62-
require_once dirname( __FILE__ ) . '/includes/class-integrations.php';
62+
require_once __DIR__ . '/includes/class-integrations.php';
6363

6464
// add menu
6565
add_action( 'admin_menu', array( 'IndieWeb_Plugin', 'add_menu_item' ), 9 );
@@ -136,7 +136,7 @@ public static function change_menu_title() {
136136
* Callback from `add_plugins_page()` that shows the "Getting Started" page.
137137
*/
138138
public static function getting_started() {
139-
require_once dirname( __FILE__ ) . '/includes/getting-started.php';
139+
require_once __DIR__ . '/includes/getting-started.php';
140140
}
141141

142142
public static function plugin_installer() {

0 commit comments

Comments
 (0)