Skip to content
Open
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
4 changes: 4 additions & 0 deletions plugins/wpgraphql-logging/activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

use WPGraphQL\Logging\Plugin;

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

/**
* Runs when the plugin is activated.
*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/wpgraphql-logging/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wpengine/wpgraphql-logging",
"type": "wordpress-plugin",
"description": "A plugin for logging WPGraphQL request lifecycle tp help with debugging and performance analysis for WPGraphQL queries.",
"license": "GPLv2 or later",
"license": "GPL-2.0-or-later",
"version": "1.0.1",
"authors": [
{
Expand Down
4 changes: 4 additions & 0 deletions plugins/wpgraphql-logging/deactivation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

use WPGraphQL\Logging\Plugin;

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

/**
* Runs when the plugin is deactivated.
*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/wpgraphql-logging/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tested up to: 6.9
Requires PHP: 8.1.2
Requires WPGraphQL: 2.3.0
Stable tag: 1.0.1
License: GPL-2.0-or-later
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WPGraphQL Logging plugin provides observability and visibility into the GraphQL request and event lifecycle. This allows users to quickly identify and resolve performance issues and bottlenecks within their headless WordPress application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
use WPGraphQL\Logging\Admin\Settings\Fields\Tab\BasicConfigurationTab;
use WPGraphQL\Logging\Admin\Settings\Fields\Tab\DataManagementTab;

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

$wpgraphql_logging_configuration_helper = ConfigurationHelper::get_instance();
$wpgraphql_logging_tabs_config = (array) get_query_var( 'wpgraphql_logging_main_page_config' );
$wpgraphql_logging_current_tab = (string) ( $wpgraphql_logging_tabs_config['current_tab'] ?? '' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function generate_csv( int $log_id ): void {
$content = $this->get_content( $log );
$writer->insertOne( $headers );
$writer->insertOne( $content );
fclose( $output );
fclose( $output ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Closes the php://output stream, which WP_Filesystem can't handle.
exit;
}

Expand Down
4 changes: 4 additions & 0 deletions plugins/wpgraphql-logging/src/Admin/View/List/ListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
use WPGraphQL\Logging\Logger\Database\WordPressDatabaseEntity;
use WP_List_Table;

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

// Include the WP_List_Table class if not already loaded.
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

use WPGraphQL\Logging\Admin\AdminNotice;

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

$wpgraphql_logging_key = AdminNotice::ADMIN_NOTICE_KEY;
$wpgraphql_logging_ajax_nonce = wp_create_nonce( $wpgraphql_logging_key );
$wpgraphql_logging_notice = __( "Heads up! While very useful for debugging, the WPGraphQL Logging Plugin can impact your site's performance under heavy usage, so please use it judiciously.", 'wpgraphql-logging' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
*
* @since 0.0.1
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="wrap">
<div class="wpgraphql-logging-view-header">
Expand Down
2 changes: 1 addition & 1 deletion plugins/wpgraphql-logging/wpgraphql-logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Domain Path: /languages
* Requires at least: 6.5
* Tested up to: 6.9
* Requires PHP: 8.1.2+
* Requires PHP: 8.1.2
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Requires Plugins: wp-graphql
Expand Down
Loading