Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
WebEndevSnippets / functions.php
Created March 3, 2014 19:50
Gravity Forms: Auto login to site after GF User Registration Form Submittal
add_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 );
/**
* Auto login to site after GF User Registration Form Submittal
*
*/
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) {
wp_set_auth_cookie( $user_id, false, '' );
}
@justintadlock
justintadlock / register-post-type.php
Last active October 22, 2023 05:55
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
<?php
/*
* WordPress Breadcrumbs
* author: Dimox
* version: 2019.03.03
* license: MIT
*/
function dimox_breadcrumbs() {
/* === OPTIONS === */