Commit Graph

660 Commits

Author SHA1 Message Date
Scott Taylor
7cbd096c2b Links: use consistent late-escaping in some HTML link-generation functions:
* `post_comments_feed_link()`
* `edit_post_link()`
* `edit_comment_link()`
* `edit_bookmark_link()`
* `rel_canonical()`

Props niallkennedy, wonderboymusic.
Fixes #14900.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 20:06:24 +00:00
Konstantin Obenland
c5a684fc27 Introduce template functions for comment navigation:
* `get_the_comments_navigation()` and `the_comments_navigation()` for navigation to the next and previous page of comments.
* `get_the_comments_pagination()` and `the_comments_pagination()` for paginated navigation between pages of comments. Uses `paginate_comments_links()`.

This reduces the need for themes to define their own sets of comment navigation
functions, like Twenty Fifteen and others.
Completes the navigation template tag API started in #29808 for posts.

Fixes #30589.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-21 16:32:26 +00:00
Drew Jaynes
b336035dac Docs: The $post parameter has been passed to the preview_post_link since 4.0.0.
Fixes a version mixup introduced in [34170].

Props dimadin.
See #24345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-21 13:17:26 +00:00
John Blackbourn
015349cd6e Revisions are an exception when it comes to the editing UI. The revision post type cannot have its show_ui argument set to true because this allows access to the post type listing, creation, and editing UI, but get_edit_post_link() needs to return a URL for the editing UI for revisions as that's how the revisions UI works.
Fixes #33763

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


git-svn-id: http://core.svn.wordpress.org/trunk@34321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 16:38:26 +00:00
Scott Taylor
8d2abbffac Feeds/Links: fix feed links for unattached attachments.
Adds unit tests.

Props wonderboymusic, iworks.
Fixes #33693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 20:10:24 +00:00
John Blackbourn
541dbb2711 Remove the ability to view the post listing screen and post editing screen for post types with show_ui set to false. It is unexpected and unintended behaviour that this is allowed.
If your plugin or site does rely on this behaviour, the arguments that are passed to `register_post_type()` should be altered so that `show_ui` is `true`, and arguments such as `show_in_menu`, `show_in_nav_menus`, and `show_in_admin_bar` are `false`.

Fixes #33763
Props swissspidy, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@34145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 10:27:29 +00:00
John Blackbourn
caf90ec1c6 Improve the docblocks for the get_preview_post_link() function and the preview_post_link filter.
See #24345

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


git-svn-id: http://core.svn.wordpress.org/trunk@34144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:25:25 +00:00
John Blackbourn
9cd91030a6 Correct the value of the preview query variable added by get_preview_post_link().
See #24345
Props kitchin

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


git-svn-id: http://core.svn.wordpress.org/trunk@34143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 08:16:24 +00:00
Scott Taylor
54829b6305 Create a function, get_preview_post_link(), to DRY the logic for applying the 'preview_post_link' filter to a URL.
Props TomHarrigan, wonderboymusic.
Fixes #24345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:15:25 +00:00
Scott Taylor
cf2aaf8393 In get_avatar_data(), promote stdClass objects to WP_Comment if passed.
Props DrewAPicture, ocean90.
Fixes #32619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 01:34:25 +00:00
Sergey Biryukov
d9bc36d068 Escape class attribute in edit_post_link() after [34098].
Props Offereins.
See #30563.
Built from https://develop.svn.wordpress.org/trunk@34117


git-svn-id: http://core.svn.wordpress.org/trunk@34085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 13:01:25 +00:00
Sergey Biryukov
97c0303f41 Docs: Add a changelog entry for the $class argument added to edit_post_link() in [34098].
Fixes #30563.
Built from https://develop.svn.wordpress.org/trunk@34115


git-svn-id: http://core.svn.wordpress.org/trunk@34083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 12:20:26 +00:00
Scott Taylor
c745c2deb3 In edit_post_link(), add an argument for the class attribute that defaults to post-edit-link.
Props voldemortensen.
Fixes #30563.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-13 23:34:24 +00:00
Boone Gorges
e0b1340461 Remove extraneous table join in get_adjacent_post().
Since [29248], a table join has not been necessary to process the
`$excluded_terms` parameter of `get_adjacent_post()`. Aside from adding extra
overhead, this join meant that post records that don't have any corresponding
rows in `wp_term_relationships` were erroneously excluded from results.

Fixes #32833.
Built from https://develop.svn.wordpress.org/trunk@34088


git-svn-id: http://core.svn.wordpress.org/trunk@34056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 20:34:24 +00:00
Scott Taylor
db4f22bfb5 After [33961], pass $comment to get_comment_link() where possible to avoid extra cache/db lookups.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 06:21:25 +00:00
Scott Taylor
b05593c0b9 Add a parameter, $post, to get_{$adjacent}_post_join, get_{$adjacent}_post_where, and get_{$adjacent}_post_sort
Props JustinSainton.
Fixes #24597.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:49:24 +00:00
Scott Taylor
d973339738 After [33891], get_comment() returns global $comment if no args are passed and the global is set (after setting the default to null here). This allows us to ditch global comment imports.
See #33638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 02:51:24 +00:00
Scott Taylor
e73ee5ac98 Introduce WP_Comment class to model/strongly-type rows from the comments database table. Inclusion of this class is a pre-req for some more general comment cleanup and sanity.
* Takes inspiration from `WP_Post` and adds sanity to comment caching. 
* Clarifies when the current global value for `$comment` is returned. The current implementation in `get_comment()` introduces side effects and an occasion stale global value for `$comment` when comment caches are cleaned.
* Strongly-types `@param` docs
* This class is marked `final` for now

Props wonderboymusic, nacin.

See #32619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 18:17:24 +00:00
Boone Gorges
a0e00c0d24 Pass taxonomy name to filters in get_adjacent_post().
Props sboisvert.
Fixes #33568.
Built from https://develop.svn.wordpress.org/trunk@33805


git-svn-id: http://core.svn.wordpress.org/trunk@33773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-29 19:59:21 +00:00
Scott Taylor
d8752c191d In get_home_url(), import the $pagenow global to avoid having to check if it exists before comparing against it.
Props KalenJohnson.
See #33545.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 21:03:20 +00:00
Drew Jaynes
45578c525e Docs: Add a description and example to the hook docs for the navigation_markup_template filter, introduced in [33714].
Since the value of the filter is passed through `sprintf()` it's important to note that any filtered output needs to contain the expected specifiers.

See #31315.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 18:08:25 +00:00
Scott Taylor
27b551ee50 Add a filter to _navigation_markup: 'navigation_markup_template'
Props joedolson, mordauk.
Fixes #31315.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 16:34:26 +00:00
Drew Jaynes
dffa53dca8 Docs: Fix a minor alignment issue in the DocBlock for get_pagenum_link().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-23 07:19:27 +00:00
Scott Taylor
45fc6a3def Deprecate post_permalink() (Introduced in 1.0, already had a deprecated argument in 1.3), which just wraps get_permalink() and was only used by XML-RPC in 4 places.
Props solarissmoke.
Fixes #16982.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 06:24:26 +00:00
Scott Taylor
a0e373ef80 For doc block types, favor bool over the few remaining booleans
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 01:03:25 +00:00
Boone Gorges
d99f9d3a22 Improve error checking in get_edit_term_link().
The function should not throw notices when an improper term or taxonomy is
passed.

