Skip to content

Commit

Permalink
Merge pull request #2809 from gocodebox/dev
Browse files Browse the repository at this point in the history
Release 7.8.4
  • Loading branch information
brianhogg authored Nov 19, 2024
2 parents ef5c545 + 8c8e08f commit d61b9c0
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 132 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
LifterLMS Changelog
===================

v7.8.4 - 2024-11-18
-------------------

##### Bug Fixes

+ Fix translations not loading for LifterLMS in WordPress 6.7. [#2807](https://github.com/gocodebox/lifterlms/issues/2807)


v7.8.3 - 2024-11-04
-------------------

Expand Down
2 changes: 1 addition & 1 deletion class-lifterlms.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class LifterLMS {
*
* @var string
*/
public $version = '7.8.3';
public $version = '7.8.4';

/**
* LLMS_Assets instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,29 @@ public function __construct() {

if ( isset( $_GET['post_type'] ) && 'page' === $_GET['post_type'] ) {

$pages = array(
'checkout' => __( 'LifterLMS Checkout', 'lifterlms' ),
'courses' => __( 'LifterLMS Course Catalog', 'lifterlms' ),
'memberships' => __( 'LifterLMS Memberships Catalog', 'lifterlms' ),
'myaccount' => __( 'LifterLMS Student Dashboard', 'lifterlms' ),
);
add_action( 'init', array( $this, 'populate_pages' ) );

foreach ( $pages as $key => $name ) {
$id = llms_get_page_id( $key );
if ( $id ) {
add_filter( 'display_post_states', array( $this, 'post_states' ), 10, 2 );

$this->pages[ $id ] = $name;
}
}

}
}
public function populate_pages() {
$pages = array(
'checkout' => __( 'LifterLMS Checkout', 'lifterlms' ),
'courses' => __( 'LifterLMS Course Catalog', 'lifterlms' ),
'memberships' => __( 'LifterLMS Memberships Catalog', 'lifterlms' ),
'myaccount' => __( 'LifterLMS Student Dashboard', 'lifterlms' ),
);

add_filter( 'display_post_states', array( $this, 'post_states' ), 10, 2 );
foreach ( $pages as $key => $name ) {
$id = llms_get_page_id( $key );
if ( $id ) {

}
$this->pages[ $id ] = $name;

}
}
}

/**
Expand All @@ -71,10 +74,7 @@ public function post_states( $states, $post ) {
}

return $states;

}


}

return new LLMS_Admin_Post_Table_Pages();
15 changes: 5 additions & 10 deletions includes/integrations/class.llms.integration.bbpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class LLMS_Integration_BBPress extends LLMS_Abstract_Integration {
*/
protected function configure() {

$this->title = __( 'bbPress', 'lifterlms' );
$this->description = sprintf( __( 'Restrict forums and topics to memberships, add forums to courses, and %1$smore%2$s.', 'lifterlms' ), '<a href="https://lifterlms.com/docs/lifterlms-and-bbpress/" target="_blank">', '</a>' );
add_action( 'init', array( $this, 'set_title_and_description' ) );

if ( $this->is_available() ) {

Expand Down Expand Up @@ -78,7 +77,11 @@ protected function configure() {
add_action( 'llms_content_restricted_by_bbp_course_forum', array( $this, 'handle_course_forum_restriction' ), 10, 1 );

}
}

public function set_title_and_description() {
$this->title = __( 'bbPress', 'lifterlms' );
$this->description = sprintf( __( 'Restrict forums and topics to memberships, add forums to courses, and %1$smore%2$s.', 'lifterlms' ), '<a href="https://lifterlms.com/docs/lifterlms-and-bbpress/" target="_blank">', '</a>' );
}

/**
Expand Down Expand Up @@ -176,7 +179,6 @@ public function engagement_query_args( $query_args, $action, $orig_args ) {
}

return $query_args;

}

/**
Expand Down Expand Up @@ -205,7 +207,6 @@ public function handle_course_forum_restriction( $restriction ) {

llms_add_notice( $msg, 'error' );
llms_redirect_and_exit( get_permalink( $restriction['restriction_id'] ) );

}

/**
Expand Down Expand Up @@ -237,7 +238,6 @@ public function get_course_forum_ids( $course ) {
* @param LLMS_Course $course LifterLMS course object.
*/
return apply_filters( 'llms_bbp_get_course_forum_ids', $ids, $course );

}

/**
Expand Down Expand Up @@ -268,7 +268,6 @@ public function get_forum_course_restrictions( $forum_id ) {
$query = array_map( 'absint', $query );

return $query;

}

/**
Expand Down Expand Up @@ -347,7 +346,6 @@ public function restriction_checks_courses( $results ) {
}

return $results;

}

/**
Expand Down Expand Up @@ -389,7 +387,6 @@ public function restriction_checks_memberships( $results ) {
}

return $results;

}

/**
Expand Down Expand Up @@ -435,7 +432,5 @@ public function save_course_settings( $post_id ) {
update_post_meta( $post_id, '_llms_bbp_forum_ids', $ids );

return $ids;

}

}
21 changes: 6 additions & 15 deletions includes/integrations/class.llms.integration.buddypress.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ class LLMS_Integration_Buddypress extends LLMS_Abstract_Integration {
*/
protected function configure() {

$this->title = __( 'BuddyPress', 'lifterlms' );
$this->description = sprintf( __( 'Add LifterLMS information to user profiles and enable membership restrictions for activity, group, and member directories. %1$sLearn More%2$s.', 'lifterlms' ), '<a href="https://lifterlms.com/docs/lifterlms-and-buddypress/" target="_blank">', '</a>' );
add_action( 'init', array( $this, 'set_title_and_description' ) );

if ( $this->is_available() ) {

Expand All @@ -78,7 +77,11 @@ protected function configure() {
add_filter( 'llms_groups_maybe_hide_dashboard_tab', array( $this, 'return_true_on_bp_my_profile' ) );

}
}

public function set_title_and_description() {
$this->title = __( 'BuddyPress', 'lifterlms' );
$this->description = sprintf( __( 'Add LifterLMS information to user profiles and enable membership restrictions for activity, group, and member directories. %1$sLearn More%2$s.', 'lifterlms' ), '<a href="https://lifterlms.com/docs/lifterlms-and-buddypress/" target="_blank">', '</a>' );
}

/**
Expand Down Expand Up @@ -109,7 +112,6 @@ public function get_integration_settings() {
}

return $settings;

}

/**
Expand Down Expand Up @@ -177,14 +179,13 @@ public function add_profile_nav_items() {
'slug' => $profile_endpoint['endpoint'],
'parent_slug' => $main_nav_slug,
'parent_url' => $parent_url,
'screen_function' => function() use ( $ep_key, $profile_endpoint ) {
'screen_function' => function () use ( $ep_key, $profile_endpoint ) {
$this->endpoint_content( $ep_key, $profile_endpoint['content'] );
},
'user_has_access' => $bp_is_my_profile,
)
);
}

}

/**
Expand Down Expand Up @@ -270,7 +271,6 @@ public function courses_screen() {
add_action( 'bp_template_content', array( $this, 'remove_courses_paginate_links_filter' ), 15 );

bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );

}

/**
Expand Down Expand Up @@ -303,7 +303,6 @@ public function endpoint_content( $ep_key, $ep_template_cb ) {

// This triggers 'bp_template_content' action hook.
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );

}

/**
Expand Down Expand Up @@ -334,7 +333,6 @@ public function enqueue_assets() {
"window.llms.address_info = '" . wp_json_encode( llms_get_countries_address_info() ) . "';"
);
}

}

/**
Expand Down Expand Up @@ -378,7 +376,6 @@ public function modify_courses_paginate_links( $link ) {

$this->current_endpoint_key;
return $this->modify_paginate_links( $link );

}

/**
Expand Down Expand Up @@ -476,7 +473,6 @@ public function modify_paginate_links( $link ) {
}

return $query ? $link . '?' . $query : $link;

}

/**
Expand Down Expand Up @@ -554,7 +550,6 @@ public function restriction_checks( $results ) {
}

return $results;

}

/**
Expand All @@ -574,7 +569,6 @@ private function get_profile_endpoints_options() {
array_keys( $endpoints ),
array_column( $endpoints, 'title' )
);

}

/**
Expand Down Expand Up @@ -606,7 +600,6 @@ private function populate_profile_endpoints() {
* @param array $endpoints Array of endpoint data.
*/
$this->endpoints = apply_filters( 'llms_buddypress_profile_endpoints', $endpoints );

}

/**
Expand Down Expand Up @@ -650,7 +643,5 @@ function ( $endpoint ) {
}

return $endpoints;

}

}
12 changes: 4 additions & 8 deletions includes/privacy/class-llms-privacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public function __construct() {

// Anonymize erased order properties.
add_filter( 'llms_privacy_get_anon_prop_value', array( 'LLMS_Privacy_Erasers', 'anonymize_prop' ), 10, 3 );

}

/**
Expand Down Expand Up @@ -123,7 +122,6 @@ protected static function get_order_data_props( $type ) {
);

return apply_filters( 'llms_privacy_order_data_props', $props, $type );

}

/**
Expand Down Expand Up @@ -185,7 +183,6 @@ public function get_privacy_message() {
* @param string $content Privacy policy content as an html string.
*/
return apply_filters( 'llms_privacy_policy_content', $content );

}

/**
Expand Down Expand Up @@ -243,7 +240,6 @@ protected static function get_student_data_props() {
'last_login' => __( 'Last Login Date', 'lifterlms' ),
)
);

}

/**
Expand Down Expand Up @@ -272,7 +268,6 @@ protected static function get_student_enrollments( $student, $page, $post_type )
'done' => ( ! $enrollments['more'] ),
'results' => $enrollments['results'],
);

}

/**
Expand Down Expand Up @@ -304,7 +299,6 @@ protected static function get_student_orders( $student, $page ) {
'done' => $done,
'orders' => $results,
);

}

/**
Expand All @@ -327,7 +321,9 @@ protected static function get_student_quizzes( $student, $page ) {
)
);
}

}

return new LLMS_Privacy();
function llms_load_privacy() {
return new LLMS_Privacy();
}
add_action( 'init', 'llms_load_privacy' );
4 changes: 2 additions & 2 deletions lifterlms.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
* Plugin Name: LifterLMS
* Plugin URI: https://lifterlms.com/
* Description: Complete e-learning platform to sell online courses, protect lessons, offer memberships, and quiz students. WP Learning Management System.
* Version: 7.8.3
* Version: 7.8.4
* Author: LifterLMS
* Author URI: https://lifterlms.com/
* Text Domain: lifterlms
* Domain Path: /languages
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Requires at least: 5.9
* Tested up to: 6.6
* Tested up to: 6.7
* Requires PHP: 7.4
*
* * * * * * * * * * * * * * * * * * * * * *
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lifterlms",
"version": "7.8.3",
"version": "7.8.4",
"description": "LifterLMS by codeBOX",
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit d61b9c0

Please sign in to comment.