Introduce require_if_theme_supports(), move post thumbnails functions to there own include and only included them if the theme supports them. See #10928 and [12132]

git-svn-id: http://svn.automattic.com/wordpress/trunk@12134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi
2009-11-01 10:10:06 +00:00
parent 22ae6f36c0
commit 7251aff3f3
4 changed files with 61 additions and 35 deletions

View File

@@ -687,6 +687,9 @@ if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions
if ( file_exists(TEMPLATEPATH . '/functions.php') )
include(TEMPLATEPATH . '/functions.php');
// Load in support for template functions which the theme supports
require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-image-template.php' );
/**
* Runs just before PHP shuts down execution.
*