Skip to content

Commit ca1bf56

Browse files
PHPCS fixes
1 parent 8021bcf commit ca1bf56

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

wp-abilities-api-demo.php

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,43 @@
44
* Description: Demonstrates the WordPress Abilities API with various example abilities.
55
* Version: 1.0.1
66
* Requires Plugins: plugin-check
7+
*
8+
* @package WPAbilitiesAPIDemo
79
*/
10+
811
if ( ! defined( 'ABSPATH' ) ) {
912
exit; // Exit if accessed directly.
1013
}
1114

1215
if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
13-
// Composer dependencies are missing
14-
add_action( 'admin_notices', function() {
15-
?>
16-
<div class="notice notice-error">
17-
<p><?php esc_html_e( 'WP Abilities API Demo plugin requires Composer dependencies. Please run "composer install" in the plugin directory.', 'wp-abilities-api-demo' ); ?></p>
18-
</div>
19-
<?php
20-
} );
21-
return;
16+
// Composer dependencies are missing.
17+
add_action(
18+
'admin_notices',
19+
function () {
20+
?>
21+
<div class="notice notice-error">
22+
<p><?php esc_html_e( 'WP Abilities API Demo plugin requires Composer dependencies. Please run "composer install" in the plugin directory.', 'wp-abilities-api-demo' ); ?></p>
23+
</div>
24+
<?php
25+
}
26+
);
27+
return;
2228
}
2329

2430
require_once __DIR__ . '/vendor/autoload.php';
2531

26-
// Define debug constant for conditional logging
32+
// Define debug constant for conditional logging.
2733
if ( ! defined( 'WP_ABILITIES_API_DEMO_DEBUG' ) ) {
2834
define( 'WP_ABILITIES_API_DEMO_DEBUG', false );
2935
}
3036

31-
// Include ability files
37+
// Include ability files.
3238
require_once __DIR__ . '/includes/category-abilities-api-demo.php';
3339
require_once __DIR__ . '/includes/ability-site-info.php';
3440
require_once __DIR__ . '/includes/ability-get-plugins.php';
3541
require_once __DIR__ . '/includes/ability-debug-log.php';
3642
require_once __DIR__ . '/includes/ability-create-post.php';
3743
require_once __DIR__ . '/includes/ability-check-security.php';
3844

39-
// Include admin page
40-
require_once __DIR__ . '/admin/abilities-demo-page.php';
45+
// Include admin page.
46+
require_once __DIR__ . '/admin/abilities-demo-page.php';

0 commit comments

Comments
 (0)