/
jetpack.php
executable file
·56 lines (49 loc) · 1.31 KB
/
jetpack.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Jetpack Compatibility File
* See: http://jetpack.me/
*
* @package Pinkman
*/
function pinkman_jetpack_setup() {
/**
* Add theme support for Infinite Scroll.
* See: http://jetpack.me/support/infinite-scroll/
*/
add_theme_support( 'infinite-scroll', array(
'container' => 'content',
'footer' => 'page',
) );
/**
* Add theme support for Featured Content.
* See: http://jetpack.me/support/featured-content/
*/
add_theme_support( 'featured-content', array(
'featured_content_filter' => 'pinkman_get_featured_posts',
'max_posts' => 6,
//'include_featured' => true,
) );
/**
* Add theme support for Social Links.
* See: http://jetpack.me/support/featured-content/
*/
add_theme_support( 'social-links', array(
'facebook',
'twitter',
'linkedin'
) );
}
add_action( 'after_setup_theme', 'pinkman_jetpack_setup' );
/**
* Get our Featured Content posts
*/
function pinkman_get_featured_posts() {
return apply_filters( 'pinkman_get_featured_posts', array() );
}
/**
* Do not exclude the Featured Posts from the main blog query
*/
function jeherve_add_featured_content_to_blog() {
remove_action( 'pre_get_posts', array( 'Featured_Content', 'pre_get_posts' ) );
}
add_action( 'init', 'jeherve_add_featured_content_to_blog', 31 ); // Immediately after FC hooks in.