Skip to content

Instantly share code, notes, and snippets.

@chrisguitarguy
chrisguitarguy / comments-example.php
Created September 21, 2011 21:44
How to add custom fields to WordPress comments
<?php
/*
Plugin Name: Add Extra Comment Fields
Plugin URI: http://pmg.co/category/wordpress
Description: An example of how to add, save and edit extra comment fields in WordPress
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: MIT
*/
@abachuk
abachuk / wppb.login.php
Last active December 18, 2015 02:58
WP User Frontend Login with Email
<?php
/* wp_signon can only be executed before anything is outputed in the page because of that we're adding it to the init hook */
global $wppb_login;
$wppb_login = false;
function wppb_signon(){
global $error;
global $wppb_login;
@amdrew
amdrew / gist:e13a2a72de4b46a891ae
Created January 14, 2015 02:04
Easy Digital Downloads - Force account creation by cart total
<?php
/*
* Plugin Name: Easy Digital Downloads - Force account creation by cart total
* Description: Force account creation at checkout if the cart total is a certain amount
* Author: Andrew Munro
* Version: 1.0
*/
function sumobi_edd_force_account_creation_by_cart_total( $ret ) {
// enter the cart total amount that should force account creation