[gnomeweb-wp: 3/13] Few cosmetical changes and adding a doc string to the update_pot_file()



commit 223165781289fd57dffa56b866beadfc848ad1a4
Author: Lincoln de Sousa <lincoln comum org>
Date:   Sun Nov 7 12:48:40 2010 -0200

    Few cosmetical changes and adding a doc string to the update_pot_file()

 wp-content/themes/gnome-grass/functions.php |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/wp-content/themes/gnome-grass/functions.php b/wp-content/themes/gnome-grass/functions.php
index 127de4c..6f7294b 100644
--- a/wp-content/themes/gnome-grass/functions.php
+++ b/wp-content/themes/gnome-grass/functions.php
@@ -87,17 +87,16 @@ add_filter('gallery_style', create_function('$a', 'return preg_replace("%
 
 %s", "", $a);'));
 
+/* This action will be fired when a post/page is updated. It's used to
+ * update (regenerate, actually) the pot file with all translatable
+ * strings of the gnome.org website. */
 function update_pot_file ($post) {
   $podir = WP_CONTENT_DIR . '/themes/gnome-grass/po/';
   $xml_file = "{$podir}.tmp.xml";
   file_put_contents ($xml_file, generate_po_xml ());
-
-  $cmd = "/usr/bin/xml2po -o {$podir}gnome.org.pot $xml_file";
-  exec ($cmd);
-
+  exec ("/usr/bin/xml2po -o {$podir}gnome.org.pot $xml_file");
   unlink ($xml_file);
 }
 add_action ('post_updated', 'update_pot_file');
 
-
 ?>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]