mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Sanitize "cat" query var and cast to int before looking for a category template
git-svn-id: https://develop.svn.wordpress.org/trunk@7586 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -363,8 +363,8 @@ function get_author_template() {
|
||||
|
||||
function get_category_template() {
|
||||
$template = '';
|
||||
if ( file_exists(TEMPLATEPATH . "/category-" . get_query_var('cat') . '.php') )
|
||||
$template = TEMPLATEPATH . "/category-" . get_query_var('cat') . '.php';
|
||||
if ( file_exists(TEMPLATEPATH . "/category-" . absint( get_query_var('cat') ) . '.php') )
|
||||
$template = TEMPLATEPATH . "/category-" . absint( get_query_var('cat') ) . '.php';
|
||||
elseif ( file_exists(TEMPLATEPATH . "/category.php") )
|
||||
$template = TEMPLATEPATH . "/category.php";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user