{"id":9199,"date":"2025-02-25T09:25:13","date_gmt":"2025-02-25T09:25:13","guid":{"rendered":"https:\/\/sites.hslu.ch\/werkstatt\/?p=9199"},"modified":"2025-02-25T13:05:50","modified_gmt":"2025-02-25T13:05:50","slug":"syntax-highlighting","status":"publish","type":"post","link":"https:\/\/sites.hslu.ch\/werkstatt\/syntax-highlighting\/","title":{"rendered":"Syntax Highlighting"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_section el_class=&#187;dkw-section-lead&#187;][vc_row][vc_column width=&#187;2\/3&#8243; offset=&#187;vc_col-sm-offset-2&#8243;][vc_column_text css=&#187;&#187;]Syntax Hightlighting Plugin Demo[\/vc_column_text][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-section-content&#187;][vc_row][vc_column width=&#187;1\/3&#8243; el_class=&#187;dkw-col-toc&#187; offset=&#187;vc_col-lg-3&#8243;][vc_column_text][\/vc_column_text][\/vc_column][vc_column width=&#187;2\/3&#8243; el_class=&#187;dkw-col-content&#187; offset=&#187;vc_col-lg-6&#8243;][vc_column_text css=&#187;&#187;]Beispiel Arduino Code[\/vc_column_text][vc_column_text css=&#187;&#187;]<\/p>\n<pre><code class=\"language-arduino\">int meinInt = 0;\nfloat meinFloat = 0.2;\nchar meinCharBuchstabe = &#039;A&#039;;\n\/\/ &#039;x&#039; f\u00fcr einzelne Symbole\nchar meinCharWort = &quot;Sali Welt&quot;; \/\/ &quot;x&quot; f\u00fcr Symbolfolgen\n\/\/ sonderfall: Arduno kann LED_BUILTIN und AX als Integer-\n\/\/ Variabeln akzeptieren, da sie benutzt werden, um Pins\n\/\/ anzusteuern:\nint meinBuiltinLEDPin = LED_BUILTIN;\nint meinAnalogInPin = A0;<\/code><\/pre>\n<p>[\/vc_column_text][vc_column_text css=&#187;&#187;]Beispiel PHP Code[\/vc_column_text][vc_column_text css=&#187;&#187;]<\/p>\n<pre><code class=\"language-css\">h1, h2, h3, h4, h5 {\n\tcolor: var(--gold);\n\t-ms-hyphens: auto;\n\t-webkit-hyphens: auto;\n\thyphens: auto;\n}\n\nh1 {\n\tline-height: 1.0;\n}\n\nh2 {\n\tline-height: 1.3;\n}<\/code><\/pre>\n<p>[\/vc_column_text][vc_column_text css=&#187;&#187;]Beispiel CSS Code[\/vc_column_text][vc_column_text css=&#187;&#187;]<\/p>\n<pre><code class=\"language-php\">function pxpp_redirect_logged_in_from_login_page() {\n    \/\/ Nur f\u00fcr eingeloggte Nutzer\n    if ( ! is_user_logged_in() ) {\n        return;\n    }\n    \/\/ Hole die in den Einstellungen definierte Login-Seiten-ID\n    $login_page_id = get_option( &#039;pxpp_login_redirect_page_id&#039;, 0 );\n    if ( ! $login_page_id ) {\n        return;\n    }\n    \/\/ Wenn der aktuelle Seitenaufruf die Login-Seite ist und ein redirect_to-Parameter gesetzt ist, weiterleiten\n    if ( is_page( $login_page_id ) &amp;&amp; ! empty( $_GET[&#039;redirect_to&#039;] ) ) {\n        wp_safe_redirect( esc_url_raw( $_GET[&#039;redirect_to&#039;] ) );\n        exit;\n    }\n}\nadd_action( &#039;template_redirect&#039;, &#039;pxpp_redirect_logged_in_from_login_page&#039;, 1 );\n<\/code><\/pre>\n<p>[\/vc_column_text][\/vc_column][vc_column width=&#187;1\/3&#8243; el_class=&#187;dkw-col-micro&#187; offset=&#187;vc_col-lg-3&#8243;][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-dontprint&#187;][vc_row disable_element=&#187;yes&#187;][vc_column][vc_column_text]<span style=\"color: red\">\u2014 \u2014 \u2014 INFO: In beiden nachfolgenden Post Grids die passenden Recipies und die passenden Talks\u00a0 ausw\u00e4hlen \u2014 \u2014 \u2014<br \/>\n<\/span>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2>Passende Recipies<\/h2>\n<p>[\/vc_column_text][vc_basic_grid post_type=&#187;ids&#187; element_width=&#187;2&#8243; gap=&#187;10&#8243; item=&#187;517&#8243; grid_id=&#187;vc_gid:1740488633435-62a78fe9-99c5-5&#8243;][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-dontprint&#187;][vc_row][vc_column][vc_column_text]<\/p>\n<h2>Passende Talks<\/h2>\n<p>[\/vc_column_text][vc_basic_grid post_type=&#187;ids&#187; element_width=&#187;2&#8243; gap=&#187;10&#8243; item=&#187;517&#8243; grid_id=&#187;vc_gid:1740488633436-21cb8a69-f7d8-1&#8243;][\/vc_column][\/vc_row][\/vc_section]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_section el_class=&#187;dkw-section-lead&#187;][vc_row][vc_column width=&#187;2\/3&#8243; offset=&#187;vc_col-sm-offset-2&#8243;][vc_column_text css=&#187;&#187;]Syntax Hightlighting Plugin Demo[\/vc_column_text][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-section-content&#187;][vc_row][vc_column width=&#187;1\/3&#8243; el_class=&#187;dkw-col-toc&#187; offset=&#187;vc_col-lg-3&#8243;][vc_column_text][\/vc_column_text][\/vc_column][vc_column width=&#187;2\/3&#8243; el_class=&#187;dkw-col-content&#187; offset=&#187;vc_col-lg-6&#8243;][vc_column_text css=&#187;&#187;]Beispiel Arduino Code[\/vc_column_text][vc_column_text css=&#187;&#187;] int meinInt = 0; float [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9199","post","type-post","status-publish","format-standard","hentry","category-unkategorisiert"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts\/9199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/comments?post=9199"}],"version-history":[{"count":9,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts\/9199\/revisions"}],"predecessor-version":[{"id":9208,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts\/9199\/revisions\/9208"}],"wp:attachment":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/media?parent=9199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/categories?post=9199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/tags?post=9199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}