Plugin Directory

Changeset 3290041


Ignore:
Timestamp:
05/08/2025 04:47:06 PM (11 months ago)
Author:
galbc
Message:

Release version 1.0.8

Location:
sapientseo
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sapientseo/tags/1.0.8/inc/api/posts.php

    r3289954 r3290041  
    215215
    216216// Get Post Details
     217// Get Post Details
    217218function sapient_seo_get_post_details(WP_REST_Request $request) {
    218219    $post_id = intval($request->get_param('id'));
     
    223224    }
    224225
     226    // ACF fields
    225227    $acf = function_exists('get_fields') ? get_fields($post_id) : [];
    226     $seo = [
    227         'meta_title'       => get_post_meta($post_id, 'meta_title', true),
    228         'meta_description' => get_post_meta($post_id, 'meta_description', true),
    229         // Add more keys if needed
    230     ];
     228
     229    // All Yoast SEO meta fields
     230    $all_meta = get_post_meta($post_id);
     231    $seo = [];
     232
     233    foreach ($all_meta as $key => $value) {
     234        if (strpos($key, '_yoast_wpseo_') === 0) {
     235            $seo[$key] = is_array($value) ? $value[0] : $value;
     236        }
     237    }
    231238
    232239    $categories = wp_get_post_categories($post_id, ['fields' => 'names']);
  • sapientseo/tags/1.0.8/readme.txt

    r3289954 r3290041  
    44Tested up to: 6.8
    55Requires PHP: 7.4
    6 Stable tag: 1.0.7
     6Stable tag: 1.0.8
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • sapientseo/tags/1.0.8/sapientseo.php

    r3289954 r3290041  
    33 * Plugin Name: SapientSEO
    44 * Description: Connect your WordPress site to SapientSEO using secure custom REST API endpoints.
    5  * Version: 1.0.7
     5 * Version: 1.0.8
    66 * Author: SapientSEO
    77 * Plugin URI: https://sapientseo.ai
  • sapientseo/trunk/inc/api/posts.php

    r3289954 r3290041  
    215215
    216216// Get Post Details
     217// Get Post Details
    217218function sapient_seo_get_post_details(WP_REST_Request $request) {
    218219    $post_id = intval($request->get_param('id'));
     
    223224    }
    224225
     226    // ACF fields
    225227    $acf = function_exists('get_fields') ? get_fields($post_id) : [];
    226     $seo = [
    227         'meta_title'       => get_post_meta($post_id, 'meta_title', true),
    228         'meta_description' => get_post_meta($post_id, 'meta_description', true),
    229         // Add more keys if needed
    230     ];
     228
     229    // All Yoast SEO meta fields
     230    $all_meta = get_post_meta($post_id);
     231    $seo = [];
     232
     233    foreach ($all_meta as $key => $value) {
     234        if (strpos($key, '_yoast_wpseo_') === 0) {
     235            $seo[$key] = is_array($value) ? $value[0] : $value;
     236        }
     237    }
    231238
    232239    $categories = wp_get_post_categories($post_id, ['fields' => 'names']);
  • sapientseo/trunk/readme.txt

    r3289954 r3290041  
    44Tested up to: 6.8
    55Requires PHP: 7.4
    6 Stable tag: 1.0.7
     6Stable tag: 1.0.8
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • sapientseo/trunk/sapientseo.php

    r3289954 r3290041  
    33 * Plugin Name: SapientSEO
    44 * Description: Connect your WordPress site to SapientSEO using secure custom REST API endpoints.
    5  * Version: 1.0.7
     5 * Version: 1.0.8
    66 * Author: SapientSEO
    77 * Plugin URI: https://sapientseo.ai
Note: See TracChangeset for help on using the changeset viewer.