summaryrefslogtreecommitdiff
path: root/api/head.php
diff options
context:
space:
mode:
authorMax2019-02-10 01:32:47 +0100
committerMax2019-02-10 01:33:04 +0100
commitcf48c3ba4aba8833d67fa13e25610a34d0a34aa5 (patch)
tree3a5c65063cf72bc4b723bbaadd51b0837199ec70 /api/head.php
parent5cf8e8317a5230a5eb0b460975d668d77490ab8f (diff)
downloadfuselkoenig_de-cf48c3ba4aba8833d67fa13e25610a34d0a34aa5.tar.gz
New api method to get wp_head() as JSON.
Diffstat (limited to 'api/head.php')
-rw-r--r--api/head.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/api/head.php b/api/head.php
new file mode 100644
index 0000000..1dc6cb4
--- /dev/null
+++ b/api/head.php
@@ -0,0 +1,12 @@
+<?php
+
+function fk_wp_head() {
+ ob_start();
+ wp_head();
+ $content = ob_get_contents();
+ $content = array("head" => $content);
+ ob_end_clean();
+
+ return $content;
+}
+