Skip to content

Commit

Permalink
Fix php 5.6 and 7.0 syntax checks
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Jun 11, 2024
1 parent 9c1150a commit 0aa3268
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
12 changes: 4 additions & 8 deletions admin/network-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down
14 changes: 5 additions & 9 deletions admin/webhook-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand All @@ -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';
?>
<p class="wpdc-options-documentation">
<em>
Expand Down
2 changes: 1 addition & 1 deletion docs/FORMATTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0aa3268

Please sign in to comment.