This file contains 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 | |
/** | |
* In WPForms Form Overview, for non admin users, only show forms that belong to | |
* current user. | |
* | |
* @param object $query | |
* @return object | |
*/ | |
function wpf_forms_current_author( $query ) { | |
This file contains 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 | |
/** | |
* Dynamically add countries to a select field. | |
* | |
* This snippet should go in your theme's function.php file. | |
* | |
* @param array $field | |
* @param array $field_atts | |
* @param array $form_data |
This file contains 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 | |
/** | |
* Customize strings for WPForms date picker. | |
* | |
* This snippet should go in your theme's function.php file | |
*/ | |
function wpforms_datepicker_strings() { | |
?> | |
<script type="text/javascript"> | |
var Flatpickr = Flatpickr||{l10n: {}}; |
This file contains 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 | |
/** | |
* Use full country name instead of the country code. | |
* | |
* @param array $fields | |
* @param array $entry | |
* @param array $form_data | |
* @return array | |
*/ | |
function wpf_address_full_country( $fields, $entry, $form_data ) { |
This file contains 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
<script type="text/javascript"> | |
/** | |
* Prevent double entry submissions. | |
* | |
* Steps to install: | |
* 1 - Download and activate the "Insert Headers and Footers" plugin (by WPBeginner) | |
* 2 - Go to Settings > Insert Headers and Footers | |
* 3 - Paste this entire code snippet | |
* 4 - Save | |
*/ |
This file contains 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 | |
/** | |
* Directions to install: | |
* | |
* - Inside your WordPress theme, create a directory named "wpforms-email" | |
* - Within this new directory, create a file named "header-default.php" and paste this file | |
* - That's it! | |
*/ | |
// Exit if accessed directly |
This file contains 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
div.wpforms-confirmation-container-full { | |
color: inherit; | |
margin: 0; | |
background: none; | |
border: none; | |
padding: 0; | |
} | |
div.wpforms-confirmation-container-full p:last-of-type { | |
margin: inherit; |
This file contains 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 | |
/** | |
* Mobile share buttons | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_share_buttons_mobile() { | |
if ( !is_front_page() && ( is_page() || is_singular( 'post' ) ) ) : |
This file contains 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
#! /bin/bash | |
# main config | |
PLUGINSLUG=${PWD##*/} # returns basename of current directory | |
CURRENTDIR=`pwd` | |
# configs | |
GITPATH="$CURRENTDIR/" # this file should be in the base of your git repository | |
SVNPATH="/tmp/$PLUGINSLUG" # path to a temp SVN repo. No trailing slash required and don't add trunk. | |
SVNURL="http://plugins.svn.wordpress.org/$PLUGINSLUG" # Remote SVN repo on wordpress.org, with no trailing slash |
This file contains 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 ($) { | |
/** | |
* Scroll spy | |
*/ | |
// Cache selectors | |
var lastId, | |
scrollSpyMenu = $(".process-nav"); | |
scrollSpyMenuHeight = scrollSpyMenu.outerHeight()+55; | |
scrollSpyMenuItems = scrollSpyMenu.find('a'); | |
scrollItems = scrollSpyMenuItems.map(function(){ |