om.Campaign.afterClose
document.addEventListener(‘om.Campaign.afterClose’, function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); } );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
document.addEventListener(‘om.Campaign.afterClose’, function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); } );Continue reading
add_shortcode(‘bos_leaderboard_top6’, function() { $args = array( ‘role’ => ‘subscriber’, ‘number’ => 6, ‘orderby’ => ‘meta_value_num’, ‘meta_key’=> ‘bos_points’, ‘order’ => ‘DESC’ ); $users = get_users($args); $output = ‘ ‘; foreach ($users as $user) { $name = $user->display_name; $points = get_user_meta($user->ID, ‘bos_points’,…Continue reading
document.addEventListener(‘DOMContentLoaded’, function() { // Change the form ID to match your WPForms form ID var form = document.getElementById(‘wpforms-form-10’); if (form) { var clearButton = document.createElement(‘button’); clearButton.type = ‘button’; clearButton.innerText = ‘Clear’; clearButton.class = ‘custom-btn’; clearButton.style.marginTop = ’10px’; clearButton.classList.add(‘custom-clear-button’); form.appendChild(clearButton); clearButton.addEventListener(‘click’,…Continue reading
/** * Update the “Count” field in real-time with the quantity of repeater fields. */ function wpf_update_repeater_count() { ?>Continue reading
/** Customize the from email address for the Save and Resume addon. @param string $from_address The current from email address. @param object $email The email object. @return string */ function wpf_save_resume_change_from_email( $from_address, $email ) { // Check if this is…Continue reading
/** * Show values in Dropdown, checkboxes, and Multiple Choice. */ add_action( ‘wpforms_fields_show_options_setting’, ‘__return_true’ ); /** * Save choices ‘values’ instead of ‘labels’ for the fields with ‘Show values’ option enabled. * * @link https://wpforms.com/developers/how-to-store-field-values-in-the-wpforms-entry/ */ function wpf_dev_process_filter_choices_values( $fields, $entry,…Continue reading
/** * Class deleteuploadedfiles to delete uploaded files from the server * * @link https://wpforms.com/developers/class-deleteuploadedfiles/ */ namespace WPF; class DeleteUploadedFiles { /** * Should we delete files from the WordPress Media Library? * Change the constant to true to delete…Continue reading
document.addEventListener(‘om.Campaign.close’, function(event) { const url = “http://optinmonster.com”; window.location.href = url; } );Continue reading
document.addEventListener(‘om.Campaign.close’, function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); } );Continue reading