So, a user of the plugin asked me on how to make the plugin also have parameters for the xsl file. And I ended up coding it because it seemed simpler that way.
This this post servers as much as a test bed as a presentation of the different kind of options one can use:
So lets start with the most basic way to use this plugin:
Use:
[XmlProcessor wp-content/plugins/CPT_XslProcessor/example]
Result
[XmlProcessor wp-content/plugins/CPT_XslProcessor/example]
or:
[XmlProcessor xml=”wp-content/plugins/CPT_XslProcessor/example.xml” xslt=”wp-content/plugins/CPT_XslProcessor/example.xsl”]
Result:
[XmlProcessor xml="wp-content/plugins/CPT_XslProcessor/example.xml" xslt="wp-content/plugins/CPT_XslProcessor/example.xsl"]
Now, lets say you want to add options to the xsl file:
Use:
[XmlProcessor wp-content/plugins/CPT_XslProcessor/example params=”default_param=this is the replaced default parameter”]
Result:
[XmlProcessor wp-content/plugins/CPT_XslProcessor/example params="default_param=this is the replaced default parameter"]
or:
[XmlProcessor xml=”xml_filepath” xslt=”xslt_filepath” params=”default_param=this is the replaced default parameter”]
Result:
[XmlProcessor xml="wp-content/plugins/CPT_XslProcessor/example.xml" xslt="wp-content/plugins/CPT_XslProcessor/example.xsl" params="default_param=this is the replaced default parameter"]
And that should actually be working now