@wordpress/shortcode 3.30.0 → 3.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +7 -19
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -20,15 +20,11 @@ _This package assumes that your code will run in an **ES2015+** environment. If
|
|
|
20
20
|
|
|
21
21
|
Parse shortcode attributes.
|
|
22
22
|
|
|
23
|
-
Shortcodes accept many types of attributes. These can chiefly be divided into
|
|
24
|
-
named and numeric attributes:
|
|
23
|
+
Shortcodes accept many types of attributes. These can chiefly be divided into named and numeric attributes:
|
|
25
24
|
|
|
26
|
-
Named attributes are assigned on a key/value basis, while numeric attributes
|
|
27
|
-
are treated as an array.
|
|
25
|
+
Named attributes are assigned on a key/value basis, while numeric attributes are treated as an array.
|
|
28
26
|
|
|
29
|
-
Named attributes can be formatted as either `name="value"`, `name='value'`,
|
|
30
|
-
or `name=value`. Numeric attributes can be formatted as `"value"` or just
|
|
31
|
-
`value`.
|
|
27
|
+
Named attributes can be formatted as either `name="value"`, `name='value'`, or `name=value`. Numeric attributes can be formatted as `"value"` or just `value`.
|
|
32
28
|
|
|
33
29
|
_Parameters_
|
|
34
30
|
|
|
@@ -42,10 +38,7 @@ _Returns_
|
|
|
42
38
|
|
|
43
39
|
Creates a shortcode instance.
|
|
44
40
|
|
|
45
|
-
To access a raw representation of a shortcode, pass an `options` object,
|
|
46
|
-
containing a `tag` string, a string or object of `attrs`, a string indicating
|
|
47
|
-
the `type` of the shortcode ('single', 'self-closing', or 'closed'), and a
|
|
48
|
-
`content` string.
|
|
41
|
+
To access a raw representation of a shortcode, pass an `options` object, containing a `tag` string, a string or object of `attrs`, a string indicating the `type` of the shortcode ('single', 'self-closing', or 'closed'), and a `content` string.
|
|
49
42
|
|
|
50
43
|
_Parameters_
|
|
51
44
|
|
|
@@ -59,9 +52,7 @@ _Returns_
|
|
|
59
52
|
|
|
60
53
|
Generate a Shortcode Object from a RegExp match.
|
|
61
54
|
|
|
62
|
-
Accepts a `match` object from calling `regexp.exec()` on a `RegExp` generated
|
|
63
|
-
by `regexp()`. `match` can also be set to the `arguments` from a callback
|
|
64
|
-
passed to `regexp.replace()`.
|
|
55
|
+
Accepts a `match` object from calling `regexp.exec()` on a `RegExp` generated by `regexp()`. `match` can also be set to the `arguments` from a callback passed to `regexp.replace()`.
|
|
65
56
|
|
|
66
57
|
_Parameters_
|
|
67
58
|
|
|
@@ -89,8 +80,7 @@ _Returns_
|
|
|
89
80
|
|
|
90
81
|
Generate a RegExp to identify a shortcode.
|
|
91
82
|
|
|
92
|
-
The base regex is functionally equivalent to the one found in
|
|
93
|
-
`get_shortcode_regex()` in `wp-includes/shortcodes.php`.
|
|
83
|
+
The base regex is functionally equivalent to the one found in `get_shortcode_regex()` in `wp-includes/shortcodes.php`.
|
|
94
84
|
|
|
95
85
|
Capture groups:
|
|
96
86
|
|
|
@@ -130,9 +120,7 @@ Generate a string from shortcode parameters.
|
|
|
130
120
|
|
|
131
121
|
Creates a shortcode instance and returns a string.
|
|
132
122
|
|
|
133
|
-
Accepts the same `options` as the `shortcode()` constructor, containing a
|
|
134
|
-
`tag` string, a string or object of `attrs`, a boolean indicating whether to
|
|
135
|
-
format the shortcode using a `single` tag, and a `content` string.
|
|
123
|
+
Accepts the same `options` as the `shortcode()` constructor, containing a `tag` string, a string or object of `attrs`, a boolean indicating whether to format the shortcode using a `single` tag, and a `content` string.
|
|
136
124
|
|
|
137
125
|
_Parameters_
|
|
138
126
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/shortcode",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.0",
|
|
4
4
|
"description": "Shortcode module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "d61700b9f1c72ba0b030fc815ef1685b4f4031ec"
|
|
35
35
|
}
|