phpcbf fixes
This commit is contained in:
parent
be96b19781
commit
3512206d48
6 changed files with 8 additions and 10 deletions
|
@ -64,7 +64,7 @@ function init() {
|
||||||
*/
|
*/
|
||||||
spl_autoload_register(
|
spl_autoload_register(
|
||||||
function ( $full_class ) {
|
function ( $full_class ) {
|
||||||
$base_dir = \dirname( __FILE__ ) . '/includes/';
|
$base_dir = __DIR__ . '/includes/';
|
||||||
$base = 'activitypub';
|
$base = 'activitypub';
|
||||||
|
|
||||||
$class = strtolower( $full_class );
|
$class = strtolower( $full_class );
|
||||||
|
@ -92,14 +92,14 @@ spl_autoload_register(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
require_once \dirname( __FILE__ ) . '/includes/functions.php';
|
require_once __DIR__ . '/includes/functions.php';
|
||||||
|
|
||||||
// load NodeInfo endpoints only if blog is public
|
// load NodeInfo endpoints only if blog is public
|
||||||
if ( \get_option( 'blog_public', 1 ) ) {
|
if ( \get_option( 'blog_public', 1 ) ) {
|
||||||
Rest\NodeInfo::init();
|
Rest\NodeInfo::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
$debug_file = \dirname( __FILE__ ) . '/includes/debug.php';
|
$debug_file = __DIR__ . '/includes/debug.php';
|
||||||
if ( \WP_DEBUG && file_exists( $debug_file ) && is_readable( $debug_file ) ) {
|
if ( \WP_DEBUG && file_exists( $debug_file ) && is_readable( $debug_file ) ) {
|
||||||
require_once $debug_file;
|
require_once $debug_file;
|
||||||
Debug::init();
|
Debug::init();
|
||||||
|
@ -150,7 +150,7 @@ function plugin_settings_link( $actions ) {
|
||||||
add_action(
|
add_action(
|
||||||
'bp_include',
|
'bp_include',
|
||||||
function() {
|
function() {
|
||||||
require_once \dirname( __FILE__ ) . '/integration/class-buddypress.php';
|
require_once __DIR__ . '/integration/class-buddypress.php';
|
||||||
Integration\Buddypress::init();
|
Integration\Buddypress::init();
|
||||||
},
|
},
|
||||||
0
|
0
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
"vendor/bin/phpunit"
|
"vendor/bin/phpunit"
|
||||||
],
|
],
|
||||||
"lint": [
|
"lint": [
|
||||||
"vendor/bin/phpcs"
|
"vendor/bin/phpcs -n -q"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,6 +151,5 @@ class Mention {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $mentions;
|
return $mentions;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,6 @@ class Shortcodes {
|
||||||
}
|
}
|
||||||
|
|
||||||
return \wp_strip_all_tags( \get_the_title( $item->ID ), true );
|
return \wp_strip_all_tags( \get_the_title( $item->ID ), true );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -187,7 +187,7 @@ class Post {
|
||||||
// list post thumbnail first if this post has one
|
// list post thumbnail first if this post has one
|
||||||
if ( \function_exists( 'has_post_thumbnail' ) && \has_post_thumbnail( $id ) ) {
|
if ( \function_exists( 'has_post_thumbnail' ) && \has_post_thumbnail( $id ) ) {
|
||||||
$image_ids[] = \get_post_thumbnail_id( $id );
|
$image_ids[] = \get_post_thumbnail_id( $id );
|
||||||
$max_images--;
|
--$max_images;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $max_images > 0 ) {
|
if ( $max_images > 0 ) {
|
||||||
|
|
Loading…
Reference in a new issue