This file contains hidden or 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
/** | |
* Require a specific membership level IDs to enroll in free access plans. | |
*/ | |
function my_pmpro_llms_access_plan_is_available_to_user( $access, $user_id, $access_plan ) { | |
// Bail if streamline is not enabled. | |
if ( ! get_option( 'pmpro_lifter_streamline' ) ) { | |
return $access; | |
} | |
// If the plan isn't free, let LifterLMS handle it. |
This file contains hidden or 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 | |
/** | |
* Enqueue your theme or child theme's version of the legacy frontend.css file. | |
* Note: PMPro v3.1+ css selectors have been overhauled and many of the legacy class names are no longer supported. | |
*/ | |
function my_pmpro_enqueue_theme_frontend_css() { | |
if ( is_admin() ) { | |
return; | |
} |
This file contains hidden or 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
.pmpro_message { } | |
.pmpro_message.pmpro_success { } | |
.pmpro_message.pmpro_error { } | |
.pmpro_message.pmpro_alert { } | |
.pmpro_message a { } | |
.pmpro_success a { } | |
.pmpro_error a { } | |
.pmpro_alert a { } |
This file contains hidden or 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 | |
/** | |
* Redirect the main user page parent to a custom page. | |
*/ | |
function my_pmproup_wp_parent_page_redirect() { | |
global $wpdb, $post, $current_user; | |
// Return early if the User Pages Add On is not active. | |
if ( ! function_exists( 'pmproup_getOptions' ) ) { | |
return; |
This file contains hidden or 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 | |
/** | |
* Filters the Yoast meta title on the profile page to display the user's display name. | |
* | |
* @param string title The current page's generated title. | |
* @return string The filtered title. | |
*/ | |
function my_pmpro_profile_page_meta_title( $title ) { | |
global $pmpro_pages; |
This file contains hidden or 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
/** | |
* Code and CSS to improve the appearance of the Membership tab of the BuddyBoss single profile. | |
* | |
* Place this CSS in the Appearance > Customize > Additional CSS field: | |
* #pmpro_account .pmpro_box { margin-bottom: 3em; } | |
* #pmpro_account .pmpro_box h2 { border-bottom: 1px solid var(--bb-content-border-color); margin: 30px 0; padding-bottom: 20px; } | |
*/ | |
function my_pmpro_buddyboss_profile_account_shortcode( $content ) { | |
$content = '<div class="bp-profile-wrapper need-separator"><div class="bp-profile-content"><div class="group-separator-block">[pmpro_account sections="membership,invoices"]</div></div></div>'; | |
return $content; |
This file contains hidden or 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
.llms-student-dashboard { align-items: flex-start; display: grid; grid-column-gap: 2em; grid-template-columns: 1fr 4fr; } | |
.llms-sd-header { display: flex; flex-direction: column-reverse; } | |
.llms-sd-title { display: none; } | |
.llms-sd-nav .llms-sd-items { display: flex; flex-direction: column; } | |
.llms-student-dashboard .llms-sd-item .llms-sep { display: none; } |
This file contains hidden or 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 | |
function my_pmpro_modify_admin_activity_email_sections($email_sections, $frequency, $term, $report_start_date, $report_end_date, $date_range) { | |
// Directly check and modify the 'total_members' section if it exists | |
if ( isset( $email_sections['total_members'] ) ) { | |
$email_sections['total_members'] = '<tr><td>Replace with your custom code to retrive total member data here.</td></tr>'; | |
} | |
// Return the modified $email_sections array | |
return $email_sections; | |
} |
This file contains hidden or 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 | |
/** | |
* Optional database updates to drop orphaned orders table columns and unused usermeta rows. | |
*/ | |
function run_optional_pmpro_upgrade_3_0() { | |
global $wpdb; | |
// PMPro Stripe Billing Limits Add On has been merged into core and no longer needs `pmpro_stripe_billing_limit` user meta. | |
$sqlQuery = " | |
DELETE FROM {$wpdb->usermeta} |