Props tmatsuur, MikeHansenMe.
Fixes #32786.
Built from https://develop.svn.wordpress.org/trunk@32954


git-svn-id: http://core.svn.wordpress.org/trunk@32925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 14:13:24 +00:00
Drew Jaynes
e872f02bc8 Document default values for optional arguments in edit_term_link().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 10:56:27 +00:00
Drew Jaynes
8a6f4cb0ef Add missing documentation for the $echo parameter in the DocBlock for edit_term_link().
Props tmatsuur.
Fixes #32776.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 10:53:28 +00:00
Scott Taylor
5e994cd6a1 Customizer et al, use elseif in PHP, not else if.
This was corrected via brute force in [31090].

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:01:25 +00:00
Scott Taylor
09c4444150 Make sure that all Gravatars are generated by get_avatar() or at least run through apply_filters( 'get_avatar', $avatar ) for the sake of extensibility.
Props miqrogroove, GlennM, SergeyBiryukov.
Fixes #22650.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 18:36:25 +00:00
Scott Taylor
bf16064448 Fix doc blocks to link-template.php
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-26 18:44:25 +00:00
Andrew Ozz
ad475b3c69 Press This: check the bookmarklet version and add the update notice from PHP.
Fixes #31942.
Built from https://develop.svn.wordpress.org/trunk@32106


git-svn-id: http://core.svn.wordpress.org/trunk@32085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-10 21:08:29 +00:00
Drew Jaynes
d79ecd8bba Various inline documentation syntax fixes in wp-includes/link-template.php.
See #31888.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 16:04:28 +00:00
Andrew Ozz
c04a1affd1 Press This: bump bookmarklet's version. See #31657.
Built from https://develop.svn.wordpress.org/trunk@31800


git-svn-id: http://core.svn.wordpress.org/trunk@31782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-17 01:19:27 +00:00
Andrew Ozz
be24bc3a97 PressThis:
- Filter and select the content on the PHP side. Then pass only the needed data to JS.
- Add the suggested post title and contend directly to the HTML.
- Standardise the data type names.
- Some cleanup/reduction of the code in the bookmarklet.
See #31373.
Built from https://develop.svn.wordpress.org/trunk@31693


git-svn-id: http://core.svn.wordpress.org/trunk@31674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 21:49:28 +00:00
Boone Gorges
34715e3b1a In get_next_comments_link(), ensure proper pagination when no 'cpage' query var is found.
The 'cpage' query var is only set when using `comments_template()` to display
comments. If displaying them in a context where 'cpage' is not yet set, the
default value should be 1, not 0.

Props MomDad, couturefreak.
Fixes #20319.
Built from https://develop.svn.wordpress.org/trunk@31617


git-svn-id: http://core.svn.wordpress.org/trunk@31598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 03:57:24 +00:00
Andrew Ozz
f53199487d PressThis:
- Improve handling of the data, both from the bookmarklet and from server-side parsing.
- Standardize on processing the data in PHP and remove duplicate code from JS.
- Improve the bookmarklet code and remove pre-filtering of the data.
Part props stephdau, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31609


git-svn-id: http://core.svn.wordpress.org/trunk@31590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 19:29:25 +00:00
Drew Jaynes
33d9dd8066 Adjust the description for the $extra_attr argument in the DocBlocks for get_avatar_data() and get_avatar().
See [31561]. See #31469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:19:24 +00:00
Scott Taylor
e899c370a4 In get_avatar_data() and get_avatar(), allow height and width to be specified separately (both default to size). Also allow arbitrary attributes on the <img> via the extra_attr arg.
Props miqrogroove.
See #31469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 21:17:24 +00:00
Andrew Ozz
3146475ed8 PressThis: go back to loading the minified bookmarklet content with file_get_contents(). Add Grunt task to minify bookmarklet.js on precommit and update it in /src. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31545


git-svn-id: http://core.svn.wordpress.org/trunk@31526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 20:16:24 +00:00
Andrew Ozz
64092c309d Press This: JSON encode the URL before appending it to the bookmarklet. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31537


git-svn-id: http://core.svn.wordpress.org/trunk@31518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 03:58:25 +00:00
Andrew Ozz
ce8defbeb4 PressThis:
- Hard-code the minified bookmarklet js. Adding the non-minified bookmarklet to the browser bookmarks bar may have unexpected effect.
- Fix type juggling when checking the bookmarklet version.
Props stephdau, see #31373.
Built from https://develop.svn.wordpress.org/trunk@31535


git-svn-id: http://core.svn.wordpress.org/trunk@31516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 03:03:25 +00:00
Andrew Ozz
1857055bb8 PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373.
Built from https://develop.svn.wordpress.org/trunk@31534


git-svn-id: http://core.svn.wordpress.org/trunk@31515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 01:50:26 +00:00
Sergey Biryukov
add5f9bdf2 Remove src from duplicate hook comments for get_avatar and get_avatar_data.
see #21195.
Built from https://develop.svn.wordpress.org/trunk@31480


git-svn-id: http://core.svn.wordpress.org/trunk@31461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-19 14:59:26 +00:00
Sergey Biryukov
612b9e8ffd Replace hardcoded usage of comment-page with the comment pagination base.
props johnbillion, SergeyBiryukov, webord.
fixes #18084.
Built from https://develop.svn.wordpress.org/trunk@31459


git-svn-id: http://core.svn.wordpress.org/trunk@31440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-14 03:48:27 +00:00
Boone Gorges
eddf93639b In get_adjacent_post(), return private post if the current user has the capacity to read it.
This mirrors the check that happens post-query in `WP_Query`. See #30911.

Props bswatson.
Fixes #30287.
Built from https://develop.svn.wordpress.org/trunk@31302


git-svn-id: http://core.svn.wordpress.org/trunk@31283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-30 02:20:23 +00:00
Scott Taylor
eeda68bbda Fix some erroneous @param annotations.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 22:44:25 +00:00
Boone Gorges
fffd8c8e2d In get_edit_term_link(), default to a valid $object_type.
The $object_type param is used to set the 'post_type' query var, which
determines the post type menu that will be expanded when clicking through to
the term edit page. Not all taxonomies are associated with Posts, so it makes
sense to default to a post_type that the taxonomy is actually associated with.

Props DzeryCZ, juliobox.
Fixes #29251.
Built from https://develop.svn.wordpress.org/trunk@31218


git-svn-id: http://core.svn.wordpress.org/trunk@31199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 21:37:23 +00:00
Gary Pendergast
34636a0e41 If get_avatar_data() is passed an empty value for the default avatar, we should be using the site's avatar_default option instead.
See #21195

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


git-svn-id: http://core.svn.wordpress.org/trunk@31135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:23:24 +00:00
Gary Pendergast
3d051df3c9 In get_avatar_data(), there's no need to return false if we couldn't find an avatar, as Gravatar can handle being given an empty email hash. This allows the default avatar to show when no email address is given.
See #21195


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


git-svn-id: http://core.svn.wordpress.org/trunk@31134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:20:24 +00:00
Boone Gorges
df945fcdcb In get_permalink(), don't resolve to pretty permalink if post has 'future' status.
We already do this for other non-public statuses, to prevent leaking non-public
information about unpublished posts.

