Index: nodewords_nodetype.module
--- nodewords_nodetype.module Base (BASE)
+++ nodewords_nodetype.module Locally Modified (Based On LOCAL)
@@ -73,16 +73,17 @@
     );
 
     if (user_access('allow PHP replacements')) {
+      $phpcode = variable_get('nodewords_nodetype_desc_php_'. $form['#node_type']->type, '');
       $form['nodewords_nodetype']['description']['advanced'] = array(
         '#type' => 'fieldset',
         '#title' => t('Advanced PHP replacement'),
         '#collapsible' => TRUE,
-        '#collapsed' => TRUE,
+        '#collapsed' => empty($phpcode),
       );
       $form['nodewords_nodetype']['description']['advanced']['nodewords_nodetype_desc_php'] = array(
         '#type' => 'textarea',
         '#title' => t('PHP replacement'),
-        '#default_value' => variable_get('nodewords_nodetype_desc_php_'. $form['#node_type']->type, ''),
+        '#default_value' => $phpcode,
         '#description' => t('Code must be included within %php_tags tags. You can add any php code here to perform a particular replacement on the description meta tag information after token substitution. %description and %php_description are available to be used within this code. %title is the actual description meta tags defined above with any token replacement. Be careful if the title has single or double quotes in it. %php_description is replaced with a PHP code that defines a $description variable that you can use along your eval code with the replaced string (quotes are not a problem here). A good starting poing would be: <code>%code</code>.', array('%php_tags' => '<?php ?>', '%code' => '<?php %php_description return $description; ?>')),
       );
     }
