bricks_update_scripts
Update per-page scripts for a WordPress page by injecting HTML, JS, and CSS before the closing body tag. Add , , and tags directly to the page via wp_footer.
Instructions
Update per-page scripts for a WordPress page. Scripts are output in wp_footer. Include , , and tags as needed — all are output together before . IMPORTANT: WordPress strips backslashes — use String.fromCharCode(10) instead of "\n" in JavaScript strings.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"scripts": "<scripts>"
},
"name": "bricks_update_scripts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | WordPress page/post ID | |
| scripts | Yes | HTML/JS/CSS to inject before </body>. Include <script>, <style>, and <link> tags as needed. |