Sync your WordPress posts to standard.site records on your PDS
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix issues raised by plugin checker

+65 -9
+7 -3
includes/API.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class API 12 16 { 13 17 /** ··· 88 92 $status_code = wp_remote_retrieve_response_code($response); 89 93 $body = json_decode(wp_remote_retrieve_body($response), true); 90 94 91 - return $this->maybe_error($status_code, $body, "api_error", "API request failed."); 95 + return $this->maybe_error($status_code, $body, "api_error", __("API request failed.", "wireservice")); 92 96 } 93 97 94 98 /** ··· 161 165 return $this->pds_request($method, $endpoint, $original_args, $response_nonce); 162 166 } 163 167 164 - return $this->maybe_error($status_code, $body, "pds_error", "PDS request failed."); 168 + return $this->maybe_error($status_code, $body, "pds_error", __("PDS request failed.", "wireservice")); 165 169 } 166 170 167 171 /** ··· 526 530 ) { 527 531 if ($status_code >= 400) { 528 532 $error_message = $body["error"] 529 - ?? ($body["message"] ?? __($default_msg, "wireservice")); 533 + ?? ($body["message"] ?? $default_msg); 530 534 return new \WP_Error($error_code, $error_message, [ 531 535 "status" => $status_code, 532 536 ]);
+5
includes/Admin.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class Admin 12 16 { 13 17 /** ··· 92 96 "nonce" => wp_create_nonce("wireservice_backfill"), 93 97 ]); 94 98 99 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only tab navigation. 95 100 $active_tab = isset($_GET["tab"]) ? sanitize_key($_GET["tab"]) : "settings"; 96 101 97 102 if ($active_tab === "records") {
+4
includes/AtUri.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class AtUri 12 16 { 13 17 /**
+4
includes/ConnectionsManager.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class ConnectionsManager 12 16 { 13 17 /**
+4
includes/DPoP.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 use danielburger1337\OAuth2\DPoP\DPoPProofFactory; 12 16 use danielburger1337\OAuth2\DPoP\Encoder\WebTokenFrameworkDPoPTokenEncoder; 13 17 use danielburger1337\OAuth2\DPoP\Model\AccessTokenModel;
+4
includes/Document.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class Document 12 16 { 13 17 /**
+4
includes/Encryption.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class Encryption 12 16 { 13 17 /**
+4
includes/Endpoints/ConnectionsController.php
··· 8 8 9 9 namespace Wireservice\Endpoints; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 use Wireservice\ConnectionsManager; 12 16 use Wireservice\API; 13 17 use WP_REST_Controller;
+4
includes/NonceStorage.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 use danielburger1337\OAuth2\DPoP\NonceStorage\NonceStorageInterface; 12 16 13 17 class NonceStorage implements NonceStorageInterface
+4
includes/Publication.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class Publication 12 16 { 13 17 /**
+6
includes/Setup.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class Setup 12 16 { 13 17 private ConnectionsManager $connections_manager; ··· 476 480 callable $sanitizer, 477 481 bool $allow_falsy = false, 478 482 ): void { 483 + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in save_document_meta_box(). 479 484 if (!isset($_POST[$post_key])) { 480 485 return; 481 486 } 482 487 488 + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified in caller; value sanitized by $sanitizer. 483 489 $value = $sanitizer(wp_unslash($_POST[$post_key])); 484 490 $is_empty = $allow_falsy ? $value === "" : empty($value); 485 491
+4
includes/SourceOptions.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class SourceOptions 12 16 { 13 17 /**
+4
includes/Yoast.php
··· 8 8 9 9 namespace Wireservice; 10 10 11 + if (! defined('ABSPATH')) { 12 + exit; 13 + } 14 + 11 15 class Yoast 12 16 { 13 17 /**
+6 -5
templates/settings-page.php
··· 42 42 <div class="wrap"> 43 43 <h1><?php echo esc_html(get_admin_page_title()); ?></h1> 44 44 45 - <?php $active_tab = isset($_GET["tab"]) ? sanitize_key($_GET["tab"]) : "settings"; ?> 45 + <?php // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only tab navigation. 46 + $active_tab = isset($_GET["tab"]) ? sanitize_key($_GET["tab"]) : "settings"; ?> 46 47 <nav class="nav-tab-wrapper"> 47 48 <a href="<?php echo esc_url(admin_url("options-general.php?page=wireservice&tab=settings")); ?>" 48 49 class="nav-tab <?php echo $active_tab === "settings" ? "nav-tab-active" : ""; ?>"> ··· 68 69 <strong class="wireservice-display-name">Connected to @<?php echo esc_html($session["handle"]); ?></strong> 69 70 </div> 70 71 </div> 71 - <?php 72 - /* translators: %s: user handle */ 73 - else: ?> 72 + <?php else: ?> 74 73 <p> 75 - <?php printf( 74 + <?php 75 + printf( 76 + /* translators: %s: user handle */ 76 77 esc_html__("Connected as: %s", "wireservice"), 77 78 "<strong>" . esc_html($connection["handle"] ?? "Unknown") . "</strong>", 78 79 ); ?>
+1 -1
wireservice.php
··· 35 35 "Wireservice requires WordPress %s or higher.", 36 36 "wireservice", 37 37 ), 38 - WIRESERVICE_MIN_WP_VERSION, 38 + esc_html(WIRESERVICE_MIN_WP_VERSION), 39 39 ), 40 40 ); 41 41 });