Changeset 3457244
- Timestamp:
- 02/09/2026 03:55:24 PM (8 weeks ago)
- Location:
- rank-authority
- Files:
-
- 6 added
- 2 edited
-
tags/1.0.15 (added)
-
tags/1.0.15/assets (added)
-
tags/1.0.15/assets/icon.svg (added)
-
tags/1.0.15/rank-authority.php (added)
-
tags/1.0.15/readme.txt (added)
-
tags/1.0.15/uninstall.php (added)
-
trunk/rank-authority.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rank-authority/trunk/rank-authority.php
r3450744 r3457244 4 4 * Plugin URI: https://rankauthority.com/plugins/rankauthority 5 5 * Description: Secure API connector to publish posts / overwrite posts from the RA Dashboard to WordPress. Token reset now available to all administrators. 6 * Version: 1.0.1 46 * Version: 1.0.15 7 7 * Author: Rank Authority 8 8 * Author URI: https://rankauthority.com … … 673 673 $website_id = get_option($this->option_website_id); 674 674 $token = get_option($this->option_token); 675 $plugin_version = get_file_data(__FILE__, array('Version' => 'Version'), false)['Version'] ?? '1.0.1 4';675 $plugin_version = get_file_data(__FILE__, array('Version' => 'Version'), false)['Version'] ?? '1.0.15'; 676 676 677 677 ?> … … 875 875 ]); 876 876 877 register_rest_route('ra/v1', '/check', [ 878 'methods' => 'POST', 879 'callback' => [$this, 'check_connection'], 880 'permission_callback' => [$this, 'authenticate'], 881 ]); 882 877 883 register_rest_route('ra/v1', '/post', [ 878 884 'methods' => 'POST', … … 958 964 'wp_version' => get_bloginfo('version'), 959 965 'website_id' => get_option($this->option_website_id) ?: null 966 ]; 967 } 968 969 /** Check connection - verify only, no registration */ 970 public function check_connection($request) { 971 // Get website_id from request body 972 $params = $request->get_json_params(); 973 $requested_website_id = !empty($params['website_id']) ? sanitize_text_field($params['website_id']) : null; 974 975 // Get current website_id 976 $current_website_id = get_option($this->option_website_id); 977 978 // Check if website_id matches 979 $is_connected = false; 980 if ($requested_website_id && $current_website_id) { 981 $is_connected = ($requested_website_id === $current_website_id); 982 } 983 984 return [ 985 'status' => $is_connected ? 'connected' : 'not_connected', 986 'site_name' => get_bloginfo('name'), 987 'site_url' => get_site_url(), 988 'wp_version' => get_bloginfo('version'), 989 'website_id' => $current_website_id ?: null, 990 'requested_website_id' => $requested_website_id, 991 'match' => $is_connected 960 992 ]; 961 993 } -
rank-authority/trunk/readme.txt
r3450744 r3457244 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.1 47 Stable tag: 1.0.15 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 137 137 138 138 == Changelog == 139 140 = 1.0.15 = 141 * Added new `/ra/v1/check` REST API endpoint for connection verification 142 * Connection check endpoint validates website_id without registration 143 * Improved connection verification workflow - can now check if a site is connected without modifying settings 144 * Enhanced API functionality with dedicated connection verification endpoint 139 145 140 146 = 1.0.14 = … … 233 239 == Upgrade Notice == 234 240 241 = 1.0.15 = 242 Added new connection check endpoint (`/ra/v1/check`) that allows you to verify if a website_id is connected without modifying any settings. This provides better workflow for connection verification. 243 235 244 = 1.0.14 = 236 245 Token reset functionality is now available to all administrators. Any user with manage_options capability can regenerate the connection token, providing better flexibility for team environments.
Note: See TracChangeset
for help on using the changeset viewer.