Plugin Directory

Changeset 3295481


Ignore:
Timestamp:
05/18/2025 12:23:59 AM (11 months ago)
Author:
galbc
Message:

Release version 1.0.26

Location:
sapientseo
Files:
6 edited
1 copied

Legend:

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

    r3295473 r3295481  
    282282            $fields = acf_get_fields($group['key']);
    283283            foreach ($fields as $field) {
    284                 $acf[$field['name']] = get_field($field['name'], $post_id) ?? '';
     284                $value = get_field($field['name'], $post_id);
     285
     286                if ($field['type'] === 'image' && is_numeric($value)) {
     287                    $acf[$field['name']] = [
     288                        'id'  => $value,
     289                        'url' => wp_get_attachment_url($value),
     290                        'alt' => get_post_meta($value, '_wp_attachment_image_alt', true) ?: '',
     291                    ];
     292                } else {
     293                    $acf[$field['name']] = $value ?? '';
     294                }
    285295            }
    286296        }
     
    314324        'categories'     => $categories,
    315325        'tags'           => $tags,
    316         'featured_image' => get_the_post_thumbnail_url($post_id, 'full') ?? '',
     326        'featured_image' => has_post_thumbnail($post_id) ? [
     327            'id'  => get_post_thumbnail_id($post_id),
     328            'url' => get_the_post_thumbnail_url($post_id, 'full'),
     329        ] : null,
    317330    ]);
    318331}
  • sapientseo/tags/1.0.26/readme.txt

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

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

    r3295473 r3295481  
    282282            $fields = acf_get_fields($group['key']);
    283283            foreach ($fields as $field) {
    284                 $acf[$field['name']] = get_field($field['name'], $post_id) ?? '';
     284                $value = get_field($field['name'], $post_id);
     285
     286                if ($field['type'] === 'image' && is_numeric($value)) {
     287                    $acf[$field['name']] = [
     288                        'id'  => $value,
     289                        'url' => wp_get_attachment_url($value),
     290                        'alt' => get_post_meta($value, '_wp_attachment_image_alt', true) ?: '',
     291                    ];
     292                } else {
     293                    $acf[$field['name']] = $value ?? '';
     294                }
    285295            }
    286296        }
     
    314324        'categories'     => $categories,
    315325        'tags'           => $tags,
    316         'featured_image' => get_the_post_thumbnail_url($post_id, 'full') ?? '',
     326        'featured_image' => has_post_thumbnail($post_id) ? [
     327            'id'  => get_post_thumbnail_id($post_id),
     328            'url' => get_the_post_thumbnail_url($post_id, 'full'),
     329        ] : null,
    317330    ]);
    318331}
  • sapientseo/trunk/readme.txt

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

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