Changeset 3297636
- Timestamp:
- 05/20/2025 08:03:11 PM (11 months ago)
- Location:
- sapientseo
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.29 (copied) (copied from sapientseo/trunk)
-
tags/1.0.29/inc/api/posts.php (modified) (2 diffs)
-
tags/1.0.29/readme.txt (modified) (1 diff)
-
tags/1.0.29/sapientseo.php (modified) (3 diffs)
-
trunk/inc/api/posts.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/sapientseo.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sapientseo/tags/1.0.29/inc/api/posts.php
r3297616 r3297636 285 285 286 286 if ($field['type'] === 'image' && is_numeric($value)) { 287 $acf [$field['name']]= [287 $acf->{$field['name']} = [ 288 288 'id' => $value, 289 289 'url' => wp_get_attachment_url($value), … … 291 291 ]; 292 292 } else { 293 $acf [$field['name']]= $value ?? '';293 $acf->{$field['name']} = $value ?? ''; 294 294 } 295 295 } -
sapientseo/tags/1.0.29/readme.txt
r3297616 r3297636 4 4 Tested up to: 6.8 5 5 Requires PHP: 7.4 6 Stable tag: 1.0.2 86 Stable tag: 1.0.29 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
sapientseo/tags/1.0.29/sapientseo.php
r3297616 r3297636 3 3 * Plugin Name: SapientSEO 4 4 * Description: Connect your WordPress site to SapientSEO using secure custom REST API endpoints. 5 * Version: 1.0.2 85 * Version: 1.0.29 6 6 * Author: SapientSEO 7 7 * Plugin URI: https://sapientseo.ai … … 33 33 34 34 /** 35 * All REST endpoints use either permission callbacks or secure header validation (X-API-KEY) via sapient_seo_api_key_permission(). 36 */ 37 38 /** 39 * Prevent full-page caching for SapientSEO REST API endpoints. 35 * Prevent full-page caching for SapientSEO REST API endpoints (HTML rendering). 40 36 */ 41 37 add_action('template_redirect', 'sapientseo_template_redirect', 0); … … 47 43 } 48 44 } 45 46 /** 47 * Prevent REST API response caching for SapientSEO endpoints. 48 */ 49 add_filter('rest_post_dispatch', function ($response, $server, $request) { 50 if (strpos($request->get_route(), '/sapientseo/v1/') !== false) { 51 if (is_object($response) && method_exists($response, 'header')) { 52 $response->header('Cache-Control', 'no-cache, must-revalidate, max-age=0'); 53 $response->header('Pragma', 'no-cache'); 54 $response->header('Expires', '0'); 55 } 56 } 57 return $response; 58 }, 10, 3); -
sapientseo/trunk/inc/api/posts.php
r3297616 r3297636 285 285 286 286 if ($field['type'] === 'image' && is_numeric($value)) { 287 $acf [$field['name']]= [287 $acf->{$field['name']} = [ 288 288 'id' => $value, 289 289 'url' => wp_get_attachment_url($value), … … 291 291 ]; 292 292 } else { 293 $acf [$field['name']]= $value ?? '';293 $acf->{$field['name']} = $value ?? ''; 294 294 } 295 295 } -
sapientseo/trunk/readme.txt
r3297616 r3297636 4 4 Tested up to: 6.8 5 5 Requires PHP: 7.4 6 Stable tag: 1.0.2 86 Stable tag: 1.0.29 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
sapientseo/trunk/sapientseo.php
r3297616 r3297636 3 3 * Plugin Name: SapientSEO 4 4 * Description: Connect your WordPress site to SapientSEO using secure custom REST API endpoints. 5 * Version: 1.0.2 85 * Version: 1.0.29 6 6 * Author: SapientSEO 7 7 * Plugin URI: https://sapientseo.ai … … 33 33 34 34 /** 35 * All REST endpoints use either permission callbacks or secure header validation (X-API-KEY) via sapient_seo_api_key_permission(). 36 */ 37 38 /** 39 * Prevent full-page caching for SapientSEO REST API endpoints. 35 * Prevent full-page caching for SapientSEO REST API endpoints (HTML rendering). 40 36 */ 41 37 add_action('template_redirect', 'sapientseo_template_redirect', 0); … … 47 43 } 48 44 } 45 46 /** 47 * Prevent REST API response caching for SapientSEO endpoints. 48 */ 49 add_filter('rest_post_dispatch', function ($response, $server, $request) { 50 if (strpos($request->get_route(), '/sapientseo/v1/') !== false) { 51 if (is_object($response) && method_exists($response, 'header')) { 52 $response->header('Cache-Control', 'no-cache, must-revalidate, max-age=0'); 53 $response->header('Pragma', 'no-cache'); 54 $response->header('Expires', '0'); 55 } 56 } 57 return $response; 58 }, 10, 3);
Note: See TracChangeset
for help on using the changeset viewer.