Commit Graph

25 Commits

Author SHA1 Message Date
Drew Jaynes
2fa54d0b05 Inline documentation for hooks in wp-includes/template-loader.php.
Props jonlynch.
Fixes #25488.

Built from https://develop.svn.wordpress.org/trunk@25702


git-svn-id: http://core.svn.wordpress.org/trunk@25617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-06 18:41:09 +00:00
Scott Taylor
d7704991b3 Check the value passed to get_post_type_object(). If it's an array, use the first item. get_query_var( 'post_type' ) can be an array if the query has been altered via filters/actions. There are several places in core that pass the query var. Adds unit tests.
In `template-loader.php`, move `is_post_type_archive()` and `is_tax()` directly below `is_home()`.

See #18614, [25291].


Built from https://develop.svn.wordpress.org/trunk@25292


git-svn-id: http://core.svn.wordpress.org/trunk@25256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-06 23:39:09 +00:00
Scott Taylor
a67d551dac Ensure that the post type object is the queried object when a post type has been registered with has_archive => true. Ensure it is not stomped when decorated with tax_query. Adds unit tests.
Props nacin.
Fixes #18614.


Built from https://develop.svn.wordpress.org/trunk@25291


git-svn-id: http://core.svn.wordpress.org/trunk@25255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-06 22:07:09 +00:00
Mark Jaquith
163ef62822 Clean up [22347] a bit. see #14348
git-svn-id: http://core.svn.wordpress.org/trunk@22353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-31 23:01:13 +00:00
Mark Jaquith
08e68c1ec4 When receiving a HEAD request, die() right before we start outputting content.
* Content doesn't make sense for HEAD requests
* Saves wear and tear on the server
* Introduces a filter: exit_on_http_head (we send TRUE through it)

fixes #14348. props mbijon, mitchoyoshitaka.

git-svn-id: http://core.svn.wordpress.org/trunk@22347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-31 21:39:23 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
westi
033aac697c Introduce a template file for the Front Page of a site. Has priority over every other template which applies and falls back to the standard template flow for the page / list of posts.
Fixes #6801

git-svn-id: http://svn.automattic.com/wordpress/trunk@14276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 07:48:09 +00:00
nacin
1eabd22805 Introduce get_index_template(). Allows child themes to override a parent theme's index.php. Props koopersmith, fixes #12635
git-svn-id: http://svn.automattic.com/wordpress/trunk@13819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 13:52:43 +00:00
ryan
dbfb51c6e0 Trim trailing whites
git-svn-id: http://svn.automattic.com/wordpress/trunk@13268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 00:03:42 +00:00
nacin
8ad91e8b54 Add template_include filter, to modify the template path before it is included. Fixes #11242
git-svn-id: http://svn.automattic.com/wordpress/trunk@13252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 12:58:25 +00:00
nacin
84da5911aa Assume WP_DEBUG is defined in wpdb. Remove unnecessary constant() calls. Ensure DB_COLLATE defined as empty string doesn't override default Multisite collation. fixes #12041, see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@13209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-19 01:03:58 +00:00
matt
6943482d3b For some reason taxonomy pages also return is_home, so we need to put this check first.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-21 06:28:50 +00:00
ryan
cce67416a3 Taxonomy queries and urls. Props andy. see #6357
git-svn-id: http://svn.automattic.com/wordpress/trunk@7491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-23 17:02:11 +00:00
westi
efcd1eb5c5 Add file level documentation for template-loader.php. Fixes #5513 props darkdragon.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-24 07:09:36 +00:00
markjaquith
764f50bd3d ABSPATH already has a trailing slash. Props Nazgul. fixes #4607
git-svn-id: http://svn.automattic.com/wordpress/trunk@5820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-07-27 21:28:01 +00:00
matt
14f1c622ff All the query stuff we need for tag= URLs to work.
git-svn-id: http://svn.automattic.com/wordpress/trunk@5149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-03-31 06:16:12 +00:00
ryan
37c1e764de Return instead of exit in template-loader. Props Otto42 and Nazgul. fixes #3790
git-svn-id: http://svn.automattic.com/wordpress/trunk@5104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-03-25 23:39:14 +00:00
ryan
419f125cb7 Handle robots.txt requests and obey blog_plubic setting.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-05-22 22:06:06 +00:00
ryan
6970a75e94 Rewrite API additions and improvements from David House. #2433
git-svn-id: http://svn.automattic.com/wordpress/trunk@3638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-03-12 22:57:00 +00:00
ryan
dd202ce1f9 Death to trailing tabs. Props Mark J. fixes #2405
git-svn-id: http://svn.automattic.com/wordpress/trunk@3517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-02-12 07:53:23 +00:00
ryan
cff4c42d36 Avoid invoking template filters twice. Props David House. fixes #2225
git-svn-id: http://svn.automattic.com/wordpress/trunk@3409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2006-01-06 01:09:16 +00:00
ryan
3587a865c9 Run attachment filter for themes that don't have single.php or page.php. Props podz. fixes #1924
git-svn-id: http://svn.automattic.com/wordpress/trunk@3174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-11-21 02:08:59 +00:00
ryan
f83326f125 Renaming. object and subpost are now attachment. post_type is post_mime_type.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-11-15 22:55:24 +00:00
ryan
45fc6c1664 Image fu from Andy. fixes #1776
git-svn-id: http://svn.automattic.com/wordpress/trunk@2958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-10-20 20:48:32 +00:00
ryan
1baf503d64 Break blog header up into functional chunks. Stick it all in a WP class for now. Make wp() the front door. Move template/theme loader code into template-loader.php. Clean up feed file loadup. Modularize.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-06-10 23:15:13 +00:00