[gnomeweb-wp] adjusted php formatting of wppo.genxml.php
- From: Vinicius Scopel Depizzol <vdepizzol src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnomeweb-wp] adjusted php formatting of wppo.genxml.php
- Date: Wed, 2 Feb 2011 04:26:33 +0000 (UTC)
commit 441ce20c2a63099c0fa69c562c55b9f15c7bff78
Author: Vinicius Depizzol <vdepizzol gmail com>
Date: Wed Feb 2 02:22:24 2011 -0200
adjusted php formatting of wppo.genxml.php
wp-content/plugins/wppo/wppo.genxml.php | 68 +++++++++++++++---------------
1 files changed, 34 insertions(+), 34 deletions(-)
---
diff --git a/wp-content/plugins/wppo/wppo.genxml.php b/wp-content/plugins/wppo/wppo.genxml.php
index 7840def..d059c80 100644
--- a/wp-content/plugins/wppo/wppo.genxml.php
+++ b/wp-content/plugins/wppo/wppo.genxml.php
@@ -18,71 +18,71 @@
// This code by now only generates an XML with all the content from
// WordPress database.
-require_once(ABSPATH . "wp-config.php");
+require_once (ABSPATH . "wp-config.php");
function wppo_generate_po_xml () {
global $wpdb;
- $myrows = $wpdb->get_results("
+ $myrows = $wpdb->get_results ("
SELECT ID, post_content, post_title, post_excerpt, post_name
FROM wp_posts
WHERE post_type != 'revision' && post_type != 'nav_menu_item'
");
- header("Content-type: text/xml");
+ header ("Content-type: text/xml");
- $broken_dom_pages = array();
+ $broken_dom_pages = array ();
- $dom = new DOMDocument('1.0', 'utf-8');
- $dom->formatOutput = true;
- $root = $dom->createElement("website");
+ $dom = new DOMDocument ('1.0', 'utf-8');
+ $dom->formatOutput = true;
+ $root = $dom->createElement ("website");
- foreach($myrows as $key => $value) {
- $page = $dom->createElement("page");
+ foreach ($myrows as $key => $value) {
+ $page = $dom->createElement ("page");
// ID
- $page_id = $dom->createAttribute('id');
- $page_id_value = $dom->createTextNode($value->ID);
- $page_id->appendChild($page_id_value);
- $page->appendChild($page_id);
+ $page_id = $dom->createAttribute ('id');
+ $page_id_value = $dom->createTextNode ($value->ID);
+ $page_id->appendChild ($page_id_value);
+ $page->appendChild ($page_id);
// page_title
- $page_title = $dom->createElement("title");
- $page_title_value = $dom->createTextNode($value->post_title);
- $page_title->appendChild($page_title_value);
- $page->appendChild($page_title);
+ $page_title = $dom->createElement ("title");
+ $page_title_value = $dom->createTextNode ($value->post_title);
+ $page_title->appendChild ($page_title_value);
+ $page->appendChild ($page_title);
// page_excerpt
- $page_excerpt = $dom->createElement("excerpt");
- $page_excerpt_value = $dom->createTextNode($value->post_excerpt);
- $page_excerpt->appendChild($page_excerpt_value);
- $page->appendChild($page_excerpt);
+ $page_excerpt = $dom->createElement ("excerpt");
+ $page_excerpt_value = $dom->createTextNode ($value->post_excerpt);
+ $page_excerpt->appendChild ($page_excerpt_value);
+ $page->appendChild ($page_excerpt);
// page_name
- $page_name = $dom->createElement("name");
- $page_name_value = $dom->createTextNode($value->post_name);
- $page_name->appendChild($page_name_value);
- $page->appendChild($page_name);
+ $page_name = $dom->createElement ("name");
+ $page_name_value = $dom->createTextNode ($value->post_name);
+ $page_name->appendChild ($page_name_value);
+ $page->appendChild ($page_name);
// page_content
- $value->post_content = wpautop($value->post_content);
+ $value->post_content = wpautop ($value->post_content);
- $content_xml = $dom->createDocumentFragment();
- $content_xml->appendXML('<html>'.$value->post_content.'</html>');
+ $content_xml = $dom->createDocumentFragment ();
+ $content_xml->appendXML ('<html>'.$value->post_content.'</html>');
if ($content_xml == false) {
$broken_dom_pages[] = $value->ID;
}
- $page_content = $dom->createElement("content");
- $page_content->appendChild($content_xml);
- $page->appendChild($page_content);
+ $page_content = $dom->createElement ("content");
+ $page_content->appendChild ($content_xml);
+ $page->appendChild ($page_content);
- $root->appendChild($page);
+ $root->appendChild ($page);
}
- $dom->appendChild($root);
- $content = $dom->saveXML();
+ $dom->appendChild ($root);
+ $content = $dom->saveXML ();
return $content;
}
?>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]