| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) || exit; |
| 4 |
use YayMail\Page\Source\CustomPostType; |
| 5 |
$postID = CustomPostType::postIDByTemplate( $this->template ); |
| 6 |
$text_link_color = get_post_meta( $postID, '_yaymail_email_textLinkColor_settings', true ) ? get_post_meta( $postID, '_yaymail_email_textLinkColor_settings', true ) : '#96588a'; |
| 7 |
$sent_to_admin = isset( $this->sent_to_admin ) ? true : false; |
| 8 |
$titleColor = isset( $atts['titlecolor'] ) && $atts['titlecolor'] ? 'color:' . html_entity_decode( $atts['titlecolor'], ENT_QUOTES, 'UTF-8' ) : 'color:inherit'; |
| 9 |
?> |
| 10 |
|
| 11 |
<?php |
| 12 |
if ( $sent_to_admin ) { |
| 13 |
$before = '<a style="font-weight: normal;' . esc_attr( $titleColor ) . '" class="yaymail_builder_link" href="' . esc_url( $order->get_edit_order_url() ) . '">'; |
| 14 |
$after = '</a>'; |
| 15 |
/* translators: %s: Order ID. */ |
| 16 |
echo wp_kses_post( $before . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) ); |
| 17 |
} else { |
| 18 |
$before = ''; |
| 19 |
$after = ''; |
| 20 |
/* translators: %s: Order ID. */ |
| 21 |
echo wp_kses_post( $before . sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ) ); |
| 22 |
} |
| 23 |
|