Skip to content

Commit

Permalink
Merge pull request #206 from gocodebox/dev
Browse files Browse the repository at this point in the history
Release Version 2.5.2
  • Loading branch information
eri-trabiccolo authored Nov 1, 2023
2 parents 142fd70 + bb1756b commit cb7395a
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 14 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
LifterLMS Blocks Changelog
==========================

v2.5.2 - 2023-11-01
-------------------

##### Bug Fixes

+ Fixed an issue when duplicating a LifterLMS preset form field. [#169](https://github.com/gocodebox/lifterlms-blocks#169)

##### Developer Notes

+ Improved compatibility with PHP 8.2.


v2.5.1 - 2023-06-13
-------------------

Expand Down
2 changes: 1 addition & 1 deletion assets/js/llms-blocks.asset.php
Original file line number Diff line number Diff line change
@@ -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-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url'), 'version' => 'f5f6dbb6512469b72f2c');
<?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-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url'), 'version' => '195603b663842d6022f9');
2 changes: 1 addition & 1 deletion assets/js/llms-blocks.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require-dev": {
"lifterlms/lifterlms-cs": "dev-trunk",
"lifterlms/lifterlms-tests": "^3.1.0"
"lifterlms/lifterlms-tests": "^4.1.1"
},
"minimum-stability": "dev",
"require": {
Expand Down
6 changes: 3 additions & 3 deletions i18n/lifterlms-blocks.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 Blocks 2.5.1\n"
"Project-Id-Version: LifterLMS Blocks 2.5.2\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-06-13T14:50:27+00:00\n"
"POT-Creation-Date: 2023-11-01T11:11:34+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: llms/dev 0.0.4-alpha.0\n"
"X-Domain: lifterlms\n"
Expand Down Expand Up @@ -37,7 +37,7 @@ msgstr ""
msgid "https://lifterlms.com/"
msgstr ""

#: includes/blocks/class-llms-blocks-course-information-block.php:48
#: includes/blocks/class-llms-blocks-course-information-block.php:62
#: assets/js/llms-blocks.js:3
msgid "Course Information"
msgstr ""
Expand Down
14 changes: 14 additions & 0 deletions includes/blocks/class-llms-blocks-course-information-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ class LLMS_Blocks_Course_Information_Block extends LLMS_Blocks_Abstract_Block {
*/
protected $is_dynamic = true;

/**
* Displayed title of the block.
*
* @var string
*/
public $title;

/**
* Size of the title.
*
* @var string
*/
public $title_size;

/**
* Add actions attached to the render function action.
*
Expand Down
6 changes: 3 additions & 3 deletions lifterlms-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
* Plugin Name: LifterLMS Blocks
* Plugin URI: https://github.com/gocodebox/lifterlms-blocks
* Description: WordPress Editor (Gutenberg) blocks for LifterLMS.
* Version: 2.5.1
* Version: 2.5.2
* Author: LifterLMS
* Author URI: https://lifterlms.com/
* Text Domain: lifterlms
* Domain Path: /i18n
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Requires at least: 5.5
* Tested up to: 5.9
* Tested up to: 6.4
*/

// Restrict Direct Access.
defined( 'ABSPATH' ) || exit;

// Define Constants.
if ( ! defined( 'LLMS_BLOCKS_VERSION' ) ) {
define( 'LLMS_BLOCKS_VERSION', '2.5.1' );
define( 'LLMS_BLOCKS_VERSION', '2.5.2' );
}

/**
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-blocks",
"version": "2.5.1",
"version": "2.5.2",
"description": "blocks",
"author": "LifterLMS",
"homepage": "https://lifterlms.com/",
Expand Down
12 changes: 10 additions & 2 deletions src/js/blocks/form-fields/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Edit components
*
* @since 2.0.0
* @version 2.2.0
* @version 2.5.2
*/

// External deps.
Expand Down Expand Up @@ -109,6 +109,7 @@ const setupAtts = ( atts, blockAtts, addingField ) => {
* @since 2.0.0
* @since 2.0.1 Use non-unique error notice IDs for reusable multiple error notice.
* @since 2.2.0 Remove reusable multiple error notice.
* @since 2.5.2 Exclude LifterLMS preset fields when computing `addingField`.
*
* @param {Object} props Component properties.
* @return {Object} HTML component fragment.
Expand All @@ -127,7 +128,14 @@ export function EditField( props ) {
{ isDuplicate } = select( fieldsStore ),
inFieldGroup = context[ 'llms/fieldGroup/fieldLayout' ] ? true : false,
addingField =
attributes.name && isDuplicate( attributes.name, clientId ),
attributes.name &&
isDuplicate( attributes.name, clientId ) &&
/**
* Allow LifterLMS preset fields to be duplicated without altering their id and name attributes.
*
* @see {@link https://github.com/gocodebox/lifterlms-blocks/issues/169}
*/
0 !== name.indexOf( 'llms/form-field-user-' ),
/**
* Prevent confirmation fields from being copied/pasted into the editor out of their intended context.
*
Expand Down

0 comments on commit cb7395a

Please sign in to comment.