Commit Graph

23 Commits

Author SHA1 Message Date
Scott Taylor 47f2c42528 Inline `<script>`s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need `CDATA` comments.
Props tw2113 for the initial patch.
See #18788.


git-svn-id: https://develop.svn.wordpress.org/trunk@31034 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 05:45:17 +00:00
Scott Taylor f6f12912e2 Improve some docs for `@param`. Remove an unneeded `$wpdb` global import.
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@30979 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-20 20:55:21 +00:00
Scott Taylor 4d46475b3d Improve various `@param` docs for `src/wp-includes/*`.
See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30681 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-01 01:33:34 +00:00
Drew Jaynes (DrewAPicture) ccc5f88887 Ensure inline code is markdown-escaped as such, and that code snippets in descriptions are properly indented.
Affects DocBlocks for the following core elements:
* Backtick-escapes a `<link>` tag in a parameter description for the `embed_oembed_discover` hook
* Inline code fixes in the summary and return description for `WP_List_Table::get_table_classes()`
* Removes HTML markup from the summary for `WP_List_Table::display_rows_or_placeholder()`
* Backtick-escapes a `<tr>` tag in a parameter description for `WP_Users_List_Table::single_row()`
* Converts non-DocBlocks into multi-line comments in `WP_Dependencies::do_items()`
* Removes HTML markup from the summary for the `comment_form_top` hook.
* Inline code and snippet fixes in the description for `wp_get_schedules()`

Props rarst for the initial patch.
See #30473.


git-svn-id: https://develop.svn.wordpress.org/trunk@30537 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 04:57:17 +00:00
Drew Jaynes (DrewAPicture) f843741d33 Ensure inline code is markdown-escaped as such, and that code snippets in descriptions are properly indented.
Affects DocBlocks for the following core elements:
* Two arguments in `_walk_bookmarks()`
* A code snippet in the class header for `WP_Roles`
* A code snippet in the class header for `WP_HTTP_Proxy`
* Inline code fixes in the summary and a parameter description for `WP_oEmbed::discover()`
* An argument description in `_WP_Editors::parse_settings()`
* Inline code fixes in the summary and a parameter description the `embed_oembed_discover` hook.

Props rarst.
See #30473.


git-svn-id: https://develop.svn.wordpress.org/trunk@30536 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 04:41:15 +00:00
Scott Taylor 31df6204d0 Fix the return docs for `WP_Embed->maybe_make_link()`.
See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30178 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-03 02:26:34 +00:00
Drew Jaynes (DrewAPicture) 3cc10d77a0 Remove redundant and erroneous `@uses` tag from most core inline documentation.
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.

Fixes #30191.


git-svn-id: https://develop.svn.wordpress.org/trunk@30105 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 01:04:55 +00:00
Mark Jaquith 7063377539 Use HTTPS URLs for core.trac.wordpress.org
see #27115

git-svn-id: https://develop.svn.wordpress.org/trunk@29788 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-29 13:27:55 +00:00
Andrew Nacin ca32a2d410 Pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@29707 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-04 15:22:58 +00:00
Sergey Biryukov 41a2e31b43 Don't limit WP_Embed::cache_oembed() to posts and pages.
props bordoni, helen.
fixes #28639.

git-svn-id: https://develop.svn.wordpress.org/trunk@29557 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-20 19:31:46 +00:00
Drew Jaynes (DrewAPicture) 8feaba4ca2 Clean up some missing `@access` tags and other tweaks for 4.0.0-functionality docs.
See #28885.


git-svn-id: https://develop.svn.wordpress.org/trunk@29455 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-09 19:31:35 +00:00
Drew Jaynes (DrewAPicture) 1a2da86366 Inline documentation cleanup for 4.0 audit.
Document the first parameter, `$time`, in the 'oembed_ttl' filter, added in [28972].

See #14759 and #28885.


git-svn-id: https://develop.svn.wordpress.org/trunk@29160 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-14 00:43:51 +00:00
Helen Hou-Sandi 3adcda996b Improve oEmbed caching. Introduces the concept of a TTL for oEmbed caches and a filter for `oembed_ttl`.
We will no longer replace previously valid oEmbed responses with an `{{unknown}}` cache value. When this happens due to reaching a rate limit or a service going down, it is data loss, and is not acceptable. This means that oEmbed caches for a post are no longer deleted indiscriminately every time that post is saved.

