Plugin Directory

Changeset 3290061


Ignore:
Timestamp:
05/08/2025 05:27:20 PM (11 months ago)
Author:
galbc
Message:

Release version 1.0.11

Location:
sapientseo
Files:
6 edited
1 copied

Legend:

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

    r3290053 r3290061  
    256256    }
    257257
    258     // ACF fields
    259     $acf = function_exists('get_fields') ? get_fields($post_id) : [];
    260 
    261     // Yoast SEO fields (if active)
     258    // Collect all ACF fields for this post type, even if not filled
     259    $acf = [];
     260    if (function_exists('acf_get_field_groups')) {
     261        $field_groups = acf_get_field_groups(['post_type' => $post->post_type]);
     262        foreach ($field_groups as $group) {
     263            $fields = acf_get_fields($group['key']);
     264            foreach ($fields as $field) {
     265                $acf[$field['name']] = get_field($field['name'], $post_id) ?? '';
     266            }
     267        }
     268    }
     269
     270    // SEO fields
    262271    $seo = sapientseo_collect_seo_fields($post_id);
    263 
    264     // Dynamically fetch all _yoast_wpseo_* meta fields even if not explicitly listed
    265272    $all_meta = get_post_meta($post_id);
    266273    foreach ($all_meta as $key => $value) {
  • sapientseo/tags/1.0.11/readme.txt

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

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

    r3290053 r3290061  
    256256    }
    257257
    258     // ACF fields
    259     $acf = function_exists('get_fields') ? get_fields($post_id) : [];
    260 
    261     // Yoast SEO fields (if active)
     258    // Collect all ACF fields for this post type, even if not filled
     259    $acf = [];
     260    if (function_exists('acf_get_field_groups')) {
     261        $field_groups = acf_get_field_groups(['post_type' => $post->post_type]);
     262        foreach ($field_groups as $group) {
     263            $fields = acf_get_fields($group['key']);
     264            foreach ($fields as $field) {
     265                $acf[$field['name']] = get_field($field['name'], $post_id) ?? '';
     266            }
     267        }
     268    }
     269
     270    // SEO fields
    262271    $seo = sapientseo_collect_seo_fields($post_id);
    263 
    264     // Dynamically fetch all _yoast_wpseo_* meta fields even if not explicitly listed
    265272    $all_meta = get_post_meta($post_id);
    266273    foreach ($all_meta as $key => $value) {
  • sapientseo/trunk/readme.txt

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

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