Commit Graph

394 Commits

Author SHA1 Message Date
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