Skip to content

Commit

Permalink
Merge pull request #201 from plausible/remove_abspath
Browse files Browse the repository at this point in the history
Removed ABSPATH check from all files.
  • Loading branch information
Dan0sz authored Apr 16, 2024
2 parents 1da82a6 + b9d75e1 commit 7e06392
Show file tree
Hide file tree
Showing 19 changed files with 6 additions and 41 deletions.
2 changes: 0 additions & 2 deletions src/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Plausible\Analytics\WP;

defined( 'ABSPATH' ) || exit;

class Actions {
/**
* Constructor.
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

use Plausible\Analytics\WP\Helpers;

defined( 'ABSPATH' ) || exit;

class Actions {
/**
* Constructor.
Expand Down
11 changes: 6 additions & 5 deletions src/Admin/Filters.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
/**
* Plausible Analytics | Admin Filters.
*
* @since 1.0.0
* @package WordPress
* @subpackage Plausible Analytics
*/

namespace Plausible\Analytics\WP\Admin;

defined( 'ABSPATH' ) || exit;

class Filters {
/**
* Constructor.
*
* @since 1.0.0
* @return void
*/
Expand All @@ -34,9 +34,9 @@ public function add_admin_footer_text( $footer_text ) {
if ( true === stristr( $current_screen->base, 'plausible-analytics' ) ) {
return sprintf(
/* translators: %s: Link to 5 star rating */ __(
'If you like <strong>Plausible Analytics</strong> please leave us a %s rating. It takes a minute and helps a lot. Thanks in advance!',
'plausible-analytics'
),
'If you like <strong>Plausible Analytics</strong> please leave us a %s rating. It takes a minute and helps a lot. Thanks in advance!',
'plausible-analytics'
),
'<a href="https://wordpress.org/support/view/plugin-reviews/plausible-analytics?filter=5#postform" target="_blank" class="plausible-analytics-rating-link" style="text-decoration:none;" data-rated="' .
esc_attr__( 'Thanks :)', 'plausible-analytics' ) .
'">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
Expand All @@ -48,6 +48,7 @@ public function add_admin_footer_text( $footer_text ) {

/**
* Plugin page action links.
*
* @since 1.0.0
*
* @param array $actions An array of plugin action links.
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Plausible\Analytics\WP\Admin;

defined( 'ABSPATH' ) || exit;

/**
* This class provides an alternative to the JS/Client approach to display error/notice messages in the Admin interface.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Exception;
use Plausible\Analytics\WP\Helpers;

defined( 'ABSPATH' ) || exit;

class Module {
/**
* Build properties.
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Provisioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Plausible\Analytics\WP\Client;
use Plausible\Analytics\WP\Client\ApiException;

defined( 'ABSPATH' ) || exit;

class Provisioning {
/**
* @var Client $client
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Settings/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

use Plausible\Analytics\WP\Helpers;

defined( 'ABSPATH' ) || exit;

/**
* @codeCoverageIgnore
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Settings/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

use Plausible\Analytics\WP\Helpers;

defined( 'ABSPATH' ) || exit;

/**
* @codeCoverageIgnore
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Settings/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
use Exception;
use Plausible\Analytics\WP\Helpers;

defined( 'ABSPATH' ) || exit;

class Page extends API {
const OPTION_NOT_AVAILABLE_IN_CE_HOOK = [
[
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Upgrades.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Exception;
use Plausible\Analytics\WP\Helpers;

defined( 'ABSPATH' ) || exit;

/**
* Class Upgrades
*
Expand Down
2 changes: 0 additions & 2 deletions src/Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
use Plausible\Analytics\WP\Admin\Settings\Page;
use Plausible\Analytics\WP\Client\ApiException;

defined( 'ABSPATH' ) || exit;

class Ajax {
/**
* Build class.
Expand Down
2 changes: 0 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
use Plausible\Analytics\WP\Client\Model\UnauthorizedError;
use Plausible\Analytics\WP\Client\Model\UnprocessableEntityError;

defined( 'ABSPATH' ) || exit;

/**
* This class acts as middleware between our OpenAPI generated API client and our WP plugin, and takes care of setting
* the required credentials, so we can use the API in a unified manner.
Expand Down
2 changes: 0 additions & 2 deletions src/Compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

use Exception;

defined( 'ABSPATH' ) || exit;

class Compatibility {
/**
* A list of filters and actions to prevent our script from being manipulated by other plugins, known to cause issues.
Expand Down
2 changes: 0 additions & 2 deletions src/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use WpOrg\Requests\Exception\InvalidArgument;
use Exception;

defined( 'ABSPATH' ) || exit;

class Cron {
/**
* Build class
Expand Down
2 changes: 0 additions & 2 deletions src/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use WP_Term;
use Exception;

defined( 'ABSPATH' ) || exit;

class Filters {
/**
* Constructor.
Expand Down
2 changes: 0 additions & 2 deletions src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Exception;
use WpOrg\Requests\Exception\InvalidArgument;

defined( 'ABSPATH' ) || exit;

class Helpers {
/**
* Get Analytics URL.
Expand Down
2 changes: 0 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Plausible\Analytics\WP;

defined( 'ABSPATH' ) || exit;

/**
* Loads and registers plugin functionality through WordPress hooks.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

use Exception;

defined( 'ABSPATH' ) || exit;

class Proxy {
/**
* Proxy IP Headers used to detect the visitors IP prior to sending the data to Plausible's Measurement Protocol.
Expand Down
2 changes: 0 additions & 2 deletions src/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Plausible\Analytics\WP;

defined( 'ABSPATH' ) || exit;

class Setup {
/**
* Cron job handle
Expand Down

0 comments on commit 7e06392

Please sign in to comment.