|
|
@@ -32,6 +32,7 @@ class Studiou_WC_FPP_Product {
|
|
|
$enabled = get_post_meta($product_id, '_studiou_fpp_enabled', true);
|
|
|
$media_category = get_post_meta($product_id, '_studiou_fpp_media_category', true);
|
|
|
$max_file_size = get_post_meta($product_id, '_studiou_fpp_max_file_size', true);
|
|
|
+ $upload_info_text = get_post_meta($product_id, '_studiou_fpp_upload_info_text', true);
|
|
|
$min_width = get_post_meta($product_id, '_studiou_fpp_min_width', true);
|
|
|
$min_height = get_post_meta($product_id, '_studiou_fpp_min_height', true);
|
|
|
$max_width = get_post_meta($product_id, '_studiou_fpp_max_width', true);
|
|
|
@@ -125,6 +126,19 @@ class Studiou_WC_FPP_Product {
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="options_group">
|
|
|
+ <?php
|
|
|
+ woocommerce_wp_textarea_input(array(
|
|
|
+ 'id' => '_studiou_fpp_upload_info_text',
|
|
|
+ 'label' => __('Upload Info Text', 'studiou-wc-free-photo-product'),
|
|
|
+ 'description' => __('Custom text displayed above the upload area on the product page. Leave empty for default text.', 'studiou-wc-free-photo-product'),
|
|
|
+ 'desc_tip' => true,
|
|
|
+ 'value' => $upload_info_text,
|
|
|
+ 'style' => 'height:80px;',
|
|
|
+ ));
|
|
|
+ ?>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="options_group">
|
|
|
<p class="form-field">
|
|
|
<label><?php esc_html_e('Shortcode', 'studiou-wc-free-photo-product'); ?></label>
|
|
|
@@ -151,6 +165,10 @@ class Studiou_WC_FPP_Product {
|
|
|
update_post_meta($product_id, '_studiou_fpp_max_file_size', $max_size);
|
|
|
}
|
|
|
|
|
|
+ if (isset($_POST['_studiou_fpp_upload_info_text'])) {
|
|
|
+ update_post_meta($product_id, '_studiou_fpp_upload_info_text', sanitize_textarea_field($_POST['_studiou_fpp_upload_info_text']));
|
|
|
+ }
|
|
|
+
|
|
|
// Resolution limits (0 or empty = no limit)
|
|
|
$res_fields = array('_studiou_fpp_min_width', '_studiou_fpp_min_height', '_studiou_fpp_max_width', '_studiou_fpp_max_height');
|
|
|
foreach ($res_fields as $field) {
|
|
|
@@ -194,6 +212,10 @@ class Studiou_WC_FPP_Product {
|
|
|
return !empty($size) ? (int) $size : 50;
|
|
|
}
|
|
|
|
|
|
+ public static function get_product_upload_info_text($product_id) {
|
|
|
+ return get_post_meta($product_id, '_studiou_fpp_upload_info_text', true);
|
|
|
+ }
|
|
|
+
|
|
|
public static function get_product_media_category($product_id) {
|
|
|
return (int) get_post_meta($product_id, '_studiou_fpp_media_category', true);
|
|
|
}
|