Skip to content

Instantly share code, notes, and snippets.

vec2 rotate(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(c, -s, s, c);
return m * v;
}
@vanzo16
vanzo16 / shortcode.php
Created October 20, 2018 17:00 — forked from artikus11/shortcode.php
Шорткод вывода постов по ID
add_shortcode( 'art_related_posts', 'related_posts_function' );
function related_posts_function ($atts){
$atts = shortcode_atts( array(
'id' => '',
'count' => 3
), $atts );
$args = array(
'post_type' => 'post',
'post_status' => 'publish',