Skip to content

Commit

Permalink
Add default field block wrapper selector
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Sep 12, 2024
1 parent d37dae6 commit 158a165
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/admin/ppom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
$send_file_attachment = ( isset( $ppom_settings->send_file_attachment ) ? $ppom_settings->send_file_attachment : '' );
$show_cart_thumb = ( isset( $ppom_settings->show_cart_thumb ) ? $ppom_settings->show_cart_thumb : '' );
$aviary_api_key = ( isset( $ppom_settings->aviary_api_key ) ? $ppom_settings->aviary_api_key : '' );
$productmeta_style = ( isset( $ppom_settings->productmeta_style ) ? $ppom_settings->productmeta_style : '' );
$productmeta_style = ! empty( $ppom_settings->productmeta_style ) ? $ppom_settings->productmeta_style : ".ppom-id-$product_meta_id {\n}\n";
$productmeta_js = ( isset( $ppom_settings->productmeta_js ) ? $ppom_settings->productmeta_js : '' );
$productmeta_categories = ( isset( $ppom_settings->productmeta_categories ) ? $ppom_settings->productmeta_categories : '' );
$product_meta = json_decode( $ppom_settings->the_meta, true );
Expand Down Expand Up @@ -197,11 +197,11 @@ class="dashicons dashicons-editor-help"></i></span>
title="<?php _e( 'Add your own CSS.', 'woocommerce-product-addon' ); ?>"><i
class="dashicons dashicons-editor-help"></i></span>
</label>
<textarea id="ppom-css-editor" class="form-control" name="productmeta_style" placeholder="<?php echo esc_attr( "selector {\n}\n" ); ?>"><?php echo wp_unslash( $productmeta_style ); ?></textarea>
<textarea id="ppom-css-editor" class="form-control" name="productmeta_style"><?php echo wp_unslash( $productmeta_style ); ?></textarea>
<br>
<p><?php esc_html_e( 'Use', 'woocommerce-product-addon' ); ?> <code>selector</code> <?php esc_html_e( 'to target block wrapper.', 'woocommerce-product-addon' ); ?></p>
<p><?php esc_html_e( 'Use', 'woocommerce-product-addon' ); ?> <code>.ppom-id-<?php echo (int) $product_meta_id; ?></code> <?php esc_html_e( 'to target block wrapper.', 'woocommerce-product-addon' ); ?></p>
<p><?php esc_html_e( 'Example:', 'woocommerce-product-addon' ); ?></p>
<pre className="ppom-css-editor-help"><?php echo esc_html( "selector {\n background: #000;\n}\nselector img {\n border-radius: 100%;\n}" ); ?></pre>
<pre className="ppom-css-editor-help"><?php echo esc_html( ".ppom-id-$product_meta_id {\n background: #000;\n}\n.ppom-id-$product_meta_id img {\n border-radius: 100%;\n}" ); ?></pre>
<p><?php esc_html_e( 'You can also use other CSS syntax here, such as media queries.', 'woocommerce-product-addon' ); ?></p>
</div>
</div>
Expand Down

0 comments on commit 158a165

Please sign in to comment.