Skip to content

Commit

Permalink
Merge pull request #47 from gocodebox/dev
Browse files Browse the repository at this point in the history
Release Version 1.8.0
  • Loading branch information
eri-trabiccolo authored Nov 2, 2023
2 parents dbcf835 + 01c8127 commit b97c0a2
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 28 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
LifterLMS Labs Changelog
========================

v1.8.0 - 2023-11-02
-------------------

##### New Features

+ Added settings for the lessons favorite button visibility.

##### Developer Notes

+ Changed priority of the action manager settings loading.


v1.7.0 - 2023-10-26
-------------------

Expand Down
48 changes: 30 additions & 18 deletions i18n/lifterlms-labs.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPLv3.
msgid ""
msgstr ""
"Project-Id-Version: LifterLMS Labs 1.7.0\n"
"Project-Id-Version: LifterLMS Labs 1.8.0\n"
"Report-Msgid-Bugs-To: https://lifterlms.com/my-account/my-tickets\n"
"Last-Translator: Team LifterLMS <[email protected]>\n"
"Language-Team: Team LifterLMS <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2023-10-26T15:19:01+00:00\n"
"POT-Creation-Date: 2023-11-02T09:31:27+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: llms/dev 0.2.0\n"
"X-Domain: lifterlms-labs\n"
Expand Down Expand Up @@ -121,17 +121,17 @@ msgstr ""
msgid "Check the box next to each action that should be removed."
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:154
#: inc/labs/class.llms.lab.action.manager.php:155
msgid "Single Course Actions"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:159
#: inc/labs/class.llms.lab.action.manager.php:245
#: inc/labs/class.llms.lab.action.manager.php:160
#: inc/labs/class.llms.lab.action.manager.php:260
msgid "Video Embed"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:164
#: inc/labs/class.llms.lab.action.manager.php:250
#: inc/labs/class.llms.lab.action.manager.php:165
#: inc/labs/class.llms.lab.action.manager.php:265
msgid "Audio Embed"
msgstr ""

Expand Down Expand Up @@ -189,50 +189,62 @@ msgid "Reviews"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:235
msgid "Single Lesson Actions"
msgid "Course Syllabus Actions"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:240
msgid "Mark Favorite / Unfavorite Lesson button on Lesson preview"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:245
msgid "Single Lesson Actions"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:250
msgid "Back to Course Link"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:256
#: inc/labs/class.llms.lab.action.manager.php:255
msgid "Mark Favorite / Unfavorite Lesson button"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:271
msgid "Mark Complete / Mark Incomplete / Take Quiz Button(s)"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:261
#: inc/labs/class.llms.lab.action.manager.php:276
msgid "Course Navigation Tiles"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:266
#: inc/labs/class.llms.lab.action.manager.php:281
msgid "Course and Membership Catalogs"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:271
#: inc/labs/class.llms.lab.action.manager.php:286
msgid "Featured Video"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:276
#: inc/labs/class.llms.lab.action.manager.php:291
msgid "Featured Image"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:281
#: inc/labs/class.llms.lab.action.manager.php:296
msgid "Progress Bar"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:286
#: inc/labs/class.llms.lab.action.manager.php:301
msgid "Author"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:291
#: inc/labs/class.llms.lab.action.manager.php:306
msgid "Length"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:296
#: inc/labs/class.llms.lab.action.manager.php:311
msgid "Difficulty"
msgstr ""

#: inc/labs/class.llms.lab.action.manager.php:301
#: inc/labs/class.llms.lab.action.manager.php:316
msgid "Lesson Count"
msgstr ""

Expand Down
32 changes: 27 additions & 5 deletions inc/labs/class.llms.lab.action.manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package LifterLMS_Labs/Labs/Classes
*
* @since 1.2.0
* @version 1.7.0
* @version 1.8.0
*/

defined( 'ABSPATH' ) || exit;
Expand Down Expand Up @@ -52,14 +52,14 @@ protected function configure() {
* Initialize the Lab.
*
* @since 1.2.0
* @since 1.8.0 Postpone settings creation and actions removal.
*
* @return void
*/
protected function init() {

$this->setup_hooks();

add_action( 'plugins_loaded', array( $this, 'remove_actions' ), 777 );
add_action( 'init', array( $this, 'setup_hooks' ), 11 );
add_action( 'init', array( $this, 'remove_actions' ), 11 );

}

Expand Down Expand Up @@ -149,6 +149,7 @@ public function settings() {
* @return void
*/
public function setup_hooks() {

$this->hooks = array(
array(
'title' => esc_html__( 'Single Course Actions', 'lifterlms-labs' ),
Expand All @@ -163,7 +164,6 @@ public function setup_hooks() {
'priority' => 30,
'title' => esc_html__( 'Audio Embed', 'lifterlms-labs' ),
),

'lifterlms_template_single_meta_wrapper_start' => array(
'action' => 'lifterlms_single_course_after_summary',
'priority' => 5,
Expand Down Expand Up @@ -231,6 +231,16 @@ public function setup_hooks() {
),
),
),
array(
'title' => esc_html__( 'Course Syllabus Actions', 'lifterlms-labs' ),
'actions' => array(
'llms_template_syllabus_favorite_lesson_preview' => array(
'action' => 'llms_lesson_preview_after_title',
'priority' => 10,
'title' => esc_html__( 'Mark Favorite / Unfavorite Lesson button on Lesson preview', 'lifterlms-labs' ),
),
),
),
array(
'title' => esc_html__( 'Single Lesson Actions', 'lifterlms-labs' ),
'actions' => array(
Expand All @@ -239,6 +249,11 @@ public function setup_hooks() {
'priority' => 10,
'title' => esc_html__( 'Back to Course Link', 'lifterlms-labs' ),
),
'llms_template_favorite' => array(
'action' => 'lifterlms_single_lesson_before_summary',
'priority' => 10,
'title' => esc_html__( 'Mark Favorite / Unfavorite Lesson button', 'lifterlms-labs' ),
),
'lifterlms_template_single_lesson_video' => array(
'action' => 'lifterlms_single_lesson_before_summary',
'priority' => 20,
Expand Down Expand Up @@ -309,6 +324,13 @@ public function setup_hooks() {
unset( $this->hooks[ count( $this->hooks ) - 1 ]['actions']['lifterlms_template_loop_lesson_count'] );
}

// Remove setting when the favorites feature is disabled.
if ( ! function_exists( 'llms_is_favorites_enabled' ) || ! llms_is_favorites_enabled() ) {
unset(
$this->hooks[1], // Unset the whole Course Syllabus section since it only contains the favorite setting.
$this->hooks[2]['actions']['llms_template_favorite']
);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions lifterlms-labs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: LifterLMS Labs
* Plugin URI: https://lifterlms.com/
* Description: Experimental, conceptual, and possibly silly new features to improve and enhance the functionality of the LifterLMS core
* Version: 1.7.0
* Version: 1.8.0
* Author: LifterLMS
* Author URI: https://lifterlms.com
* Text Domain: lifterlms-labs
Expand All @@ -35,7 +35,7 @@ final class LifterLMS_Labs {
*
* @var string
*/
public $version = '1.7.0';
public $version = '1.8.0';

/**
* Singleton Instance.
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-labs",
"version": "1.7.0",
"version": "1.8.0",
"description": "Experimental, conceptual, and possibly silly new features to improve and enhance the functionality of the LifterLMS core",
"repository": {
"type": "git",
Expand Down

0 comments on commit b97c0a2

Please sign in to comment.