WC_Settings_Emails::email_image_url
Creates the React mount point for the email image url.
Method of the class: WC_Settings_Emails{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Settings_Emails = new WC_Settings_Emails(); $WC_Settings_Emails->email_image_url( $value );
- $value(array) (required)
- Field value array.
WC_Settings_Emails::email_image_url() WC Settings Emails::email image url code WC 10.6.2
<?php
public function email_image_url( $value ) {
$option_value = $value['value'];
if ( ! isset( $value['field_name'] ) ) {
$value['field_name'] = $value['id'];
}
?>
<tr class="<?php echo esc_attr( $value['row_class'] ); ?>">
<th scope="row" class="titledesc">
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo wc_help_tip( $value['desc'] ); // WPCS: XSS ok. ?></label>
</th>
<td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
<input
name="<?php echo esc_attr( $value['field_name'] ); ?>"
id="<?php echo esc_attr( $value['id'] ); ?>"
type="hidden"
value="<?php echo esc_attr( $option_value ); ?>"
/>
<div
id="wc_settings_email_image_url_slotfill"
data-id="<?php echo esc_attr( $value['id'] ); ?>"
data-image-url="<?php echo esc_attr( $option_value ); ?>"
></div>
</td>
</tr>
<?php
}