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 | |
add_action( 'wp', function () { | |
if ( ! is_user_logged_in() ) { | |
return; | |
} | |
$entries = wpforms()->entry->get_entries( | |
array( | |
'form_id' => 74, // CHANGE THIS FORM ID |
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(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data'); | |
return; | |
} | |
if(!filename) filename = 'console.json'; |
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 | |
add_filter('wp_mail_smtp_custom_options', function( $phpmailer ) { | |
$phpmailer->SMTPAutoTLS = false; | |
return $phpmailer; | |
} ); |
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 | |
/* | |
Plugin Name: Retroactive BP User Acticity | |
Plugin URI: https://gist.github.com/3953927 | |
Description: Makes all BuddyPress users visible immediately on user creation and retroactively adjust users to allow for their display before logging in. | |
Author: Aaron Brazell | |
Version: 1.0 | |
Author URI: http://technosailor.com | |
License: MIT | |
License URI: http://opensource.org/licenses/MIT |
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 | |
/** | |
* WPForms: Conditional form redirects based on field value. | |
* | |
* @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 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 you are using BP 2.1+, this will insert a Country selectbox. | |
* Add the function to bp-custom.php and then visit .../wp-admin/users.php?page=bp-profile-setup | |
*/ | |
function bp_add_custom_country_list() { | |
if ( !xprofile_get_field_id_from_name('Country') && 'bp-profile-setup' == $_GET['page'] ) { | |
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 | |
/** | |
* This code removes all sections on a single entry page in the admin area. | |
* Methods names in the remove_action() function call are self explanatory. | |
* Comment out or remove those lines which sections you want to show. | |
*/ | |
// Main content area. | |
add_action( 'wpforms_entry_details_content', static function ( $entry, $form_data, $single_entry ) { |
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 | |
add_filter( 'wpforms_frontend_strings', function( $strings ) { | |
global $post; | |
if ( ! isset( $post->post_content ) ) { | |
return $strings; | |
} | |
preg_match( '~\[wpforms id=\"(\d+)\"~', $post->post_content, $matches ); |
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 | |
// HTML Email. | |
add_filter( 'wpforms_html_field_value', static function ( $field_val, $field, $form_data, $context ) { | |
if ( $context !== 'email-html' ) { | |
return $field_val; | |
} | |
if ( empty( $form_data['fields'][ $field['id'] ] ) ) { |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- This is a skeleton phpDox config file - Check http://phpDox.de for latest version and more info --> | |
<phpdox xmlns="http://xml.phpdox.net/config" silent="false"> | |
<!-- @silent: true | false to enable or disable visual output of progress --> | |
<!-- Additional bootstrap files to load for additional parsers, enrichers and/or engines --> | |
<!-- Place as many require nodes as you feel like in this container --> | |
<!-- syntax: <require file="/path/to/file.php" /> --> | |
<bootstrap /> |