wp_head()
Equivalent in Mecha
#115
taufik-nurrohman
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Kalau kita ingin menyematkan, misalnya dua JavaScript eksternal yang berbeda bagaimana penerapannya, Mas? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Mecha makes use of PHP output buffer by default, so you can manipulate the buffer result right before it is shown as the response body.
We have
content
hook to change the buffer result as you like:Example code to insert something right before the
</body>
tag:If your intention is to insert asset files such as CSS and JavaScript code, you can utilize the
Asset
class. These feature implementations may be more similar to thewp_enqueue_script()
function in WordPress:Beta Was this translation helpful? Give feedback.
All reactions