id ) { $screen->add_help_tab( array( 'id' => 'syntax_highlighter', 'title' => __('Prism Highlighter'), 'content' => '

How to use the Prism Highlighter

Possibility Nr. 1:

You got the code from a Gist at Github. Then you can insert the code directly into the visual editor, WordPress automatically encloses the code with the <pre> element. Then go to the text view and add <code class = "language-xxx"> behind the <pre> element. XXX stands for the code to be highlighted. Supported are markup (html), css, php and javascript. Do not forget that before the closing </ pre> is a closing </ code>. Once this is done, you can switch back to the editor\'s visual view.

Example: <pre><code class="language-php">Your Code</code></pre>

Possibility Nr. 2:

Your code comes from your HTML editor (like Brackets, Atom, Dreamweaver and so on). Then first click on »Preformatted« in the visual view and paste the code. Then change to the text view and add the code element with the language class.

Example: <pre><code class="language-php">Your Code</code></pre>

DE: Möglichkeit Nummer 1:

Du hast den Code von einem Gist bei Github bekommen. Dann kannst Du den Code direkt in den Visuellen Editor einfügen, WordPress umschließt den Code automatisch mit dem <pre> Element. Gehe im Anschluss daran in die Textansicht und füge dort hinter dem <pre> Element ein <code class="language-xxx"> hinzu. XXX steht für den Code, den es zu highlighten gilt. Unterstützt werden markup (html), css, php und javascript. Vergiss nicht, dass vor dem schließenden </pre> ebenfalls ein schließendes </code> gehört. Ist dies erledigt, kannst Du bereits wieder in die visuelle Ansicht des Editors wechseln.

Beispiel: <pre><code class="language-php">Dein Code</code></pre>

DE: Möglichkeit Nummer 2:

Dein Code stammt aus Deinem HTML-Editor (wie z.B. Brackets, Atom, Dreamweaver). Dann klicke in der visuellen Ansicht zuerst auf »Vorvormatiert« und füge den Code dann ein. Wechsle im Anschluss daran dann in die Textansicht und ergänze dort wie bei Möglichkeit eins das Code-Element mit der Language-Klasse.

Beispiel: <pre><code class="language-php">Dein Code</code></pre>

', )); } } add_action( 'contextual_help', 'tb_contextual_help_prism', 10, 3 );