Props e.mazovetskiy, CalEvans.
Fixes #30910.
Built from https://develop.svn.wordpress.org/trunk@31114


git-svn-id: http://core.svn.wordpress.org/trunk@31095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 16:40:22 +00:00
Gary Pendergast
5ee3ff435d Add get_avatar_url(), for retrieving just the URL of an avatar, rather than the entire <img> tag that get_avatar() produces.
Unlike `get_avatar()`, `get_avatar_url()` is not pluggable. It can be extended/or modified through the new filters included.

Fixes #21195.

Props mdawaffe, pento, pathawks, DrewAPicture


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


git-svn-id: http://core.svn.wordpress.org/trunk@31088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 04:43:23 +00:00
Sergey Biryukov
3dcd0e2119 Add context for 'Previous' and 'Next' strings in get_the_posts_pagination().
fixes #30762 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31071


git-svn-id: http://core.svn.wordpress.org/trunk@31052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 23:07:22 +00:00
Sergey Biryukov
ed7033ec9b Pass the $adjacent parameter to the "{$adjacent}_post_link" filter.
props ankit.gade@rtcamp.com, kpdesign.
fixes #30440.
Built from https://develop.svn.wordpress.org/trunk@31000


git-svn-id: http://core.svn.wordpress.org/trunk@30982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-30 06:57:23 +00:00
John Blackbourn
d8615f04ac Rename (get_)the_pagination() to (get_)the_posts_pagination() for clarity.
See #29808
Props obenland

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


git-svn-id: http://core.svn.wordpress.org/trunk@30813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-11 10:23:24 +00:00
John Blackbourn
31b74e57da Allow the type argument to be passed through get_the_pagination() as long as its value isn't array.
For trunk.

See #29808

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


git-svn-id: http://core.svn.wordpress.org/trunk@30810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-11 09:39:23 +00:00
Drew Jaynes
23707b1ada Convert various uses of (optional) in core parameter descriptions to use the style prescribed in the inline documentation standards for PHP.
The style for marking parameters optional in inline PHP docs is: `@param type $var Optional. Description. Accepts. Default.`, where Accepts can be omitted on a case-by-case basis.

