This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WPForms Add new address field scheme (Canada) | |
* | |
* @param array $schemes | |
* @return array | |
*/ | |
function wpf_new_address_scheme( $schemes ) { | |
$schemes['canada'] = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* If the current post is protected by a password and | |
* the visitor has not yet entered the password we will | |
* return early without loading the comments. | |
*/ | |
if ( post_password_required() ) { | |
return; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue scripts and styles. | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_global_enqueues() { | |
wp_enqueue_style( | |
'jquery-auto-complete', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue scripts and styles. | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_global_enqueues() { | |
wp_enqueue_style( | |
'jquery-auto-complete', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($) { | |
var JA_Custom_Validation = { | |
/** | |
* Start the engine. | |
* | |
* @since 1.0.0 | |
*/ | |
init: function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set the field value to the raw value instead of the field label. | |
*/ | |
function wpf_select_use_raw_values( $fields, $entry, $form_data ) { | |
foreach( $fields as $id => $field ) { | |
// Only do this for select fields that are configured to use raw values | |
if ( 'select' == $field['type'] && isset( $form_data['fields'][$id]['show_values'] ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Big sections | |
// ------------------------------------------------------------------------// | |
// xxx | |
// ------------------------------------------------------------------------// | |
// Small sections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WPForms populate select field from custom post type posts | |
* | |
* @param array $field | |
* @param array $field_atts | |
* @param array $form_data | |
* @return array | |
*/ | |
function wpf_custom_select( $field, $field_atts, $form_data ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WPForms customize the timepicker format (remove AM/PM) | |
*/ | |
function wpf_timepicker_custom() { | |
?> | |
<script type="text/javascript"> | |
var wpforms_pickatime = { | |
format: 'H:i' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Preselect dropdown field based on URL parameter. | |
* | |
* @param array $field | |
* @param array $field_atts | |
* @param array $form_data | |
* @return array | |
*/ | |
function wpf_preselect_dropdown( $field, $field_atts, $form_data ) { |