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 // 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 ) { |
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 // 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 |
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 // 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 ) { |