Commit Graph

64 Commits

Author SHA1 Message Date
Drew Jaynes e147ba60b0 Docs: Convert the description for the optional `$args` parameter in `WP_Rewrite::add_permastruct()` into a hash notation.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 21:35:26 +00:00
Drew Jaynes 9f4d5731e9 Docs: Improve more formatting and syntax for inline comments in `WP_Rewrite`.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 21:24:24 +00:00
Drew Jaynes 17010f97c7 Docs: Add saner formatting and make readability improvements to a variety of inline comments in `WP_Rewrite` and `WP_Rewrite::generate_rewrite_rules()`.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 21:18:25 +00:00
Sergey Biryukov 0b13fdf2fc Docs: Fix typo in [34944].
See #34218.
Built from https://develop.svn.wordpress.org/trunk@34955


git-svn-id: http://core.svn.wordpress.org/trunk@34920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 21:00:26 +00:00
John Blackbourn db4f4c5538 Improve the parameter names and inline documentation for `add_rewrite_rule()`, `WP_Rewrite::add_rule()`, and `WP_Rewrite::add_external_rule()`.
Fixes #34197

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


git-svn-id: http://core.svn.wordpress.org/trunk@34911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 17:28:25 +00:00
Drew Jaynes 305ae14461 Docs: Fix third-person singular verbs in DocBlock summaries throughout `WP_Rewrite`.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 17:12:24 +00:00
Drew Jaynes d2dee54669 Docs: Relocate some more DocBlock-level `@see` tags and add some missing `@access` tags in `WP_Rewrite`.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 16:51:24 +00:00
Drew Jaynes 1e6f1c9a9b Docs: Relocate some DocBlock-level `@see` tags in `WP_Rewrite`.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 16:49:24 +00:00
Drew Jaynes 02645d5711 Docs: Remove invalid inline `@link` tags from a variety of DocBlocks in `WP_Rewrite`.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 16:47:25 +00:00
Drew Jaynes d1fd329ea2 Docs: Add a file header to wp-includes/class-wp-rewrite.php.
See #34218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 16:41:26 +00:00
Gary Pendergast 83c3e3e00e Embeds: Add oEmbed provider support.
For the past 6 years, WordPress has operated as an oEmbed consumer, allowing users to easily embed content from other sites. By adding oEmbed provider support, this allows any oEmbed consumer to embed posts from WordPress sites.

In addition to creating an oEmbed provider, WordPress' oEmbed consumer code has been enhanced to work with any site that provides oEmbed data (as long as it matches some strict security rules), and provides a preview from within the post editor.

For security, embeds appear within a sandboxed iframe - the iframe content is a template that can be styled or replaced entirely by the theme on the provider site.

Props swissspidy, pento, melchoyce, netweb, pfefferle, johnbillion, extendwings, davidbinda, danielbachhuber, SergeyBiryukov, afercia

Fixes #32522.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 10:36:25 +00:00
Scott Taylor 619063b4e2 Rewrite: allow `add_rewrite_rule|WP_Rewrite::add_rule()` to accept an associative array for the value of `$redirect` instead of requiring a query string.
Adds unit tests.

Props scribu, DrewAPicture.
Fixes #16840.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 01:11:25 +00:00
Scott Taylor 175d476b0e Canonical/Rewrite: sanity check posts that are paged with `<!--nextpage-->`. Page numbers past the max number of pages are returning the last page of content and causing infinite duplicate content.
Awesome rewrite bug: the `page` query var was being set to `'/4'` in `$wp`. When cast to `int`, it returns `0` (Bless you, PHP). `WP_Query` calls `trim( $page, '/' )` when setting its own query var. The few places that were checking `page`	before posts were queried now have sanity checks, so that these changes work without flushing rewrites.	

Adds/updates unit tests.

Props wonderboymusic, dd32.
See #11694.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:04:24 +00:00
Scott Taylor 207abc77e1 Rewrite: move `WP_Rewrite` into its own file. `rewrite.php` loads the new files, so this is 100% BC if someone is loading `rewrite.php` directly. New files created using `svn cp`.
The rewrite functions have all kinds of cross-dependencies (like `WP_Query`), so loading the file by itself would have been bizarre (and still is).

Creates: 
`rewrite-constants.php` 
`rewrite-functions.php` 
`class-wp-rewrite.php` 

`rewrite.php` contains only top-level code. Class file only contains the class. Functions file only contains functions.

See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 04:42:20 +00:00