%4$s%5$s', esc_attr($class), $user_id, $post_id, $icon, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fixed sprite markup. esc_html($label) ); } } if (!function_exists('aksrt_render_rewards_modal_for_user')) { function aksrt_render_rewards_modal_for_user(int $user_id, int $post_id = 0): void { static $done = []; $key = $user_id . ':' . $post_id; if ($user_id <= 0 || isset($done[$key]) || !aksrt_rewards_enabled()) { return; } $done[$key] = true; $settings = \AKSRT\Settings\Settings::get_post_page_settings(); $amounts = (array) ($settings['rewards_amounts'] ?? [5, 10, 20, 50, 100]); $render_amounts = []; foreach ($amounts as $amount) { try { $parsed = \AKSRT\Ledger\AssetAmount::balance(is_string($amount) ? $amount : ''); if ($parsed->minor() > 0) { $render_amounts[] = $parsed->decimal(); } } catch (\InvalidArgumentException $e) { continue; } } $recipient = get_userdata($user_id); ?>
display_name : __('作者', 'aksrt'))); ?>