Skip to content

Commit 2079620

Browse files
author
Thomas Patrick Levy
authored
Merge pull request #159 from gocodebox/dev
Release Version 2.4.0
2 parents 9da02ad + 03df3b8 commit 2079620

12 files changed

+1472
-1452
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
LifterLMS Blocks Changelog
22
==========================
33

4+
v2.4.0 - 2022-02-25
5+
-------------------
6+
7+
##### Updates and Enhancements
8+
9+
+ Components added to `window.llms.components` are now aware of components added to the object from other sources.
10+
11+
##### Bug Fixes
12+
13+
+ Fixed access to non-existing variable when current user tries to edit course/membership instructors without proper permissions. [#140](https://github.com/gocodebox/lifterlms-blocks#140)
14+
15+
416
v2.3.2 - 2022-02-22
517
-------------------
618

README.md

-8
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ WordPress Editor (Gutenberg) blocks for LifterLMS.
2525
+ Activate the plugin
2626

2727

28-
## Building
29-
30-
1. Update changelog: `llms-dev log:write`
31-
2. Update versions: `llms-dev ver:update`
32-
3. Build assets and remove dev files: `npm run build`
33-
4. Build dist archive: `llms-dev archive`
34-
35-
3628
## Development
3729

3830
While developing Javascript within this plugin you can watch changes in the assets and (optionally) automatically reload using LiveReload
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('lodash', 'wp-polyfill', 'wp-redux-routine'), 'version' => '3522d2a2e5e9bf8f231f96c47d7fb93b');
1+
<?php return array('dependencies' => array('lodash', 'wp-polyfill', 'wp-redux-routine'), 'version' => 'cc7565f89caa7d3150c8aee593a46367');

assets/js/llms-blocks.asset.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('jquery', 'lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-rich-text', 'wp-server-side-render', 'wp-url'), 'version' => '59f0d96c303b2be3cb16b1f516d10f2f');
1+
<?php return array('dependencies' => array('jquery', 'lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-rich-text', 'wp-server-side-render', 'wp-url'), 'version' => '307288dd7d86a8e56fd36f3eb1b4565b');

assets/js/llms-blocks.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

i18n/lifterlms-blocks.pot

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GPLv3.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: LifterLMS Blocks 2.3.2\n"
5+
"Project-Id-Version: LifterLMS Blocks 2.4.0\n"
66
"Report-Msgid-Bugs-To: https://lifterlms.com/my-account/my-tickets\n"
77
"Last-Translator: Team LifterLMS <[email protected]>\n"
88
"Language-Team: Team LifterLMS <[email protected]>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2022-02-22T11:28:13-07:00\n"
12+
"POT-Creation-Date: 2022-02-25T08:52:58-07:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: llms/dev 0.0.3\n"
1515
"X-Domain: lifterlms\n"
@@ -54,7 +54,7 @@ msgstr ""
5454
msgid "No HTML was returned."
5555
msgstr ""
5656

57-
#: includes/class-llms-blocks-post-instructors.php:136
57+
#: includes/class-llms-blocks-post-instructors.php:137
5858
msgid "Sorry, you are not allowed to edit the object instructors."
5959
msgstr ""
6060

includes/class-llms-blocks-post-instructors.php

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package LifterLMS_Blocks/Classes
66
*
77
* @since 1.0.0
8-
* @version 1.7.1
8+
* @version 2.4.0
99
*/
1010

1111
defined( 'ABSPATH' ) || exit;
@@ -122,11 +122,12 @@ public function maybe_set_default_instructor( $post_id, $post, $update ) {
122122
*
123123
* @since 1.0.0
124124
* @since 1.7.1 Decode JSON prior to saving.
125+
* @since 2.4.0 Fix access to non-existing variable when current user canno edit the course/membership.
125126
*
126-
* @param string $value Instructor data to add to the object (JSON).
127-
* @param WP_Post $object WP_Post object.
128-
* @param string $key name of the field.
129-
* @return null|WP_Error
127+
* @param string $value Instructor data to add to the object (JSON).
128+
* @param WP_Post $object WP_Post object.
129+
* @param string $key Name of the field.
130+
* @return null|WP_Error
130131
*/
131132
public function update_callback( $value, $object, $key ) {
132133

@@ -135,7 +136,7 @@ public function update_callback( $value, $object, $key ) {
135136
'rest_cannot_update',
136137
__( 'Sorry, you are not allowed to edit the object instructors.', 'lifterlms' ),
137138
array(
138-
'key' => $name,
139+
'key' => $key,
139140
'status' => rest_authorization_required_code(),
140141
)
141142
);

lifterlms-blocks.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Plugin Name: LifterLMS Blocks
1212
* Plugin URI: https://github.com/gocodebox/lifterlms-blocks
1313
* Description: WordPress Editor (Gutenberg) blocks for LifterLMS.
14-
* Version: 2.3.2
14+
* Version: 2.4.0
1515
* Author: LifterLMS
1616
* Author URI: https://lifterlms.com/
1717
* Text Domain: lifterlms
@@ -27,7 +27,7 @@
2727

2828
// Define Constants.
2929
if ( ! defined( 'LLMS_BLOCKS_VERSION' ) ) {
30-
define( 'LLMS_BLOCKS_VERSION', '2.3.2' );
30+
define( 'LLMS_BLOCKS_VERSION', '2.4.0' );
3131
}
3232

3333
/**

0 commit comments

Comments
 (0)