[ create a new paste ] login | about

Link: http://codepad.org/iloURpIt    [ raw code | output | fork ]

PHP, pasted on Oct 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use Framework\Controller\Controller;

global $wp_query;

$_post_type = filter_input( INPUT_GET, 'post_type' );
$_post_type = $_post_type ? $_post_type : 'any';

query_posts(
	array_merge(
		$wp_query->query,
		[
			'post_type' => $_post_type,
		]
	)
);


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use Framework\Controller\Controller;

global $wp_query;

$_post_type = filter_input( INPUT_GET, 'post_type' );
$_post_type = $_post_type ? $_post_type : 'any';

query_posts(
	array_merge(
		$wp_query->query,
		[
			'post_type' => $_post_type,
		]
	)
);


Create a new paste based on this one


Comments: