fix: read logo from provider user meta instead of job post meta

The logo is stored as `ddhh_provider_logo` on the post author (provider),
not as `job_logo` on the job post. This matches the existing logic in
class-template.php.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 13:09:28 +09:00
parent f0de02ca94
commit 346ef5097b

View File

@@ -1,10 +1,13 @@
<?php
/**
* Elementor dynamic tag: Logo (job_logo).
* Elementor dynamic tag: Logo.
*
* Extends Data_Tag to return image data (id + url) for use in
* Image widgets and other image-accepting controls.
*
* The logo is stored on the provider (post author) as user meta
* `ddhh_provider_logo`, not on the job post itself.
*
* @package DDHH_Job_Manager
*/
@@ -39,7 +42,8 @@ class DDHH_JM_Tag_Job_Logo extends \Elementor\Core\DynamicTags\Data_Tag {
}
public function get_value( array $options = array() ): array {
$image_id = get_post_meta( get_the_ID(), 'job_logo', true );
$post = get_post( get_the_ID() );
$image_id = $post ? get_user_meta( $post->post_author, 'ddhh_provider_logo', true ) : '';
if ( $image_id ) {
$url = wp_get_attachment_image_url( $image_id, 'full' );