Skip to content

Instantly share code, notes, and snippets.

View travislima's full-sized avatar

Travis Lima travislima

View GitHub Profile
@travislima
travislima / wp-config.php
Last active October 31, 2017 10:49
example-wp-debug.php
// Turn debugging on by setting value to "true"
define('WP_DEBUG', true);
// Turn off the display of error messages on your site
define('WP_DEBUG_DISPLAY', false);
// Log all errors to /wp-content/debug.log
define('WP_DEBUG_LOG', true);
@travislima
travislima / wp-config.php
Last active October 31, 2017 10:50
Turn WP Debug mode on
define( 'WP_DEBUG', true );
@travislima
travislima / wp-config.php
Created October 31, 2017 09:42
WP_DEBUG_LOG
define('WP_DEBUG_LOG', true);
@travislima
travislima / wp-config.php
Last active October 31, 2017 10:11
Turn wp_debug_display off
define('WP_DEBUG_DISPLAY', false);
@travislima
travislima / pmpro_frontend-oldschool.css
Last active April 12, 2021 22:27 — forked from kimcoleman/pmpro_frontend-oldschool.css
Return the style of labels and form inputs on the Membership Checkout form to pre-1.9.4 layout using Paid Memberships Pro
<style>
@media only screen and (min-width: 1200px) {
#pmpro_form h3 {
display: grid;
grid-template-columns: 2fr 1fr;
}
.pmpro_checkout .pmpro_checkout-fields .pmpro_checkout-field {
clear: left;
}
.pmpro_checkout .pmpro_checkout-fields .pmpro_checkout-field label {
@travislima
travislima / pmpro_change_Invoice_on_print.php
Created December 7, 2017 12:50
Change "Invoice" to "Receipts"
<?php
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
* A simple gist that changes "Invoice #:" to "Receipt #:" when printing an exsisting order.
* Copy the code below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Invoice #: ' :
@travislima
travislima / pmpro_change_pay_by_check.php
Last active January 24, 2024 13:44
Change "Pay by Check" to "Pay by Cheque or Bank Transfer"
<?php
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
* A simple gist that changes "Pay by Check" to "Pay by Cheque or Bank Transfer:".
* Copy the code below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Pay by Check' :
@travislima
travislima / dark_theme_styling.css
Created January 10, 2018 11:08
Styling for a Dark WP Theme using PMPro (User Specific)
/* PMPro Levels Page - Button Styling */
a.pmpro_btn.pmpro_btn-select {
text-decoration: none;
text-transform: uppercase;
background-color: #D32D0B;
color: #ffffff;
border: none;
}
/* PMPro Levels Page - Table Background Color */
@travislima
travislima / pmpro_registration_checks_no_email_user_login.php
Created January 12, 2018 12:37 — forked from ideadude/pmpro_registration_checks_no_email_user_login.php
Stop users from setting their username to an email address with Paid Memberships Pro
/*
Stop users from setting their username to an email address
Add this code to a custom plugin.
*/
function pmpro_registration_checks_no_email_user_login($continue) {
//if there are earlier problems, don't bother checking
if(!$continue)
return;
//make sure the username passed in doesn't look like an email address (contains a @)
@travislima
travislima / pmpro-add-custom-fields-to-email.php
Created January 17, 2018 07:43
PMPro add custom fields to email
/*
Adds !!company!! as an available variable for use in Paid Memberships Pro emails.
Notice the array key does not include the !!s
*/
function my_pmpro_email_data($data, $email)
{
global $current_user;
$data['company'] = get_user_meta($current_user->ID, 'company', false);