当前位置

Short code examples

Short code snippets what are part of the paragraph, should be wrapped inside <code></code>

Use function <code>system()</code> for indetifing your theme

results as

Use function system() for indetifing your theme

我补充一个例子:
代码引用 $system["name"] = "theme name";

Long code examples

Longer code examples should be wrapped inside <pre></pre>:

function system($field) {
  $system["name"] = "theme name"; 
  $system["author"] = "authorname"; 
  $system["description"] = "description of the theme";

  return $system[$field];    
}

HTML in code examples

If you use HTML in you example code, you have to convert tags delimiters < > to a entities &lt; and &gt;, otherwise they will considered as part of the markup. For example:

<pre>
This is my <b>example code</b>
</pre>

results as

This is my example code

what is wrong. The correct example would be

<pre>
This is my &lt;b&gt;example code&lt;/b&gt;
</pre>

what results as:

This is my <b>example code</b>

我补充一个例子:

This is my <code>example code</code>