Skip to content

Commit 485b2d4

Browse files
Merge pull request #80 from devgateway/task/TCDICORE-539
2 parents b496edc + d51c496 commit 485b2d4

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devgateway/wp-react-lib": patch
3+
---
4+
5+
Expose more existing functions

wp-react-lib/src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ export {
8383
export * from './types';
8484
export * from './post-type';
8585
export * from './api';
86+
export * from './template-parts';
87+
export { default as EmbeddedGateway } from './embedded/EmbeddedGateway';

wp-react-lib/src/template-parts/Content.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import EmbeddedGateway from '../embedded/EmbeddedGateway'
33
import {Container} from "semantic-ui-react";
44
import {removePatternBrackets, replaceHTMLinks, replaceLink} from "../util";
55

6-
const Enhance = (props) => {
6+
export const Enhance = (props) => {
77
const Component = props.as ? props.as : Container;
88
const filteredProps = ['post', 'pageNumber', 'visibility', 'intl', "as"]
99
const newProps = {}
@@ -19,7 +19,7 @@ const Enhance = (props) => {
1919
/*
2020
WP_Multilang doesn't support patterns translation, this function eliminates the duplicated pattern
2121
* */
22-
const translate = (str, locale = "en") => {
22+
export const translate = (str, locale = "en") => {
2323
if (str==null){
2424
return null;
2525
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export {
2+
Enhance,
3+
translate as dvizTranslate
4+
} from './Content'

wp-react-lib/src/util/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ export const removePatternBrackets = (html) => {
7373
}
7474
};
7575

76-
export default { replaceHTMLinks, replaceLink }
76+
export default { replaceHTMLinks, replaceLink, removePatternBrackets, localReplaceLink };

0 commit comments

Comments
 (0)