[lead]This short code will output any source codes in a beautiful way.[/lead]

Attribute(s)

[list type=”unordered”]

  • source: specify the source code type (values: xml, html, css, php, js, java, sql, bash, shell, plain)
  • [/list]

    Demo

    [row]

    HTML

    [code source=”html”]

    [/code]

    CSS

    [code source=”css”]
    .shortcode_google-map { margin: 20px 0 }
    [/code]

    JS

    [code source=”js”]
    easeOutBounce: function (x, t, b, c, d) {
    if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, [/code]

    PHP

    [code source=”php”]
    function is_post_type($type){
    global $wp_query;
    if($type == get_post_type($wp_query->post->ID)) return true;
    return false;
    }
    [/code]

    [/row]

    [spacer top=”24px” bottom=”24px”][/spacer]