From 0aa326885b397d6e6b5452910d5c22d12b96ff4d Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 11 Jun 2024 14:14:44 +0200 Subject: [PATCH] Fix php 5.6 and 7.0 syntax checks --- admin/network-options.php | 12 ++++-------- admin/webhook-settings.php | 14 +++++--------- docs/FORMATTING.md | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/admin/network-options.php b/admin/network-options.php index a5cee4de..3bba3ff5 100644 --- a/admin/network-options.php +++ b/admin/network-options.php @@ -456,14 +456,10 @@ public function webhook_match_user_email_checkbox() { * Outputs markup for webhook-secret input. */ public function webhook_secret_input() { - $description = sprintf( - // translators: Webhook secret input. Placeholder: discourse_webhooks_url. - __( - 'String of text at least 12 characters long.', - 'wp-discourse' - ), - ); - + $description = __( + 'String of text at least 12 characters long.', + 'wp-discourse' + ); $this->input( 'webhook-secret', $description ); } diff --git a/admin/webhook-settings.php b/admin/webhook-settings.php index b019d44b..075733c5 100644 --- a/admin/webhook-settings.php +++ b/admin/webhook-settings.php @@ -256,14 +256,10 @@ public function webhook_match_user_email_checkbox() { * Outputs markup for webhook-secret input. */ public function webhook_secret_input() { - $description = sprintf( - // translators: Webhook secret input. - __( - 'String of text at least 12 characters long.', - 'wp-discourse' - ), - ); - + $description = __( + 'String of text at least 12 characters long.', + 'wp-discourse' + ); $this->form_helper->input( 'webhook-secret', 'discourse_webhook', $description ); } @@ -286,7 +282,7 @@ public function verbose_webhook_logs() { * Details for the 'webhook_options' tab. */ public function webhook_settings_tab_details() { - $setup_howto_url = 'https://meta.discourse.org/t/wp-discourse-plugin-installation-and-setup/50752'; + $setup_howto_url = 'https://meta.discourse.org/t/311552'; ?>

diff --git a/docs/FORMATTING.md b/docs/FORMATTING.md index cb814bdf..4c6d873b 100644 --- a/docs/FORMATTING.md +++ b/docs/FORMATTING.md @@ -26,7 +26,7 @@ All errors must be addressed, and all warnings should be addressed as far as pos The ``.github/workflows/ci.yml`` applies a syntax check for each supported version of PHP by searching for all ``.php`` files in the repository, running the relevant version of the PHP interpreter, and catching syntax errors via ``xargs``: ``` -find -L . -name '*.php' -not -path "./vendor/*" -print0 | xargs -0 -n 1 -P 4 php -l +find -L . -name '*.php' -not -path "./vendor/*" -not -path "./tests/*" -print0 | xargs -0 -n 1 -P 4 php -l ``` To perform this locally: