Skip to content

Instantly share code, notes, and snippets.

@jan-koch
jan-koch / woo-selectbox.php
Created November 15, 2018 13:09
Example of adding a select box to the "General" product data tab.
<?php
function prefix_add_selectbox() {
$args = array(
'id' => 'my_new_select', // required. The meta_key ID for the stored value
'wrapper_class' => '', // a custom wrapper class if needed
'desc_tip' => true, // makes your description show up with a "?" symbol and as a tooltip
'description' => __('My awesome select box', 'your_text_domain'),
'label' => __( 'My New Select', 'your_text_domain' ),
'options' => array(
'value1' => __( 'Text 1', 'your_text_domain' ),
@Qubadi
Qubadi / gist:c83878e6244261b39ff387d4c9739f67
Last active October 9, 2024 18:28
JetFormBuilder media field, enhanced choose file
UPDATED: 07.05.2024
1. We've enhanced the JetFormBuilder with a refined custom code, improving both style and functionality for file selection. The latest
update introduces support for the repeater field's media capabilities, offering a more streamlined and efficient user experience for
handling multiple files within forms.
2. Copy this code, create a new HTML snippet, and paste it into your snippet plugin. Save it as a header or footer.
__________________________________________
See the youtube tutorials here ( OLD ):
https://youtu.be/lOghzLiR73Q?si=DbNNcCkKzkv_mAQl
__________________________________________