Skip to content

Instantly share code, notes, and snippets.

View actual-saurabh's full-sized avatar
💭
I may be slow to respond.

Saurabh Shukla actual-saurabh

💭
I may be slow to respond.
View GitHub Profile
@actual-saurabh
actual-saurabh / lifterlms-custom-profile-fields-add.php
Last active March 30, 2020 19:05 — forked from thomasplevy/lifterlms-custom-profile-fields-add.php
Custom Fields added to LifterLMS Registration/Checkout
<?php // don't copy this line to your functions.php file
/**
*
* Create Company Industry as a custom field upon registration or checkout
*
* @param $fields - fields already being registered
* @param $screen - either checkout or registration screen
* @return $fields - array with added field
*/
function add_company_industry_lifterlms ( $fields , $screen ) {
@actual-saurabh
actual-saurabh / llms_membership_restricted_post_types.php
Last active June 29, 2018 12:50 — forked from thomasplevy/llms_membership_restricted_post_types.php
Extend membership restriction to courses, memberships and other post types
<?php // Do not copy this line
// Copy from under this line and paste into your child theme's functions.php
add_filter( 'llms_membership_restricted_post_types', 'my_membership_restriction_post_types' );
/**
* Add LifterLMS membership restrictions to a custom post type
* @param array $post_types array of custom post types
* @return array
@actual-saurabh
actual-saurabh / lifterlms-custom-profile-fields.php
Created May 4, 2018 13:18 — forked from tpkemme/lifterlms-custom-profile-fields.php
Custom Fields added to LifterLMS Registration/Checkout
<?php // don't copy this line to your functions.php file
/**
*
* Create Company Industry as a custom field upon registration or checkout
*
* @param $fields - fields already being registered
* @param $screen - either checkout or registration screen
* @return $fields - array with added field
*/
function add_company_industry_lifterlms ( $fields , $screen ) {