✏️ 编辑:image-dimensions.php
路径:
/home/forge/yith-woocommerce-compare/plugin-fw/templates/fields/image-dimensions.php
大小:1.3 KB · 修改:2023-08-03 14:10:49 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php /** * Template for displaying the image-dimensions field * * @var array $field The field. * @package YITH\PluginFramework\Templates\Fields */ defined( 'ABSPATH' ) || exit; // Exit if accessed directly. list ( $field_id, $class, $name, $value ) = yith_plugin_fw_extract( $field, 'id', 'class', 'name', 'value' ); $value = isset( $value ) && is_array( $value ) ? $value : array(); ?> <div class="yith-plugin-fw-image-dimensions" id="<?php echo esc_attr( $field_id ); ?>"> <div class="yith-image-width"> <label for="<?php echo esc_attr( $name . '_width' ); ?>"><?php echo esc_html_x( 'Width', 'Image width field label', 'yith-plugin-fw' ); ?></label> <input type="number" id="<?php echo esc_attr( $name . '_width' ); ?>" name="<?php echo esc_attr( $name . '[width]' ); ?>" value="<?php echo isset( $value['width'] ) ? absint( $value['width'] ) : 0; ?>" step="1" min="0" /> </div> <div class="yith-image-height"> <label for="<?php echo esc_attr( $name . '_height' ); ?>"><?php echo esc_html_x( 'Height', 'Image height field label', 'yith-plugin-fw' ); ?></label> <input type="number" id="<?php echo esc_attr( $name . '_height' ); ?>" name="<?php echo esc_attr( $name . '[height]' ); ?>" value="<?php echo isset( $value['height'] ) ? absint( $value['height'] ) : 0; ?>" step="1" min="0" /> </div> </div>
💾 保存
取消
保存为 UTF-8,换行统一为 LF