oEmbed continues to be cached in post meta, with the addition of a separate meta key containing the timestamp of the last retrieval, which is used to avoid re-requesting a recently cached oEmbed response. By default, we consider a valued cached in the past day to be fresh. This can greatly reduce the number of outbound requests, especially in cases where a post containing multiple embeds is saved frequently.

The TTL used to determine whether or not to request a response can be filtered using `oembed_ttl`, thus allowing for the possibility of respecting the optional oEmbed response parameter `cache_age` or altering the period of time a cached value is considered to be fresh.

Now that oEmbeds are previewed in the visual editor as well as the media modal, oEmbed caches are often populated before a post is saved or published. By pre-populating and avoiding having to re-request that response, we also greatly reduce the chances of a stampede happening when a published post is visible before oEmbed caching is complete.

As it previously stood, a stampede was extremely likely to happen, as the AJAX caching was only triggered when `$_GET['message']` was 1. The published message is 6. We now trigger the caching every time `$_GET['message']` is present on the edit screen, as we are able to avoid triggering so many HTTP requests overall.

props markjaquith. fixes #14759. see #17210.


git-svn-id: https://develop.svn.wordpress.org/trunk@28972 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-03 16:44:15 +00:00
Sergey Biryukov 4176aa347e Pass $url parameter to wp_embed_defaults() and 'embed_defaults' filter.
props wpsmith, sabreuse, jacobdubail.
fixes #20151.

git-svn-id: https://develop.svn.wordpress.org/trunk@28923 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-30 11:15:33 +00:00
Andrew Ozz df6eb733eb Secure embeds in the editor (first run):
- When the user pastes an embeddable http URL, try to get the https embed.
- If an embed provider doesn't support ssl embeds, show a placeholder/error message.
- Revise the way we return error messages.
See #28195, #28507.

git-svn-id: https://develop.svn.wordpress.org/trunk@28919 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-30 05:48:16 +00:00
Scott Taylor 3b060c1931 Read the `src` attribute for the `[embed]` shortcode if the shortcode's body is empty.
These work:
`[embed src="https://www.youtube.com/watch?v=ZqD-LPOWIT0"]`
`[embed src="https://www.youtube.com/watch?v=ZqD-LPOWIT0"][/embed]`

If you do:
`[embed src="https://www.youtube.com/watch?v=ZqD-LPOWIT0"]http://any-other-url.com[/embed]`

... "http://any-other-url.com" will be the URL that is parsed.

Props kovshenin, aaroncampbell for making initial patches.
Fixes #24456.



git-svn-id: https://develop.svn.wordpress.org/trunk@28559 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-23 18:05:24 +00:00
Scott Taylor 26af443ade Add access modifiers to methods/members in `WP_Embed`.
See #27881, #22234.


git-svn-id: https://develop.svn.wordpress.org/trunk@28510 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:46:56 +00:00
Drew Jaynes (DrewAPicture) 3c80d5f86a Use a proper docs-specific variable for the first parameter passed to the `embed_oembed_discover` filter.
See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28378 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-13 04:28:30 +00:00
Drew Jaynes (DrewAPicture) b5612f8b80 Priority fixes for various existing hook documentation.
Props kpdesign.
See #26869


git-svn-id: https://develop.svn.wordpress.org/trunk@28083 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-12 00:00:32 +00:00
John Blackbourn 9bd9f00257 Inline documentation for core shortcode attributes.
Props DrewAPicture, johnbillion.
Fixes #25661.


git-svn-id: https://develop.svn.wordpress.org/trunk@26915 602fd350-edb4-49c9-b593-d223f7449a82
2014-01-07 16:06:48 +00:00
Andrew Nacin c87ad6023d Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.


git-svn-id: https://develop.svn.wordpress.org/trunk@25868 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-22 17:21:32 +00:00
Drew Jaynes d02ef44f33 Inline documentation for hooks in wp-includes/class-wp-embed.php.
Props swissspidy, kpdesign.
Fixes #25515.


git-svn-id: https://develop.svn.wordpress.org/trunk@25726 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-08 04:42:20 +00:00
Andrew Nacin b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00