开发者 |
zaus
leadlogic |
---|---|
更新时间 | 2018年7月17日 12:02 |
捐献地址: | 去捐款 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 4.6.1 |
版权: | GPLv2 or later |
/wp-content/plugins/
)/
, and indicate attributes with @
. Numeric indexes by themselves will result in repetition of the parent element (ex. item/%i/sub
could make <item><sub /></item><item><sub /></item>
).Submit an issue to the GitHub issue tracker in addition to / instead of the WP Support Forums.
See "base plugin" Forms: 3rdparty Integration.
Provide the list of headers as though they were a URL querystring, so that
Content-Type: something X-Special-Header: something-elsewould be given as
Content-Type=something&X-Special-Header=something-else
You may also use shortcodes such as base64
in the header.
Separate element names within the same 3rdparty field mapping using /
, so that in order to make:
xyz
abc
you would use credentials/@type
, credentials/user
and credentials/pass
, respectively.
Note: You may nest and wrap elements even if not transforming into XML; they will be submitted as multi-dimensional arrays like:
credentials[@type]=123&credentials[user]=xyz&credentials[pass]=abc
As of v1.3, if there is a standalone numerical index it will cause repetition of the "parent" element.
ex) If the post is:
item => array (
0 => value1,
1 => value2,
2 => value3
)
it will result in
value1
value2
value3
You can accomplish this with the Forms-3rdparty separator [%]
to place your index appropriately.
Just enter the entire root xml in the field, a la http://stackoverflow.com/questions/5992268/simplexml-how-to-correctly-set-encoding-and-xmins
To produce <SomeTag />
, make sure the "Autoclose" option is enabled.
To produce <SomeTag></SomeTag>
, make sure the "Autoclose" option is unchecked.
Use the 'Mask' format, which allows you to specify the result exactly as you want via string replacement (sprintf
), or the 'Replace' format which will replace string tokens ({{3rdparty}}
). Useful for complex XML.
The 'Root Element' field will now be treated as a string-replacement mask (a la sprintf
for "Mask" or str_replace
for "Replace"), so make sure to include the post body with the appropriate placeholder(s) (%s
for "Mask", {{3rdparty_Fields}}
for "Replace").
For 'Mask' format, each '3rd-Party Field' will also be treated the same, using %s
to indicate where the submission value should go.
For 'Replace' format, repeating fields are not handled -- it essentially looks for instances of each "3rd-Party Field" column and replaces it with the corresponding input value.
{{3rdparty}}
multipart/form-data
and 'url' formatting per GitHub issue #6 https://github.com/zaus/forms-3rdparty-xpost/issues/6post
wrapper unless sending as xml (and if you send XML you should specify a wrapper)SimpleXMLElement