Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<p align="center">
<a href="https://github.com/Attributes-PHP/wp-fastendpoints-depends/actions"><img alt="GitHub Actions Workflow Status (main)" src="https://img.shields.io/github/actions/workflow/status/Attributes-PHP/wp-fastendpoints-depends/tests.yml"></a>
<a href="https://codecov.io/gh/Attributes-PHP/wp-fastendpoints-depends" ><img alt="Code Coverage" src="https://codecov.io/gh/Attributes-PHP/wp-fastendpoints-depends/graph/badge.svg?token=8N7N9NMGLG"/></a>
<a href="https://en-gb.wordpress.org/plugins/fastendpoints-depends/"><img alt="WordPress Plugin Version" src="https://img.shields.io/wordpress/plugin/v/fastendpoints-depends"></a>
<a href="https://packagist.org/packages/Attributes-PHP/wp-fastendpoints"><img alt="Supported WordPress Versions" src="https://img.shields.io/badge/6.x-versions?logo=wordpress&label=versions"></a>
<a href="https://opensource.org/licenses/MIT"><img alt="Software License" src="https://img.shields.io/badge/Licence-MIT-brightgreen"></a>
</p>
Expand Down Expand Up @@ -37,7 +36,7 @@

### Using standard WordPress structure

1. Download plugin from WordPress store
1. Download latest plugin from our [Releases](https://github.com/Attributes-PHP/wp-fastendpoints-depends/releases) page
2. Install plugin as a [MU-plugin](https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/)
3. Run the following WP CLI command `wp fastendpoints depends` or activate any plugin on the website
4. Enjoy 😊
Expand Down
4 changes: 4 additions & 0 deletions fastendpoints-depends.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
use Attributes\Wp\FastEndpoints\Depends\DependenciesGenerator;
use Attributes\Wp\FastEndpoints\Depends\DependsAutoloader;

if (! defined('ABSPATH')) {
exit;
}

$composer = __DIR__.'/vendor/autoload.php';
if (! file_exists($composer)) {
wp_die(
Expand Down
4 changes: 4 additions & 0 deletions src/DependenciesGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

use WP_CLI;

if (! defined('ABSPATH')) {
exit;
}

/**
* Holds logic to update the FastEndpoint dependencies
*
Expand Down
4 changes: 4 additions & 0 deletions src/DependsAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

use WP_Rewrite;

if (! defined('ABSPATH')) {
exit;
}

/**
* Holds logic to load plugins as dependencies for REST endpoints
*
Expand Down
4 changes: 4 additions & 0 deletions src/DependsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

use WP_CLI;

if (! defined('ABSPATH')) {
exit;
}

/**
* Manages REST endpoint dependencies
*
Expand Down
2 changes: 2 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* integration tests.
*/
if (! Helpers::isIntegrationTest()) {
define('ABSPATH', __FILE__.'/fastendpoints-depends/wp/src/');

return;
}

Expand Down