Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Custom XML file to be read by Flash SWF
- * Install : wp-content/config.xml.php
- * Description : Grabs two custom fields from post 101 and generates a configuration XML file
- * Dependencies : must adjust wp-load.php path in case this file is not inside wp-content/
- * Usage : within Flash, call this XML generator: "http://yourdomain.com/wp-content/config.xml.php"
- */
- require_once "../wp-load.php";
- $phone = get_post_meta(101, 'phone', true);
- $email = get_post_meta(101, 'email', true);
- $xml = <<<EOT
- <data>
- <settings>
- <phone>{$phone}</phone>
- <email>{$email}</email>
- </settings>
- </data>
- EOT;
- echo $xml;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement