Skip to content

Commit fbe5c15

Browse files
author
Thomas Patrick Levy
authored
Merge pull request #156 from gocodebox/dev
Version 2.3.2
2 parents b2832e0 + e56b589 commit fbe5c15

File tree

8 files changed

+58
-13
lines changed

8 files changed

+58
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
LifterLMS Blocks Changelog
22
==========================
33

4+
v2.3.2 - 2022-02-22
5+
-------------------
6+
7+
##### Updates and Enhancements
8+
9+
+ Added an option to specify a custom checkout form title for free access plans.
10+
11+
412
v2.3.1 - 2022-01-26
513
-------------------
614

assets/js/llms-blocks.asset.php

Lines changed: 1 addition & 1 deletion
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' => 'e0ef8eab7d2ca2ae12996050f03c4ddf');
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');

assets/js/llms-blocks.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

i18n/lifterlms-blocks.pot

Lines changed: 10 additions & 2 deletions
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.1\n"
5+
"Project-Id-Version: LifterLMS Blocks 2.3.2\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-01-26T08:48:53-07:00\n"
12+
"POT-Creation-Date: 2022-02-22T11:28:13-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"
@@ -1082,6 +1082,14 @@ msgstr ""
10821082
msgid "Not displaying form title."
10831083
msgstr ""
10841084

1085+
#: assets/js/llms-blocks.js:24
1086+
msgid "Free Access Plan Form Title"
1087+
msgstr ""
1088+
1089+
#: assets/js/llms-blocks.js:24
1090+
msgid "The form title to be shown for free access plans."
1091+
msgstr ""
1092+
10851093
#: assets/js/llms-blocks.js:24
10861094
msgid "Revert to Default"
10871095
msgstr ""

lifterlms-blocks.php

Lines changed: 2 additions & 2 deletions
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.1
14+
* Version: 2.3.2
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.1' );
30+
define( 'LLMS_BLOCKS_VERSION', '2.3.2' );
3131
}
3232

3333
/**

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lifterlms-blocks",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "blocks",
55
"author": "LifterLMS",
66
"homepage": "https://lifterlms.com/",

src/js/sidebar/form-document-settings/index.js

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Displays only on `llms_form` post types.
55
*
66
* @since 1.6.0
7-
* @version 2.0.0
7+
* @version 2.3.2
88
*/
99

1010
// WP Deps.
@@ -14,6 +14,7 @@ import {
1414
ExternalLink,
1515
PanelRow,
1616
ToggleControl,
17+
TextControl,
1718
} from '@wordpress/components';
1819
import { compose } from '@wordpress/compose';
1920
import { dispatch, select, withDispatch, withSelect } from '@wordpress/data';
@@ -44,6 +45,7 @@ class FormDocumentSettings extends Component {
4445
* @since 1.12.0 Add a class name to the document sidebar.
4546
* Add default template restoration.
4647
* @since 2.0.0 Use default template from location definition in favor of from metadata.
48+
* @since 2.3.2 Add control for the checkout's form title for free access plans.
4749
*
4850
* @return {?Fragment} Component HTML fragment or null when not supported.
4951
*/
@@ -57,11 +59,17 @@ class FormDocumentSettings extends Component {
5759
return null;
5860
}
5961

60-
const { location, link, showTitle, setFormMetas } = this.props,
61-
{ formLocations } = window.llms,
62+
const {
63+
location,
64+
link,
65+
showTitle,
66+
freeApTitle,
67+
setFormMetas,
68+
} = this.props;
69+
const { formLocations } = window.llms,
6270
currentLoc = formLocations[ location ];
6371

64-
// Set default value.
72+
// Set default values.
6573
if ( '' === showTitle ) {
6674
setFormMetas( { _llms_form_show_title: 'yes' } );
6775
}
@@ -196,6 +204,25 @@ class FormDocumentSettings extends Component {
196204
} )
197205
}
198206
/>
207+
{ 'checkout' === location &&
208+
'yes' === showTitle && (
209+
<TextControl
210+
label={ __(
211+
'Free Access Plan Form Title',
212+
'lifterlms'
213+
) }
214+
value={ freeApTitle }
215+
onChange={ ( val ) =>
216+
setFormMetas( {
217+
_llms_form_title_free_access_plans: val,
218+
} )
219+
}
220+
help={ __(
221+
'The form title to be shown for free access plans.',
222+
'lifterlms'
223+
) }
224+
/>
225+
) }
199226
<br />
200227
<PanelRow>
201228
<Button
@@ -233,6 +260,7 @@ class FormDocumentSettings extends Component {
233260
* @since 1.7.2 Only modify select when working with an `llms_form` post type.
234261
* @since 1.12.0 Load the default template meta field.
235262
* @since 2.0.0 Don't load default template from metadata.
263+
* @since 2.3.2 Retrieve form title for free access plans meta field.
236264
*/
237265
const applyWithSelect = withSelect( ( select ) => {
238266
const {
@@ -251,6 +279,7 @@ const applyWithSelect = withSelect( ( select ) => {
251279
link: getCurrentPost().link,
252280
location: meta._llms_form_location,
253281
showTitle: meta._llms_form_show_title,
282+
freeApTitle: meta._llms_form_title_free_access_plans,
254283
};
255284
} );
256285

0 commit comments

Comments
 (0)