Commit Graph

25 Commits

Author SHA1 Message Date
Sergey Biryukov 001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Adam Silverstein b287642342 Feeds: improve structure and naming of feed build date helper function.
Simplify overall code structure by passing the required format to the helper function.
Clarify functionality by renaming `get_last_build_date` to `get_feed_build_date`.

Props pento, spacedmonkey.
Fixes #4575.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-18 17:08:52 +00:00
Adam Silverstein 4268033aaf Feeds: ensure build/update date matches current query.
Displaying the correct build date in feeds is as important today as it was twelve years ago when this ticket was opened.

Fix an issue where all feeds in WordPress showed the same date for their last build date (the datapoint is `lastBuildDate`, `updated` or `dc:date` depending on the feed type). 

Introduce a new `get_last_build_date` filter to adjust the date used for `lastBuildDate`. Developers who previously filtered `get_lastcommentmodified` to alter feed dates should use this filter instead.

* `get_last_build_date` extracts the latest post (or comment) in the current WP_Query object.
* In all feed templates, use `get_last_build_date` vs `get_lastpostmodified( 'GMT' );`.

Props stevenkword, spacedmonkey, ryanshoover, mauteri, nacin, jorbin, MikeNGarrett, Denis-de-Bernardy, peaceablewhale.
Fixes #4575.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:39:00 +00:00
Gary Pendergast 56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Rachel Baker 2f263fce99 Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds.
Fixes bug where an invalid Last-Modified value would be returned in feed requests for sites that had 0 items to return. Comment or post feeds will now return the current timestamp as the Last-Modified header value.  Example: a request for the comments feed for a site without any comments.

Replaced use of the local static variable `$cache_lastcommentmodified` to store the modified date in `get_lastcommentmodified()` with the Object Cache API.  The `get_lastcommentmodified()` function returns early if there is a cached value and returns `false` if there where no comments found. Introduced `_clear_modified_cache_on_transition_comment_status()` to flush the `lastcommentmodified` cache key when a comment enters or leaves approval status. In `get_lastpostmodified()` return early if there is a cached value and return `false` if there are no posts found.

Props swissspidy, rachelbaker, dllh, leobaiano.
Fixes #38027.
Built from https://develop.svn.wordpress.org/trunk@38925


git-svn-id: http://core.svn.wordpress.org/trunk@38868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:48:29 +00:00
Konstantin Obenland c69e96422b Themes: Improve document title output.
Introduces more flexibility in filtering all parts of the document title,the
separator, and a way to short-circuit title generation. Plugins can now also
check for theme support and reliably filter the entire output. See #18548.
Deprecates `wp_title()`.

Fixes #31078.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-20 16:21:25 +00:00
Scott Taylor 3ec1d3bf9d Serve RSS feeds with the proper mime-type: `application/rss+xml`. The reason for hacking around browsers by using `text/xml` appears to no longer be relevant.
Props @chriscct7.
Reverts [11334] and [11358]
Fixes #15110.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-09 06:39:24 +00:00
Andrew Nacin 70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin 8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Ryan Boren b87d4b77e5 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25880


git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Drew Jaynes c771851a16 Inline documentation for hooks in wp-includes/feed-rss.php.
Props dustyf.
See #25229.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-20 22:10:10 +00:00
nacin bdd70470e2 Use the site's locale for the feed language. Provides the same result as language_attributes(). Removes the rss_language option. fixes #13440. see #5517.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-29 19:56:33 +00:00
westi d8490aeea2 Add the generator element in feeds through the {rss2|atom|rdf|rss|opml}_head hooks. Fixes #6947 props sivel.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 16:45:16 +00:00
ryan 5224680c4d Deprecates the_content_rss(). Add the_content_feed() and get_the_content_feed(). Convert places that called the_content_rss() with an excerpt length to the_excerpt_rss(). Remove the rss_excerpt_length option. Use the_content_feed() where the_content() was previously used in feeds. Props Viper007Bond.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-28 14:36:48 +00:00
ryan a5e73d3b9b Fix feed autodiscovery. Props peaceablewhale. fixes #9810
git-svn-id: http://svn.automattic.com/wordpress/trunk@11358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-16 05:15:21 +00:00
ryan 191762762a Remove unneeded spaces. Props Denis-de-Bernardy. fixes #108
git-svn-id: http://svn.automattic.com/wordpress/trunk@10952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-16 18:47:41 +00:00
azaozz 3949fb7e90 Add support for automatic feed links in themes, props Viper007Bond, see #8878
git-svn-id: http://svn.automattic.com/wordpress/trunk@10377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-19 05:04:58 +00:00
ryan 09f2286a41 Some file level phpdoc from darkdragon. fixes #5527
git-svn-id: http://svn.automattic.com/wordpress/trunk@6493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-25 20:48:01 +00:00
westi e9cfb43133 Centralise generator generation, move theme generator generation to wp-head hook. Fixes #5085, #4803. props docwhat, Viper007Bond.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-10-06 06:55:24 +00:00
ryan 9b395107f4 Deprecate permalink_single_rss(). Add the_permalink_rss() with accompanying filter. Props joostdevalk and Otto42. fixes #4654
git-svn-id: http://svn.automattic.com/wordpress/trunk@5910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-21 18:27:45 +00:00
rob1n 9ce729e656 Content-Type, not Content-type, as headers are case sensitive. Props foolswisdom and Nazgul. fixes #3545
git-svn-id: http://svn.automattic.com/wordpress/trunk@5640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-06-02 05:21:18 +00:00
rob1n 29eb1e9a2b Fix typo.
git-svn-id: http://svn.automattic.com/wordpress/trunk@5143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-03-29 04:08:54 +00:00
rob1n 5b446f7cf7 Show more relevant titles (current category, date, etc.) in feed titles. fixes #1790
git-svn-id: http://svn.automattic.com/wordpress/trunk@5132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-03-29 01:29:09 +00:00
ryan dbedd143e4 Relocate feed templates to wp-includes. fixes #3846
git-svn-id: http://svn.automattic.com/wordpress/trunk@4927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-23 02:50:05 +00:00