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 | |
/** | |
* Process smart tags inside checkbox choice labels, | |
* | |
* @param array $field | |
* @param array $deprecated | |
* @param array $form_data | |
* @return array | |
*/ | |
function wp_checkbox_choices_process_smarttags( $field, $deprecated, $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 | |
/** | |
* Disable multipage scroll | |
* | |
*/ | |
function wpf_disable_multipage_scroll() { | |
?> | |
<script type="text/javascript">window.wpforms_pageScroll = false;</script> | |
<?php | |
} |
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 custom redirect | |
* | |
* @param string $url URL form will redirect to | |
* @param int $form_id Form ID | |
* @param array $fields Submitted form fields | |
* @return string | |
*/ | |
function wpf_custom_redirect( $url, $form_id, $fields ) { |
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 user_function_restrict_content( $atts, $content = null ) { | |
if ( is_user_logged_in() && !is_null($content) && !is_feed() ) { | |
return do_shortcode( $content ); | |
} else { | |
return 'Sorry, this content is only available for logged users.'; | |
} | |
} | |
add_shortcode( 'member', 'user_function_restrict_content' ); |
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
.letter-format .wpforms-field { | |
padding: 0 !important; | |
display: inline !important; | |
width: auto !important; | |
overflow: auto !important; | |
position: relative !important; | |
} | |
.letter-format .wpforms-field-html div { | |
display: inline !important; |
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 | |
/** | |
* Custom shortcode to display WPForms form entries. | |
* | |
* Basic usage: [wpforms_entries_table id="FORMID"]. | |
* | |
* Possible shortcode attributes: | |
* id (required) Form ID of which to show entries. | |
* user User ID, or "current" to default to current logged in user. | |
* fields Comma seperated list of form field IDs. |
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 limit times available in the timepicker, hide times that are disabled. | |
* | |
*/ | |
function wpf_limit_time_picker() { | |
?> | |
<script type="text/javascript"> | |
var wpforms_timepicker = { | |
scrollDefault: 'now', |
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 automatically add category to posts created with post submission addon. | |
* | |
* @param int $post_id Post ID of the new post created | |
* @param array $fields | |
* @param array $field_data | |
* @param int $entry_id | |
*/ | |
function wpf_post_submissions_add_category( $post_id, $fields, $form_data, $entry_id ) { |
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 | |
/** | |
* Move a single field descriptions to the top of the field, under the label. | |
* | |
*/ | |
function wpf_top_field_descriptions() { | |
?> | |
<script type="text/javascript"> | |
jQuery(function($){ | |
var $desc = $('#wpforms-1287-field_1-container .wpforms-field-description'), |
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 remove the "Sent from YOUR SITE" email notification footer text. | |
*/ | |
add_filter( 'wpforms_email_footer_text', '__return_empty_string' ); |