Props coffee2code.
Fixes #30591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:24:45 +00:00
Drew Jaynes
bffe95d34c Docs Formatting: Backtick-escape inline code for all remaining dynamic hook docs in wp-includes/*.
Affects DocBlocks for the following hooks:
* `auth_post_meta_{$meta_key}`
* `term_links-$taxonomy`
* `customize_render_control_ . $this->id`
* `customize_render_panel_{$this->id}`
* `customize_render_section_{$this->id}`
* `customize_preview_{$this->id}`
* `customize_save_ . $this->id_data[ 'base' ]`
* `customize_update_ . $this->type`
* `customize_value_ . $this->id_data[ 'base' ]`
* `customize_sanitize_js_{$this->id}`
* `comment_form_field_{$name}`
* `comment_{$old_status}_to_{$new_status}`
* `comment_{$new_status}_{$comment->comment_type}`
* `extra_{$context}_headers`
* `get_template_part_{$slug}`
* `get_the_generator_{$type}`
* `get_{$adjacent}_post_join`
* `get_{$adjacent}_post_where`
* `get_{$adjacent}_post_sort`
* `{$adjacent}_post_rel_link`
* `{$adjacent}_post_link`
* `{$adjacent}_image_link`
* `blog_option_{$option}`
* `$permastructname . _rewrite_rules`
* `{$type}_template`
* `theme_mod_{$name}`
* `pre_set_theme_mod_$name`
* `current_theme_supports-{$feature}`
* `get_user_option_{$option}`
* `edit_user_{$field}`
* `pre_user_{$field}`
* `user_{$field}`

See #30552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 12:10:23 +00:00
Drew Jaynes
3e922b9687 Add missing return descriptions for a variety of functions in wp-includes/link-template.php.
Props colorful-tones, dustyf.
See #30406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 04:44:23 +00:00
Drew Jaynes
494a15e1cd 4.1 Docs Audit: Ensure optional arguments in get_the_post_navigation(), the_post_navigation(), get_the_posts_navigation(), the_posts_navigation(), get_the_pagination(), and the_pagination() are properly documented with defaults.
See #30469.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 11:57:24 +00:00
John Blackbourn
473324326d Improvements to the output of the new post navigation template functions, including swapping the position of the previous and next links.
See #29808
Props obenland

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


git-svn-id: http://core.svn.wordpress.org/trunk@30448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 15:19:24 +00:00
Boone Gorges
4743ee9326 In get_adjacent_post(), $excluded_terms should check term_id rather than term_taxonom_id.
See #29663, #22112.
Built from https://develop.svn.wordpress.org/trunk@30263


git-svn-id: http://core.svn.wordpress.org/trunk@30263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-06 20:12:22 +00:00
Drew Jaynes
d19de136c6 Merge a multi-line comment into a single-line comment in wp-includes/link-template.php.
See [30166]. See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-04 15:59:23 +00:00
Scott Taylor
a79b6fdde3 In get_the_pagination(), don't pass $links to _navigation_markup() if it is not a string - paginate_links() can return an array.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 22:41:23 +00:00
Drew Jaynes
f8657d5890 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
John Blackbourn
c0d52583c6 Introduce some new template functions for navigation:
* `get_the_post_navigation()` and `the_post_navigation()` for navigation to the next and previous post.
 * `get_the_posts_navigation() and `the_posts_navigation()` for navigation to the next and previous page of posts.
 * `get_the_pagination()` and `the_pagination()` for paginated navigation between pages of posts. Uses `paginate_links()`.

This reduces the need for themes to define their own sets of navigation functions.

Fixes #29808.
Props obenland.
 

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


git-svn-id: http://core.svn.wordpress.org/trunk@30065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 19:39:24 +00:00
Sergey Biryukov
8889ba6a68 Create correct permalinks for child posts of hierarchical post types when default permalinks are used.
props loushou.
fixes #29615 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29765


git-svn-id: http://core.svn.wordpress.org/trunk@29537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-24 21:30:19 +00:00
Sergey Biryukov
e1eab74aa6 Use wp_normalize_path() in plugins_url().
props paulschreiber.
fixes #29058.
Built from https://develop.svn.wordpress.org/trunk@29375


git-svn-id: http://core.svn.wordpress.org/trunk@29153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-05 01:31:16 +00:00
Scott Taylor
1cfbe0a8ce In get_adjacent_post(), make $excluded_terms work as expected.
Adds unit tests.
Props jessepollak, kovshenin.
Fixes #22112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-19 22:27:14 +00:00
John Blackbourn
32224314a5 Pass the post object rather than the post ID between the post permalink functions. Fixes #28425. Props arnee
Built from https://develop.svn.wordpress.org/trunk@29024


git-svn-id: http://core.svn.wordpress.org/trunk@28812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 15:48:17 +00:00
Drew Jaynes
6623df8b1f Clarify the inline documentation for plugins_url() to reflect that it also works with mu-plugins.
Props ericlewis.
See #28499.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:42:15 +00:00
Drew Jaynes
d4dd02b4ae Remove backticks on $post variables in some short parameter descriptions.
See [28653], [28654].
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:28:14 +00:00
Sergey Biryukov
585213b0b6 Don't generate adjacent links in wp_head() for attachments.
props kovshenin.
fixes #21658.
Built from https://develop.svn.wordpress.org/trunk@28770


git-svn-id: http://core.svn.wordpress.org/trunk@28583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-18 00:05:16 +00:00
Scott Taylor
07d4069444 Don't use variable variables in plugins_url().
See #27881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-11 18:18:14 +00:00
Drew Jaynes
3724252959 Ensure $post_id is documented as optional where applicable.
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-03 04:44:16 +00:00
Sergey Biryukov
a8483f21e2 Adjacent links in wp_head() should only be generated for posts, not pages.
props alexander.rohmann.
fixes #21658.
Built from https://develop.svn.wordpress.org/trunk@28641


git-svn-id: http://core.svn.wordpress.org/trunk@28459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 21:20:14 +00:00
Andrew Nacin
d29dc48134 Forcing SSL logins now forces SSL for the entire admin, with no middle ground.
fixes #10267.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 03:59:15 +00:00
Sergey Biryukov
12ea0c3045 Pass anchor text to 'edit_post_link' and 'edit_comment_link' filters.
props kwight.
fixes #28373.
Built from https://develop.svn.wordpress.org/trunk@28590


git-svn-id: http://core.svn.wordpress.org/trunk@28415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-27 13:43:14 +00:00
Sergey Biryukov
4238d2f53f Fix typo in [28574].
see #28360.
Built from https://develop.svn.wordpress.org/trunk@28575


git-svn-id: http://core.svn.wordpress.org/trunk@28400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-25 16:12:14 +00:00
Sergey Biryukov
ccb6ba9446 Replace $in_same_cat with $in_same_term in adjacent post functions for consistency.
props ixkaito.
fixes #28360.
Built from https://develop.svn.wordpress.org/trunk@28574


git-svn-id: http://core.svn.wordpress.org/trunk@28399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-25 16:10:13 +00:00
Scott Taylor
0910376bfe In edit_post_link(), $post_type_obj is unused.
See #27882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 21:27:15 +00:00
Drew Jaynes
9c2a27129c Inline documentation for hooks in wp-includes/link-template.php.
Props johnbillion, DrewAPicture.
Fixes #27716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-14 02:13:16 +00:00
Drew Jaynes
d568e9029d Improve PHPDoc formatting for get_the_permalink().
See #27700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 20:22:15 +00:00
Andrew Nacin
88e3ebe05b Revert the conversion of adjacent post queries to WP_Query. Explanation on the ticket.
Reverts [27285], [27286], [27287], [27288], [27291], [27292], [27293], [27296], [27633], [27634], [27635], and [27692].

see #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 06:03:15 +00:00
Andrew Nacin
f62f720f0c Shortlinks: Use the home URL for a page on front.
This will result in 'Get Shortlink' hiding by default, as it will match the permalink (also the home URL).

fixes #26871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 02:59:14 +00:00
Andrew Nacin
9669fc94ef Fix excluded_terms passed to get_adjacent_posts_rel_link().
props adelval.
fixes #22406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 22:32:15 +00:00
Andrew Nacin
5eef57ec0e Use the current post's post type when determining post adjacency.
props ethitter.
fixes #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 21:30:14 +00:00
Andrew Nacin
413207be6d Fix various issues with WP_Adjacent_Post:
* Performance / number of queries.
 * Incorrect results caused by sticky posts.
 * Back compat for filters, which had used "WHERE" while WP_Query does not; and fixing table references.

props ethitter.
fixes #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:59:15 +00:00
Andrew Nacin
e9b64fb76d Introduce get_the_permalink() as an alias for get_permalink().
This better aligns it with other the_* and get_the_* function pairs.

props ericmann.
fixes #24164.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 07:24:14 +00:00
Andrew Nacin
e41374d13d Set the taxonomy property in the WP_Adjacent_Post class. fixes #26937.
Built from https://develop.svn.wordpress.org/trunk@27296


git-svn-id: http://core.svn.wordpress.org/trunk@27151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:46:14 +00:00
Drew Jaynes
22b4567550 Document the $taxonomy property in WP_Adjacent_Post.
See #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:21:13 +00:00
Drew Jaynes
c78763a761 Remove now-moot vanity spacing for WP_Adjacent_Post property definitions.
See #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:18:14 +00:00
Drew Jaynes
cf4131f7ad Add inline documentation for properties and other inline docs fixes for WP_Adjacent_Post.
See #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:16:14 +00:00
Andrew Nacin
69bfee0aae One more change. see #26937.
Built from https://develop.svn.wordpress.org/trunk@27288


git-svn-id: http://core.svn.wordpress.org/trunk@27144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:18:13 +00:00
Andrew Nacin
a0dab307b7 We shall call it WP_Adjacent_Post instead. see #26937.
Built from https://develop.svn.wordpress.org/trunk@27287


git-svn-id: http://core.svn.wordpress.org/trunk@27143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:17:13 +00:00
Andrew Nacin
5154c27f82 Make get_adjacent_post() wrap a new WP_Get_Adjacent_Post object that uses WP_Query.
See [27285] for the actual commit, which misfired.

props ethitter!
fixes #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:12:14 +00:00
Andrew Nacin
56550b7c96 Make get_adjacent_post() wrap a new WP_Get_Adjacent_Post object that uses WP_Query.
Built from https://develop.svn.wordpress.org/trunk@27285


git-svn-id: http://core.svn.wordpress.org/trunk@27141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:10:13 +00:00
Andrew Nacin
6dcd5cc69e Fix undefined variable. see #16686.
Built from https://develop.svn.wordpress.org/trunk@27265


git-svn-id: http://core.svn.wordpress.org/trunk@27122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:29:13 +00:00
Drew Jaynes
cb8951b0b3 Remove all @package and @subpackage PHPDoc tags not at the file- or class-levels in core.
See #27200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Andrew Nacin
c102fd5a9d Make the user arguments for get_edit_profile_url() and get_dashboard_url() optional, defaulting to the current user.
props garyc40.
fixes #16686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:08:13 +00:00
Drew Jaynes
8ec1503e15 Correct PHPDoc return description for get_boundary_post().
Props ericlewis.
Fixes #22950.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-22 22:28:13 +00:00
Scott Taylor
03d54a0ac7 Remove code from a previous patch. See [27188].
Built from https://develop.svn.wordpress.org/trunk@27189


git-svn-id: http://core.svn.wordpress.org/trunk@27048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-17 22:46:13 +00:00
Scott Taylor
ca4045ce76 Use selected() where appropriate in touch_time(), page_template_dropdown(), and parent_dropdown(). Also, add proper docs.
Props meloniq, DrewAPicture.
Fixes #25889.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-17 22:27:15 +00:00
Andrew Nacin
1318242221 Docs fix: edit_comment_link() doesn't actually return anything.
props Corphi.
fixes #26436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-24 07:17:36 +00:00
Drew Jaynes
cd8cedc40d First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Sergey Biryukov
74f77b85a6 Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt.
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26120


git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:23:10 +00:00
Sergey Biryukov
8d659b278c Fix docblock formatting. fixes #25893.
Built from https://develop.svn.wordpress.org/trunk@26081


git-svn-id: http://core.svn.wordpress.org/trunk@26001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 13:32:10 +00:00
Andrew Nacin
d0cfa40983 Add jshintrc to qunit.
props jorbin.
see #25187.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +00:00
Andrew Nacin
26d4fdf58d Add a $taxonomy argument to each of the adjacent post functions.
Each took an array of category (IDs) when to search. Those can now be term IDs and each function now has $taxonomy = 'category' as an optional argument.

Functions affected: get_previous_post(), get_next_post(), get_adjacent_post(), get_adjacent_post_rel_link(), adjacent_posts_rel_link(), next_post_rel_link(), prev_post_rel_link(), get_boundary_post(), get_previous_post_link(), previous_post_link(), get_next_post_link(), next_post_link(), get_adjacent_post_link(), adjacent_post_link().

props ethitter.
finally fixes #17807.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-27 21:40:09 +00:00
Andrew Nacin
5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +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
Andrew Nacin
74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Scott Taylor
6a5d2f8fb0 Rather than adding a taxonomy arg to get_category(), convert all uses of get_category() in core to get_term(). By doing so, we negate the need to call _make_cat_compat() in a few places that are only looking for a single property.
Fixes #8722.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-02 19:59:10 +00:00
Andrew Nacin
b07e886ed4 Remove redundant title attributes.
props sabreuse.
see #24766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 14:51:10 +00:00
Scott Taylor
acf3ee37e3 Fix the failing Tests_Link::test_wp_get_shortlink() assertion:
* `wp_get_shortlink()` was firing a notice when reading `$post->ID` while `$post` was null in some cases
* Before the assertions that assume `$GLOBALS['post']` is not set, call `unset( $GLOBALS['post'] );` - there was global spillage from other tests

See #25282.



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


git-svn-id: http://core.svn.wordpress.org/trunk@25334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 17:30:10 +00:00
Andrew Nacin
b302f84b49 Avoid string offset notices in [25319].
Built from https://develop.svn.wordpress.org/trunk@25340


git-svn-id: http://core.svn.wordpress.org/trunk@25302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 03:57:09 +00:00
Scott Taylor
3f5ec88eda Introduce get_previous_post_link(), get_next_post_link(), and get_adjacent_post_link(). Allows developers to retrieve the value without echoing.
Props yoavf, markjaquith, SergeyBiryukov.
Fixes #17302.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 22:12:10 +00:00
Andrew Nacin
3e41af8489 Better protocol validation in set_url_scheme().
Built from https://develop.svn.wordpress.org/trunk@25319


git-svn-id: http://core.svn.wordpress.org/trunk@25281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:08:11 +00:00
Scott Taylor
d24a3940de Make sure the queried object is non-null before accessing its properties.
Props markoheijnen, ryan.
Fixes #21394.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 02:28:11 +00:00
Ryan Boren
f2f939fed4 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25085


git-svn-id: http://core.svn.wordpress.org/trunk@25069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 15:56:08 +00:00
Sergey Biryukov
52e2e61cb1 Use correct order of arguments when calling edit_term_link() from edit_tag_link(). Correct $tag parameter description. props pbiron. fixes #25116.
Built from https://develop.svn.wordpress.org/trunk@25079


git-svn-id: http://core.svn.wordpress.org/trunk@25064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 00:49:09 +00:00
Sergey Biryukov
666aafeda4 Update phpdoc for get_permalink(). props tivnet. fixes #25115.
Built from https://develop.svn.wordpress.org/trunk@25077


git-svn-id: http://core.svn.wordpress.org/trunk@25062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-21 22:12:10 +00:00
Ryan Boren
564d80e29f wp_get_shortlink() improvements.
* Return shortlinks for pages and public CPTs.
* Return shortlinks even when cruft-free links are not enabled.
* Unit tests

Props sillybean, layotte, cais
fixes #18632
see #14760


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


git-svn-id: http://core.svn.wordpress.org/trunk@25017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-15 20:09:09 +00:00
Andrew Nacin
f590791d93 Pass pluginPath to MediaElement.js, fixing playback when ME.js is served through load-scripts.php.
props ocean90, wonderboymusic, azaozz.
fixes #24902.



git-svn-id: http://core.svn.wordpress.org/trunk@24940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-01 13:15:14 +00:00
Andrew Nacin
edc0882d2f If wp-login.php is accessed over HTTPS, get_home_url() should not return HTTPS. This is the same assumption we use in the admin.
props willnorris.
fixes #16822.



git-svn-id: http://core.svn.wordpress.org/trunk@24844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-29 01:21:27 +00:00
Mark Jaquith
60c9de28b4 Allow the_title_attribute() to receive a post argument, and use this in get_adjacent_post_rel_link() to make sure tags are stripped from the title output there.
Fixes #24232.

git-svn-id: http://core.svn.wordpress.org/trunk@24783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-23 16:05:40 +00:00
Mark Jaquith
c44ce3b6e6 Revisions: real URLs and preloading of the requested diff.
* Real URLs are being used now, using pushState. `?revision={id}` or `?from={from}&to={to}`.
* Drop the redundant `action=edit` from the URLs (this is the default).
* The initial comparison is preloaded, whether a single revision or a compare-two situation.

See #24425.

git-svn-id: http://core.svn.wordpress.org/trunk@24664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-11 22:56:48 +00:00
Andrew Nacin
c2db94d10c Use meta caps edit_post, read_post, and delete_post directly, rather than consulting the post type object. map_meta_cap() handles that for us. props markjaquith, kovshenin. fixes #23226.
git-svn-id: http://core.svn.wordpress.org/trunk@24593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 20:05:42 +00:00
Sergey Biryukov
642202c02a Use capitalized ID column name in get_adjacent_post(). props hypertextranch. fixes #24575.
git-svn-id: http://core.svn.wordpress.org/trunk@24506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-24 13:11:43 +00:00
Sergey Biryukov
58c364947f PHPDoc fixes and additions. fixes #24616.
git-svn-id: http://core.svn.wordpress.org/trunk@24490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 12:45:11 +00:00
Sergey Biryukov
23479edf3f Avoid PHP notices in Media Library if an attachment parent does not exist. props trepmal, viniciusmassuchetto, alex-ye, adamsilverstein for initial patches. fixes #22312. fixes #23154.
git-svn-id: http://core.svn.wordpress.org/trunk@24182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-07 11:46:35 +00:00
Sergey Biryukov
4c85664703 Avoid an undefined index notice in get_post_type_archive_feed_link(). props ericlewis. fixes #23744.
git-svn-id: http://core.svn.wordpress.org/trunk@23660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-12 01:50:46 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Nacin
5e0b9ac946 Allow paths with two consecutive dots to be passed to home_url() and all related *_url() functions.
props markjaquith.
fixes #19032.



git-svn-id: http://core.svn.wordpress.org/trunk@23537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 21:04:26 +00:00
Andrew Nacin
48f23ba3a5 Automatically esc_url() the URL echoed by the_permalink().
This makes the_permalink() useful, rather than needing to do `echo esc_url( get_permalink() )` to get proper encoding of ampersands, etc. This will not double-encode when esc_url() has already been applied to the filter here, but that code can now be removed.

props mfields.
fixes #17562.



git-svn-id: http://core.svn.wordpress.org/trunk@23527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 18:56:39 +00:00
Ryan Boren
cc5ed3a485 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Mark Jaquith
a24c40fb00 Consistently use $wp_rewrite->index instead of hardcoding "index.php".
props wonderboymusic. fixes #7337

git-svn-id: http://core.svn.wordpress.org/trunk@23305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-18 13:44:22 +00:00
Andrew Nacin
61577966d4 Pass the post ID from the_shortlink() to wp_get_shortlink() to avoid a change in filters. props SergeyBiryukov, fixes #21309.
git-svn-id: http://core.svn.wordpress.org/trunk@22564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 05:05:34 +00:00
Andrew Nacin
5b8081b787 Return nothing in get_adjacent_post() when $in_same_cat = true but the post doesn't support (or otherwise have) categories. Avoids SQL error. props batmoo, SergeyBiryukov. fixes #15959.
git-svn-id: http://core.svn.wordpress.org/trunk@22472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-08 21:16:15 +00:00
Andrew Nacin
30d048a1e7 Don't return encoded ampersands from get_post_comments_feed_link() to avoid canonical redirect issues. Apply esc_url() when appropriate.
props markjaquith, SergeyBiryukov. fixes #21841.



git-svn-id: http://core.svn.wordpress.org/trunk@22431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 19:56:10 +00:00
Andrew Nacin
6346dfe407 When stripping off a pathinfo home root (/index.php/) do it with case insensitivity. props SergeyBiryukov. fixes #13164. see #8847.
git-svn-id: http://core.svn.wordpress.org/trunk@22298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 20:09:54 +00:00
Ryan Boren
faca571a3a Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: http://core.svn.wordpress.org/trunk@22114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 18:21:47 +00:00
Andrew Nacin
9555a89f0b Do not modify the post object in get_adjacent_post_rel_link(). Prior to 3.5 this could have poisioned the post's cache. props mdawaffe, fixes #22072.
git-svn-id: http://core.svn.wordpress.org/trunk@22095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-01 21:56:20 +00:00
Andrew Nacin
33af30eb7f Use the regular post type UI for editing single media items (attachments).
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
 * Taxonomies attached to the media library now appear in the admin menu (if show_ui).
 * Editing, cropping, uploading, etc. is still very rough, but mostly functional.

API-wise:
 * New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
 * Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
 * wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
 * New edit_form_after_title hook.

props helenyhou, ocean90. see #21391.



git-svn-id: http://core.svn.wordpress.org/trunk@21948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 22:52:54 +00:00
Ryan Boren
a8fa7b3ad2 Honor https in home option.
fixes #20759


git-svn-id: http://core.svn.wordpress.org/trunk@21937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 12:36:50 +00:00
Ryan Boren
ce9a613cb6 Improve performance of query in get_adjacent_post(). Get the ID and then call get_post(). Props apokalyptik, nacin, javert03. fixes #18120
git-svn-id: http://core.svn.wordpress.org/trunk@21919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 18:11:43 +00:00
Ryan Boren
43a9a11ef9 Preserve the $format and $link arguments for passing to the previous|next_post_link filter. Pass $post to the filter.
Props Otto42, helenyhou
fixes #19640 #18764


git-svn-id: http://core.svn.wordpress.org/trunk@21802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 21:36:06 +00:00
Ryan Boren
cfb35a9d85 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 16:29:28 +00:00
Ryan Boren
c1d2f4770d Use set_url_scheme() in the *_url() functions to keep things DRY. Props johnbillion. fixes #20759
git-svn-id: http://core.svn.wordpress.org/trunk@21734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 14:44:17 +00:00
Ryan Boren
c55cf716da Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759
git-svn-id: http://core.svn.wordpress.org/trunk@21664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 13:33:00 +00:00
Andrew Nacin
47572e8305 Fix copy-paste error in get_term_feed_link() that caused the category_feed_link filter to run for tags, rather than tag_feed_link. props andrea.r, SergeyBiryukov. fixes #21589.
git-svn-id: http://core.svn.wordpress.org/trunk@21662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 03:49:44 +00:00
Ryan Boren
af91b41af3 Return WP_Post from get_adjacent_post(). see #21309
git-svn-id: http://core.svn.wordpress.org/trunk@21627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-27 13:13:40 +00:00
Ryan Boren
f56d8278bb Remove return ref from all calls to get_post()
Return WP_Post from get_default_post_to_edit()
Replace all calls to get_page() with get_post()
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-23 20:01:10 +00:00
Ryan Boren
6248d6221c Don't overwrite the post global in _get_page_link(). see #21309
git-svn-id: http://core.svn.wordpress.org/trunk@21596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-23 19:28:58 +00:00
Peter Westwood
791eda2594 When comment paging is enabled make sure to have canonical links for each of the comment pages so that all the comments are indexed instead of just the ones that are displayed on the permalink itself.
Fixes #21579 props jkudish.


git-svn-id: http://core.svn.wordpress.org/trunk@21571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-21 12:53:54 +00:00
Ryan Boren
15dd7f70b0 Remove post type from post nonces. Fixes attachment deletion when EMPTY_TRASH_DAYS is 0. Props c3mdigital, kurtpayne, SergeyBiryukov. fixes #21194
git-svn-id: http://core.svn.wordpress.org/trunk@21504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-14 18:39:15 +00:00
ryan
5ca54e7d2f Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().
Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead.

Group multiple operations within a single switch where possible.

fixes #21432


git-svn-id: http://core.svn.wordpress.org/trunk@21414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 17:51:42 +00:00
nacin
7127ed1197 Move most instances of new WP_User to get_userdata(). see #21120.
git-svn-id: http://core.svn.wordpress.org/trunk@21413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 01:06:05 +00:00
ryan
7b49ad8493 Introduce get_edit_user_link(). Props scribu, georgestephanis, johnbillion. fixes #14787 see #20307
git-svn-id: http://core.svn.wordpress.org/trunk@21364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-30 18:30:03 +00:00
markjaquith
de336fea5c More reliably replace $home_root in $request in get_pagenum_link(). props SergeyBiryukov. fixes #18034
git-svn-id: http://core.svn.wordpress.org/trunk@21174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-28 20:54:20 +00:00
nacin
5d5c5df4ae Add a post_link_category filter to the permalink generation process.
This allows a plugin to easily change which category gets represented
in the URL. Previously, it went off the category with the smallest ID.

props aaroncampbell
fixes #18752



git-svn-id: http://core.svn.wordpress.org/trunk@21169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-28 20:28:57 +00:00
ryan
c0339644ea Shears of vigorous pinking.
git-svn-id: http://core.svn.wordpress.org/trunk@20944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-27 16:25:43 +00:00
ryan
46e4ffe765 Introduce set_url_scheme(). Includes get_site_url() logic for determining when to use http vs. https. Use this to rerite urls to obey is_ssl(). Props jkudish. fixes #18017
git-svn-id: http://core.svn.wordpress.org/trunk@20828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-18 20:04:59 +00:00
nacin
4c7a3a6492 Always escape the output of get_pagenum_link(). fixes #14556.
git-svn-id: http://core.svn.wordpress.org/trunk@20685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 16:29:39 +00:00
duck_
9eaf6fc4c3 Handle uppercase HTML entities in get_previous_posts_link(). Props ounziw. See #4152, fixes #19803.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 15:08:06 +00:00
duck_
a395e06896 Reduce references to the $wp_rewrite global because it's no longer used or a wrapper function can be used instead. Fixes #14546.#14546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-28 20:29:33 +00:00
ryan
d910c26182 Pinking shears 6-20000
git-svn-id: http://svn.automattic.com/wordpress/trunk@20000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-27 19:46:52 +00:00
nacin
f4901860b6 Add reminder to version the Press This bookmarklet link in case breaking changes are made in the future. fixes #20071.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-18 18:46:15 +00:00
nacin
eef151f568 Introduce 'relative' scheme to return only the paths for home_url, site, admin, network_, and get_ variants. props SergeyBiryukov, see #18952.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 16:09:41 +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
ryan
83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
616c35e71c One newline is enough.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:10:39 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan
62afab8db3 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-24 19:13:23 +00:00
ryan
32e25b6aec phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560
git-svn-id: http://svn.automattic.com/wordpress/trunk@18827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 22:57:43 +00:00
nacin
a96e0dff91 Remove support for <link rel=start>, end, up, and index. These rel="" values have been dropped by the HTML Working Group. props Elpie, kawauso, fixes #18128.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-15 16:54:59 +00:00
duck_
2f51b9be0d Fix typos in documentation (wp-includes/[i-z]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-05 19:08:15 +00:00
nacin
be2717a50f Fire _deprecated_argument() for get_adjacent_post()'s crazy excluded_categories 'and' thing. fixes #17673.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-28 17:30:18 +00:00
ryan
3209c103dc Support an array or comma-seperated list of excluded category IDs in get_adjacent_post(). Props solarissmoke. fixes #17673
git-svn-id: http://svn.automattic.com/wordpress/trunk@18477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-28 17:19:51 +00:00
ryan
4fa8ee19e4 Fix handing of super admins that don't have a blog in get_dashboard_url() and login. Props nacin. fixes #17829
git-svn-id: http://svn.automattic.com/wordpress/trunk@18328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-22 19:45:28 +00:00
ryan
daa14c36f9 Bring out the pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-10 23:01:45 +00:00
ryan
8e21f7f098 Translate default link labels for *posts_link(). Props nathanrice, CharlesClarkson. fixes #16998
git-svn-id: http://svn.automattic.com/wordpress/trunk@17728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-27 21:25:09 +00:00
ryan
05f63a579b s/esc_url_raw/esc_url/. Props duck_.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-01 19:29:06 +00:00
markjaquith
59f5dff476 Correctly handle PATHINFO CPTs and CTs that specify with_front=false. fixes #16807 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-10 04:24:48 +00:00
ryan
85f1feed84 Bring out the shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-06 04:11:14 +00:00
ryan
587ea006b5 Translations in title attributes require esc_attr().
git-svn-id: http://svn.automattic.com/wordpress/trunk@17102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-21 17:17:58 +00:00
ryan
cb88352144 Relocate isset check. Props TobiasBg, SergeyBiryukov. fixes #15041
git-svn-id: http://svn.automattic.com/wordpress/trunk@17076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-20 11:41:08 +00:00
ryan
93607280e6 Fix guid generation for page auto drafts. Props shawnparker. fixes #15041
git-svn-id: http://svn.automattic.com/wordpress/trunk@17061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-19 14:42:17 +00:00
nacin
eb574d4e5f Make network_admin_url() return admin_url() when not multisite like its home and site counterparts. Kill the now redundant maybe_network_admin_url() function. fixes #15840.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 09:31:42 +00:00
nacin
bba5e919af maybe_network_admin_url. see #15840.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 06:06:59 +00:00
nacin
fe9e7af8a6 Inline doc fixes for get_next|previous|adjacent_post. props kawauso, fixes #15822.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-15 16:45:14 +00:00
nacin
844636bf1c Don't show extra .0 in _deprecated_argument calls. They should appear in @since docs though.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-15 11:27:38 +00:00
scribu
b624542cc5 Revert logic change made in [16789]. See #13818
git-svn-id: http://svn.automattic.com/wordpress/trunk@16793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-08 09:15:09 +00:00
scribu
2fd70020ea Use has_archive in get_post_type_archive_link(). See #13818
git-svn-id: http://svn.automattic.com/wordpress/trunk@16789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-08 07:51:40 +00:00
ryan
374cfa11b4 Link to edit profile screen within same admin if in network or user admin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-18 23:07:59 +00:00
westi
435c4c2dbf Revert most of [16332] - renaming and deprecating a commonly used function is silly. Improving it is good. Fixes #15407.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-12 21:53:15 +00:00
scribu
98cda5bd65 Replace get_the_category() with get_the_categories(). Props filosofo. Fixes #15407
git-svn-id: http://svn.automattic.com/wordpress/trunk@16332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-12 20:05:37 +00:00
scribu
e2efa78154 use get_queried_object() wrappers throughout. See #14015
git-svn-id: http://svn.automattic.com/wordpress/trunk@16114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-31 11:02:17 +00:00
ryan
f261f86fd0 get_dashboard_url() and get_edit_profile_url(). Determine the appropriate dahboard for a user based on the user's blogs and the current blog. see #14696 #14772
git-svn-id: http://svn.automattic.com/wordpress/trunk@16083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-29 17:48:53 +00:00
nacin
df7f5821db Use correct variable. props linguasite, fixes #14141.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 05:58:49 +00:00
nacin
c2f5e78a1e Use a consistent variable.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 17:51:18 +00:00
nacin
3dfec1ee81 Don't make redundant str_replace calls in link-template. props duck_.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 17:13:52 +00:00
nacin
5e1184aa57 Pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:48:22 +00:00
nacin
76e493c281 Full @since's for 3.1.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:38:42 +00:00
nacin
7ef6752c9d Custom post type archives, second pass. see #13818.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-15 19:44:57 +00:00
ryan
3706be0956 Remove dead code from get_next_posts_link(). Props filosofo. fixes #14850
git-svn-id: http://svn.automattic.com/wordpress/trunk@15817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-15 14:43:31 +00:00
scribu
605476f2d0 Rename get_edit_term_url() to get_edit_term_link() for consistency. See #9702
git-svn-id: http://svn.automattic.com/wordpress/trunk@15801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-14 08:47:41 +00:00
scribu
76ffe532d4 get_edit_term_link() improvements:
* add optional $object_type parameter
	* make $term_id and $taxonomy parameters mandatory
	* pass all relevant information to the filter
	* use in WP_Terms_Table
See #9702


git-svn-id: http://svn.automattic.com/wordpress/trunk@15800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-14 07:35:13 +00:00
scribu
c9190d87d5 Introduce edit_term_link() and get_term_url(). Props yoast. Fixes #9702
git-svn-id: http://svn.automattic.com/wordpress/trunk@15792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-13 14:54:21 +00:00
ryan
9c31fd7c70 First pass of user admin. Network admin and screen cleanups. see #14696
git-svn-id: http://svn.automattic.com/wordpress/trunk@15746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-07 19:34:18 +00:00
dd32
057627e640 Do not load Taxonomy cache & Postmeta cache in get_boundary_post(). Fixes #15028
git-svn-id: http://svn.automattic.com/wordpress/trunk@15701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 09:17:18 +00:00
nacin
a89ebb3322 Have get_boundary_post sort by post_date, not ID. props scribu, jk0. fixes #14035.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-26 08:31:16 +00:00
scribu
449d62100e Introduce 'edit_comment' meta cap. Fixes #14520
git-svn-id: http://svn.automattic.com/wordpress/trunk@15596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 23:35:28 +00:00
nacin
5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
scribu
f2c9a08521 Don't hardcode the pagination base. Fixes #12507
git-svn-id: http://svn.automattic.com/wordpress/trunk@15582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 01:18:42 +00:00
nacin
650f97e684 Adjustments to [15549]. See #11624.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-04 15:51:04 +00:00
scribu
950901ca92 Don't use the global anymore. Fixes #11624
git-svn-id: http://svn.automattic.com/wordpress/trunk@15549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-28 11:57:28 +00:00
ryan
21e3f0f7fa Network Admin, first pass. see #14435
git-svn-id: http://svn.automattic.com/wordpress/trunk@15481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-30 20:34:54 +00:00
nacin
bd703ffa52 get_post_permalink() should take a post ID and pass the post object to the filter. Note that the filter received a post object previously as the variable. props filosofo, fixes #14299 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-13 21:56:49 +00:00
dd32
a14d289755 Alot more tabs. Props jacobsantos & Viper007bond. See #14147
git-svn-id: http://svn.automattic.com/wordpress/trunk@15355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-30 00:05:18 +00:00
westi
4c7dc10d60 Let the filters know its a sample permalink. Props yoast.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 20:52:22 +00:00
nacin
dd9d57ec6a Consider 'auto-draft' a draft in get_post_permalink(). prevents custom post types from getting borked GUIDs. see #13555
git-svn-id: http://svn.automattic.com/wordpress/trunk@14948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 17:25:57 +00:00
ryan
1a552dd029 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@14924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:42:15 +00:00
nacin
b04dfafeac Use a post type object label for edit_post_link's title attribute. props sc0ttkclark.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-25 18:55:51 +00:00
ryan
8f777718c9 Introduce get_term_feed_link(). Use it in wp_list_categories(). Props blepoxp. see #13058
git-svn-id: http://svn.automattic.com/wordpress/trunk@14711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-17 16:21:12 +00:00
wpmuguru
021179162a improvements to get_home/site_url, props andreasnrb + code cleanup, see #12735
git-svn-id: http://svn.automattic.com/wordpress/trunk@14702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-16 21:58:31 +00:00
nacin
b0910977a9 Always pass post ID, not post object, to the_title filter. Original the_title filter in get_the_title() uses ID only. props filosofo, fixes #12631.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-15 05:26:25 +00:00
nacin
af91e5264a Move taxonomy object properties for capabilities into a cap object. Capabilities can be specified via ['capabilities'] (an array keyed by the generic cap name) for register_taxonomy. fixes #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 04:10:17 +00:00
nacin
7734a07cb2 Move post type object capabilities to a 'cap' object. Allow them to be initialized via the 'capabilities' key (an array) when registering support for the post type. Caps are now referred to by the name of the cap as if it was a post, i.e. ->cap->edit_post. see #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 20:45:18 +00:00
westi
c24de5caf8 Make wp_get_shortlink() loop friendly. Fixes #13212 props ryan.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 21:20:17 +00:00
wpmuguru
abed02b32d use homeurl(), props PeteMall, see #9008
git-svn-id: http://svn.automattic.com/wordpress/trunk@14429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 00:28:29 +00:00
ryan
172aa06718 Revert [14347] and [14372]. It broke more than we expected. Try again in 3.1. see #13051
git-svn-id: http://svn.automattic.com/wordpress/trunk@14374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 18:16:22 +00:00
westi
70aa9e12eb Fix the edit post link to cope with the change in behaviour of admin_url to always escape the url. See #13051.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 13:56:35 +00:00
ryan
91354eefee Escape links by default. Props alexkingorg. see #13051
git-svn-id: http://svn.automattic.com/wordpress/trunk@14347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-02 22:53:59 +00:00
westi
ca0b2d6088 Switch to using esc_url{_raw} for the shortlink output as it is a url not just any attribute. Fixes #10640.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-23 21:23:32 +00:00
westi
e88b66ee00 Added escaping to wp_shortlink_wp_head() too. See #10640 props sirzooro.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-23 21:20:16 +00:00
dd32
d792282cea Advertise the correct comment feed link for a Page on the Front. Do not canonical redirect the front page comments feeds to home. Fixes #12452
git-svn-id: http://svn.automattic.com/wordpress/trunk@14141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 06:51:16 +00:00
dd32
87bd780ca9 Display the correct Slug in the permalink preview. Props duck_. Fixes #12870
git-svn-id: http://svn.automattic.com/wordpress/trunk@14124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 01:46:28 +00:00
nacin
c4abc1c875 Add $force_delete to get_delete_post_link(). Remove unnecessary argument. props scribu, fixes #12708
git-svn-id: http://svn.automattic.com/wordpress/trunk@14099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 02:29:10 +00:00
dd32
994b00e85b Correct sample URL's for custom post_type's. uses pretty permalinks if possible. Props duck_. See #12870
git-svn-id: http://svn.automattic.com/wordpress/trunk@14068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-11 08:58:40 +00:00
ryan
a7f987c35a Trigger adjacent_posts_rel_link() from wp_head only for single post pages to avoid unnecessary queries. see #10867
git-svn-id: http://svn.automattic.com/wordpress/trunk@14019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-06 15:06:42 +00:00
nacin
6efe44acbc Have get_search_query() escape by default, like it's echoing counterpart the_search_query(). see #12780
git-svn-id: http://svn.automattic.com/wordpress/trunk@13978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-03 23:38:38 +00:00
dd32
3708584178 Handle uppercase html entities in get_next_posts_link() & get_next_comments_link() (and family) $labels. Fixes #4152
git-svn-id: http://svn.automattic.com/wordpress/trunk@13922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-02 00:07:59 +00:00
ryan
8e4859a35c Use network_*_url(). see #12736
git-svn-id: http://svn.automattic.com/wordpress/trunk@13884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-29 21:45:31 +00:00
ryan
3a69eacbbe Don't stomp scheme arg. see #12736
git-svn-id: http://svn.automattic.com/wordpress/trunk@13882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-29 20:25:30 +00:00
wpmuguru
27b9ed12f8 tweaks to network_*_url(), see #12736
git-svn-id: http://svn.automattic.com/wordpress/trunk@13881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-29 19:57:17 +00:00
ryan
2a13a4a888 network_site_url(), network_home_url(), network_admin_url(). see #12736
git-svn-id: http://svn.automattic.com/wordpress/trunk@13880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-29 17:53:03 +00:00
dd32
f3e9d332d2 Fix the Permalink editor for custom post_types. Fixes #12742
git-svn-id: http://svn.automattic.com/wordpress/trunk@13865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-28 05:23:49 +00:00
nacin
7957161819 Remove references to wp-ajax.php. props TobiasBg, fixes #12400
git-svn-id: http://svn.automattic.com/wordpress/trunk@13831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:44:43 +00:00
nacin
a7feaed0e6 Change @since 3.0 to @since 3.0.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:13:36 +00:00