<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Custom template hooks
 *
 * @package 
 */

/**
 * Posts
 *
 */
// all posts
add_action( 'wp_custom_loop_before',		'wp_custom_post_title',				8 );
add_action( 'wp_custom_loop_before',		'wp_custom_articles_wrap_start', 	9 );

add_action( 'wp_custom_loop_post',			'wp_custom_posts', 					10 );

add_action( 'wp_custom_loop_after',			'wp_custom_articles_wrap_end', 		20 );

// single post
add_action( 'wp_custom_single_post',		'wp_custom_blog_title',		9 );
add_action( 'wp_custom_single_post',		'wp_custom_post_header',	10 );
//add_action( 'wp_custom_single_post',		'wp_custom_post_excerpt',	12 );
add_action( 'wp_custom_single_post',		'wp_custom_post_thumbnail',	15 );
add_action( 'wp_custom_single_post',		'wp_custom_post_content', 	20 );
add_action( 'wp_custom_single_post', 		'wp_custom_post_footer', 	30 );

add_action( 'wp_custom_single_post', 		'we_video_embed',			11);
add_action( 'wp_custom_post_content_after', 'we_show_tags', 			10);

/**
 * Pages
 *
 * @see  wp_custom_page_header()
 * @see  wp_custom_page_content()
 */
add_action( 'wp_custom_page',       'wp_custom_page_header',	10 );
add_action( 'wp_custom_page',       'wp_custom_page_content',	20 );
add_action( 'wp_custom_page',       'wp_custom_page_footer',	30 );

// custom page layout
add_action( 'wp_custom_content_after_main', 'we_page_after_main', 	10 );

/**
 * Sidebar
 */
add_action( 'wp_custom_sidebar_before_wrap', 'wp_custom_posts_sidebar', 10 );

/**
 * Shortcodes
 */
add_shortcode( 'newsletter', 		'custom_shortcode_newsletter' );
add_shortcode( 'follow', 			'custom_shortcode_follow' );
add_shortcode( 'other-posts', 		'custom_shortcode_other_posts' );
add_shortcode( 'explainer-videos',	'custom_shortcode_videos' );
add_shortcode( 'we-tag-cloud',		'custom_shortcode_tags' );
add_shortcode( 'logotipi',			'custom_shortcode_logos' );
add_shortcode( 'testimonials',		'custom_shortcode_testimonials' );
add_shortcode( 'simple-steps',		'custom_shortcode_steps' );
add_shortcode( 'team',				'custom_shortcode_team' );
add_shortcode( 'faq',				'custom_shortcode_faq' );
add_shortcode( 'we-arhiv',			'custom_shortcode_categories' );
add_shortcode( 'html-sitemap',		'custom_shortcode_sitemap' );
add_shortcode( 'we-blog',			'custom_shortcode_blog' );
add_shortcode( 'we-contact',		'custom_shortcode_contact' );

/**
 * Extra filters
 */
add_filter( 'oembed_result', 'remove_youtube_showinfo', 10, 3 );
// change src for lazyload
add_filter( 'post_thumbnail_html', 'filter_post_thumbnail_html', 10, 5 ); 