You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wp-abilities-api-demo.php
+19-13Lines changed: 19 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -4,37 +4,43 @@
4
4
* Description: Demonstrates the WordPress Abilities API with various example abilities.
5
5
* Version: 1.0.1
6
6
* Requires Plugins: plugin-check
7
+
*
8
+
* @package WPAbilitiesAPIDemo
7
9
*/
10
+
8
11
if ( ! defined( 'ABSPATH' ) ) {
9
12
exit; // Exit if accessed directly.
10
13
}
11
14
12
15
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><?phpesc_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><?phpesc_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;
22
28
}
23
29
24
30
require_once__DIR__ . '/vendor/autoload.php';
25
31
26
-
// Define debug constant for conditional logging
32
+
// Define debug constant for conditional logging.
27
33
if ( ! defined( 'WP_ABILITIES_API_DEMO_DEBUG' ) ) {
0 commit comments