Skip to content

Instantly share code, notes, and snippets.

I'm Hungry

Thomas Patrick Levy thomasplevy

I'm Hungry
Block or report user

Report or block thomasplevy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thomasplevy / lifterlms-pdfs-pdflayer-secure-api-access-key.php
Last active Nov 27, 2019
Define LifterLMS PDFs pdflayer API Access Key in a wp-config.php file instead of in your site's WPDB.
View lifterlms-pdfs-pdflayer-secure-api-access-key.php
<?php // don't copy this line to your wp-config.php file!
// pdflayer API Access Key.
define( 'LLMS_PDFS_PDFLAYER_ACCESS_KEY', '****' ); // Replace **** with your API Access Key.
View llms-catalog-description.php
<?php // don't copy this line to the functions.php file!
* Modify the course catalog description
function my_alter_llms_post_type_course_description( $course_data ) {
// remvoe the description.
unset( $course_data[ 'description' ] );
thomasplevy / llms-rest-disable.php
Created Aug 16, 2019
Disable the LifterLMS REST API
View llms-rest-disable.php
<?php // do not copy this line to your wp-config.php file
// The following line disables the LifterLMS REST API.
define( 'LLMS_REST_DISABLE', true );
thomasplevy / llms-tracking.js
Created May 9, 2019
WIP: JS Local Storage user interaction/event tracking for LifterLMS
View llms-tracking.js
* Store information in Local Storage by group.
* @since [version]
* @param string group Storage group id/name.
var Storage = function( group ) {
var store = window.localStorage;
thomasplevy / llms_hide_content.txt
Last active May 1, 2019
[lifterlms_hide_content] shortcode examples
View llms_hide_content.txt
[lifterlms_hide_content id="1"]
This will only display to a user with access to the post with an ID of 1.
[lifterlms_hide_content id="1,2,3,4" relation="any"]
This will be displayed only to a user with access to at least one of the posts in the list: 1, 2, 3, or 4.
thomasplevy / llms-stripe-api-key-constants.php
Created Apr 17, 2019
Define Stripe API keys as constants instead of saving them to your sites database (LifterLMS Stripe)
View llms-stripe-api-key-constants.php
<?php // don't copy this line to your functions.php file!
// Live API Keys.
define( 'LLMS_STRIPE_LIVE_PUBLISHABLE_KEY', 'pk_live_**************' );
define( 'LLMS_STRIPE_LIVE_SECRET_KEY', 'sk_live_**************' );
// Test API Keys.
define( 'LLMS_STRIPE_TEST_PUBLISHABLE_KEY', 'pk_test_**************' );
define( 'LLMS_STRIPE_TEST_SECRET_KEY', 'sk_test_**************' );
thomasplevy / llms_pa_post_access.php
Created Apr 3, 2019
Modify the default capability required to access LifterLMS Private Posts and Automations
View llms_pa_post_access.php
<?php // don't copy this line to the functions.php file!
* Modify the default capability required to access LifterLMS Private Posts and Automations
* @param string $cap Default capability (manage_options)
* @return string
function my_custom_pa_cap( $cap ) {
return 'manage_lifterlms';
thomasplevy / llms_ck_enable_consent.php
Created Mar 18, 2019
Disable "consent" in LifterLMS ConvertKit
View llms_ck_enable_consent.php
thomasplevy / llms-left-side-notifications.css
Created Mar 5, 2019
move LifterLMS popover notifications to the left-hand side of the screen
View llms-left-side-notifications.css
@media all and (min-width: 480px) {
.llms-notification {
right: auto;
left: -800px;
.llms-notification.visible {
left: 24px;
right: auto;
thomasplevy / llms-elementor-lessons.php
Created Feb 19, 2019
Tell Elementor that lessons are "public" even though we don't want them displayed in the WP nav menu UI.
View llms-elementor-lessons.php
<?php // don't copy this line.
function add_lessons_to_elementor( $post_types ) {
$obj = get_post_type_object( 'lesson' );
$post_types['lesson'] = $obj->label;
return $post_types;
add_filter( 'elementor_pro/utils/get_public_post_types', 'add_lessons_to_elementor' );
You can’t perform that action at this time.