private static function _page_sample_template($post_type)
 {
     // Validate post type
     if (!self::_is_existing_post_type($post_type)) {
         self::_page_display_error();
         return;
     }
     $current_theme_name = get_current_theme();
     $current_theme_path = get_stylesheet_directory();
     $hash = array();
     $data = get_option(self::db_key, array());
     $tpl = file_get_contents(CCTM_PATH . '/tpls/sample_template_code.tpl');
     $tpl = htmlentities($tpl);
     $msg = sprintf(__('WordPress supports a custom theme file for each registered post-type (content-type). Copy the text below into a file named <strong>%s</strong> and save it into your active theme.', CCTM::txtdomain), 'single-' . $post_type . '.php');
     $msg .= sprintf(__('You are currently using the %1$s theme. Save the file into the %2$s directory.', CCTM::txtdomain), '<strong>' . $current_theme_name . '</strong>', '<strong>' . $current_theme_path . '</strong>');
     $data = get_option(self::db_key, array());
     $def = array();
     if (isset($data[$post_type]['custom_fields'])) {
         $def = $data[$post_type]['custom_fields'];
     }
     //print_r($def); exit;
     $custom_fields_str = '';
     foreach ($def as $d) {
         $custom_fields_str .= sprintf("\t\t<strong>%s:</strong> <?php print_custom_field('%s'); ?><br />\n", $d['label'], $d['name']);
     }
     // Populate placeholders
     $hash['post_type'] = $post_type;
     $hash['custom_fields'] = $custom_fields_str;
     $sample_code = StandardizedCustomFields::parse($tpl, $hash);
     include 'pages/sample_template.php';
 }