fixed company-head shortcode

This commit is contained in:
2026-03-14 12:52:18 +01:00
parent fdc2498bf4
commit cdc45c2114
3 changed files with 9 additions and 6 deletions

View File

@@ -9,7 +9,7 @@
* Plugin Name: PartnerExpo Core * Plugin Name: PartnerExpo Core
* Plugin URI: https://partnerexpo.eu * Plugin URI: https://partnerexpo.eu
* Description: A PartnerEXPO oldal belső pluginja * Description: A PartnerEXPO oldal belső pluginja
* Version: 1.1.7 * Version: 1.1.8
* Author: Juhász Levente * Author: Juhász Levente
* Author URI: https://github.com/Duskell/ * Author URI: https://github.com/Duskell/
* License: GPL-2.0+ * License: GPL-2.0+
@@ -23,7 +23,7 @@ if ( ! defined( 'WPINC' ) ) {
die; die;
} }
define( 'PARTNEREXPO_CORE_VERSION', '1.1.7' ); define( 'PARTNEREXPO_CORE_VERSION', '1.1.8' );
function activate_partnerexpo_core() { function activate_partnerexpo_core() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-partnerexpo-core-activator.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/class-partnerexpo-core-activator.php';

BIN
partnerexpo-core.zip Normal file

Binary file not shown.

View File

@@ -10,16 +10,19 @@
* @subpackage Partnerexpo_Core/public/partials * @subpackage Partnerexpo_Core/public/partials
*/ */
$logo_id = get_user_meta( get_current_user_id(), 'company_logo_attachment_id', true ); global $post;
$author_id = $post->post_author;
$logo_id = get_user_meta( $author_id, 'company_logo_attachment_id', true );
$logo_url = $logo_id ? wp_get_attachment_url( $logo_id ) : ''; $logo_url = $logo_id ? wp_get_attachment_url( $logo_id ) : '';
?> ?>
<div class="pexpo-core-company-head-wrapper"> <div class="pexpo-core-company-head-wrapper">
<div class="pexpo-core-company-head-logo-wrapper"> <div class="pexpo-core-company-head-logo-wrapper">
<img class="pexpo-core-company-logo" src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr( get_user_meta( get_current_user_id(), 'company', true ) ); ?> logo"> <img class="pexpo-core-company-logo" src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr( get_user_meta( $author_id, 'company', true ) ); ?> logo">
</div> </div>
<div class="pexpo-core-company-head-name-wrapper"> <div class="pexpo-core-company-head-name-wrapper">
<h2 class="pexpo-core-company-name"><?php echo esc_html( get_user_meta( get_current_user_id(), 'company', true ) ); ?></h2> <h2 class="pexpo-core-company-name"><?php echo esc_html( get_user_meta( $author_id, 'company', true ) ); ?></h2>
</div> </div>
</div> </div>