Commit Graph

504 Commits

Author SHA1 Message Date
Dominik Schilling
e50f357944 Canonical: Introduce wp_get_canonical_url().
`wp_get_canonical_url()` encapsulates the URL logic of `rel_canonical()` to provide a consistent way to retrieve the canonical URL for a post.
The new filter `get_canonical_url` allows to customize the canonical URL.

Props joostdevalk, jipmoors, DrewAPicture, ocean90.
Fixes #36168.
Built from https://develop.svn.wordpress.org/trunk@37685


git-svn-id: http://core.svn.wordpress.org/trunk@37651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-11 13:31:29 +00:00
Drew Jaynes
e7e20e4b54 Docs: Update the return description for get_preview_post_link() to note that it can also return null.
Props chris_dev, swissspidy.
See #35915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 18:25:28 +00:00
Drew Jaynes
d28f1a08ef Docs: Apply inline @see tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-23 19:01:27 +00:00
Drew Jaynes
c1ba18d147 Docs: Standardize filter docs in wp-includes/link-template.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:27:27 +00:00
Drew Jaynes
fe3b007fdd Docs: Remove inline @see tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Drew Jaynes
49e3bc83dd Docs: Capitalize URL – an acronym for Uniform Resource Locator – when used in the context of inline docs in wp-includes/link-template.php.
Fixes #30406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-20 14:47:28 +00:00
Drew Jaynes
a368295c37 Docs: Notate more optional parameter defaults for a variety of function DocBlocks in wp-includes/link-template.php.
See #30406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-20 14:37:29 +00:00
Drew Jaynes
e58b8ad732 Docs: Notate optional parameter defaults for a variety of function DocBlocks in wp-includes/link-template.php.
See #30406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-20 06:32:29 +00:00
Drew Jaynes
396018ab34 Docs: Properly notate optional parameters as such in a variety of DocBlocks in wp-includes/link-template.php.
See #30406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-19 23:21:27 +00:00
Rachel Baker
a0eab11bc1 Comments: Add parameters to edit_comment_link() to allow specifying a Comment and link class.
Matches the parameters for `edit_post_link()`.

Fixes #36538.

Props flixos90.
Built from https://develop.svn.wordpress.org/trunk@37215


git-svn-id: http://core.svn.wordpress.org/trunk@37181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-15 20:59:29 +00:00
Drew Jaynes
994bfb5b26 Docs: Use third-person singular verbs in DocBlock and hook doc summaries in wp-includes/link-template.php.
See #30406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-15 16:58:27 +00:00
Drew Jaynes
d5e084a5b7 Docs: Improve the usefulness of the DocBlock summary for get_edit_term_link().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 17:48:26 +00:00
Aaron Jorbin
1972aa2a2a Add grunt prerelease task
An unintended consequence of improving the precommit task is that when it's time to run a release, more tasks need to get run to verify things. This adds a prerelease task to help fix that situation. grunt prerelease should include tasks that verify the code base is ready to be released to the wild and find all the tears on the mausoleum floor and help Blood stain the Colosseum doors.

See #35557

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


git-svn-id: http://core.svn.wordpress.org/trunk@36898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 05:37:27 +00:00
Pascal Birchler
033044a872 Taxonomy: Improve backward compatibility on the wp-admin/term.php page.
Specifically, run `do_action( 'edit-tags.php' );` on this new term edit page introduced in [36308]. Changes the GET param back to `tag_ID` and properly sets the screen base in `WP_Screen`.

See #34988.
Built from https://develop.svn.wordpress.org/trunk@36874


git-svn-id: http://core.svn.wordpress.org/trunk@36841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-07 12:56:28 +00:00
Dominik Schilling
e5ea82d81a Spelling: Standardize on "front end"/"back end" (noun) and "front-end"/"back-end" (adjective).
Props obrienlabs, thewanderingbrit.
Fixes #34887.
Built from https://develop.svn.wordpress.org/trunk@36709


git-svn-id: http://core.svn.wordpress.org/trunk@36676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-25 12:53:27 +00:00
Boone Gorges
8b786f3d1c Make $taxonomy parameter optional in get_edit_term_link().
Props nicdford, sc0ttkclark.
Fixes #35922.
Built from https://develop.svn.wordpress.org/trunk@36646


git-svn-id: http://core.svn.wordpress.org/trunk@36613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 20:07:28 +00:00
Drew Jaynes
3e7db642a6 Docs: Slightly simplify the DocBlock summaries for home_url(), get_home_url(), site_url(), and get_site_url().
See #35238. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:06:26 +00:00
Eric Lewis
2d2353cbde General: Document the difference between site_url() and home_url().
`site_url()` returns a url where WordPress application files are accessible (e.g. where the `wp-admin/` folder resides). `home_url()` returns a url where the front-end of the WordPress site can be visited.

See #35238.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 02:55:27 +00:00
Eric Lewis
51ae114302 Networks and sites: Replace "blog" usage with "site" in docs.
This effort focuses on `src/wp-includes/link-template.php`.

Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

Props mrahmadawais.
Fixes #35589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 16:47:29 +00:00
Pascal Birchler
27fa2f65eb Taxonomy: Introduce wp-admin/term.php for editing single terms.
This is similar to `edit.php` -> `post.php` and `users.php` -> `user-edit.php` and fixes a bug where screen options for the list table were shown while editing a term.

Fixes #34988.
Built from https://develop.svn.wordpress.org/trunk@36308


git-svn-id: http://core.svn.wordpress.org/trunk@36275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 08:27:27 +00:00
Drew Jaynes
ca94aafb50 Docs: Add a changelog entry to the DocBlock for get_post_type_archive_link() denoting that posts support was added in 4.5.
See [36225]. See #19902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 17:56:27 +00:00
Eric Lewis
d8e6199126 Permalinks: Make get_post_type_archive_link() work for the 'post' post type.
Props jjj.
See #19902. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-08 22:01:26 +00:00
Dion Hulse
67c5150ba6 Canonical: Output correct canonical links for paged posts when not using pretty permalinks.
Props peterwilsoncc.
Fixes #34890

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


git-svn-id: http://core.svn.wordpress.org/trunk@36061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-26 04:28:26 +00:00
Boone Gorges
9e0f434726 Improve post-filter sanitization of excluded terms in get_adjacent_post().
See [36078], #35211.
Built from https://develop.svn.wordpress.org/trunk@36079


git-svn-id: http://core.svn.wordpress.org/trunk@36044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 20:15:25 +00:00
Boone Gorges
753243a6f7 Move excluded_terms filter in get_adjacent_post().
The filter was added in 4.4 [34528] #9571, but in a place where it could not
affect the adjacent post query.

Fixes #35211.
Built from https://develop.svn.wordpress.org/trunk@36078


git-svn-id: http://core.svn.wordpress.org/trunk@36043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 19:57:27 +00:00
Drew Jaynes
13bead9e58 Docs: Fix the syntax for the get_previous_post_link() DocBlock to ensure it's read and parsed as such instead of as a multi-line comment.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-18 23:14:26 +00:00
John Blackbourn
3f38dfa688 Correct a parameter name in the @param docs for get_home_url().
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@35879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-14 02:45:27 +00:00
Pascal Birchler
54b8c3e53b Docs: Fix some minor DocBlock alignment issues.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@35885


git-svn-id: http://core.svn.wordpress.org/trunk@35849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 15:37:28 +00:00
John Blackbourn
932236420c Move the show_ui logic into the get_edit_post_link() and get_edit_term_link() functions to facilitate post types and terms which specify show_ui as false but provide a custom editing UI via the get_edit_post_link and get_edit_term_link filters.
Fixes #33763
Fixes #33938

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


git-svn-id: http://core.svn.wordpress.org/trunk@35668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-19 16:25:26 +00:00
Drew Jaynes
a92d4f6fcb Docs: Update the default scheme for get_rest_url() from 'json' to 'rest'.
Also adds 'rest' to the documented list of schemes for `home_url()`, `get_home_url()`, `set_url_scheme()`, and the `home_url` and `set_url_scheme` hooks.

Props rachelbaker.
Fixes #34300.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-19 22:39:25 +00:00
Aaron Jorbin
b778726e74 Improve get_post_permalink compatibility with non standard post status
This adds a new filter named `get_post_status` to the function named `get_post_status` which can be used to make additional post types behave like unpublished post status in `get_post_permalink`.

Props misterbisson, antpb, iamfriendly
Fixes #23458


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


git-svn-id: http://core.svn.wordpress.org/trunk@35199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 00:44:26 +00:00
Drew Jaynes
217b661703 Docs: Add missing descriptions for the $wpdb global in DocBlocks all the places.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 23:44:25 +00:00
Drew Jaynes
69c828b77b Template: Pass the $post parameter to the the_permalink filter.
Props chriscct7.
Fixes #34234. See #23882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 05:46:24 +00:00
Drew Jaynes
c2b5aeebb0 Template: Rename the $id parameters in the_permalink(), get_the_permalink(), and get_permalink() to $post.
In all three cases, the functions can accept a post ID, a `WP_Post` object, or a falsey value, which defaults to the value of the global `$post`. Switching to `$post` in this context allows the parameters to better self-document and removes ambiguity in the code they are subsequently used in.

Props chriscct7 for the initial patch.
See #34234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 05:41:29 +00:00
Sergey Biryukov
b40e362711 Fix typo in get_avatar() and get_avatar_data() docs.
Props johnjamesjacoby.
Fixes #34232.
Built from https://develop.svn.wordpress.org/trunk@34988


git-svn-id: http://core.svn.wordpress.org/trunk@34953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-09 15:52:24 +00:00
Sergey Biryukov
3012b862af Add $id parameter to the_permalink(), for consistency with get_permalink().
Props johnjamesjacoby, chriscct7.
Fixes #23882.
Built from https://develop.svn.wordpress.org/trunk@34982


git-svn-id: http://core.svn.wordpress.org/trunk@34947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-09 04:34:24 +00:00
Drew Jaynes
8b4c499664 Docs: There are quite alot of typos in core inline comments.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:48 +00:00
Drew Jaynes
85eafd7632 Themes: Introduce three new arguments for get_the_post_navigation(), in_same_term, excluded_terms, and taxonomy.
The addition of these new arguments brings `get_the_post_navigation()` into argument parity with `get_previous_post_link()` and `get_next_post_link()`, both of which it wraps, and will allow for more flexibility in configuring the next and previous post links for simultaneous display in themes.

Props ChaseWiseman.
Fixes #32618.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 03:41:26 +00:00
Gary Pendergast
cf173408cd Permalinks: Add pretty permalinks for unattached attachments.
Previously, unattached attachments would have unsightly `/?attachment_id=1` URLs. As we've moved away from attachments being specifically attached to posts, instead being Media items, this has made the unattached URLs a more common occurrence.

We can breath easy once more, knowing that the world is a little bit safer from the horror of unnecessarily ugly URLs.

Props SergeyBiryukov, wonderboymusic, pento.

Fixes #1914.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 09:42:26 +00:00
Boone Gorges
18d6b3c8dc Force comment pagination on single posts.
Previously, the 'page_comments' toggle allowed users to disable comment
pagination. This toggle was only superficial, however. Even with
'page_comments' turned on, `comments_template()` loaded all of a post's
comments into memory, and passed them to `wp_list_comments()` and
`Walker_Comment`, the latter of which produced markup for only the
current page of comments. In other words, it was possible to enable
'page_comments', thereby showing only a subset of a post's comments on a given
page, but all comments continued to be loaded in the background. This technique
scaled poorly. Posts with hundreds or thousands of comments would load slowly,
or not at all, even when the 'comments_per_page' setting was set to a
reasonable number.

Recent changesets have addressed this problem through more efficient tree-
walking, better descendant caching, and more selective queries for top-level
post comments. The current changeset completes the project by addressing the
root issue: that loading a post causes all of its comments to be loaded too.

Here's the breakdown:

* Comment pagination is now forced. Setting 'page_comments' to false leads to evil things when you have many comments. If you want to avoid pagination, set 'comments_per_page' to something high.
* The 'page_comments' setting has been expunged from options-discussion.php, and from places in the codebase where it was referenced. For plugins relying on 'page_comments', we now force the value to `true` with a `pre_option` filter.
* `comments_template()` now queries for an appropriately small number of comments. Usually, this means the `comments_per_page` value.
* To preserve the current (odd) behavior for comment pagination links, some unholy hacks have been inserted into `comments_template()`. The ugliness is insulated in this function for backward compatibility and to minimize collateral damage. A side-effect is that, for certain settings of 'default_comments_page', up to 2x the value of `comments_per_page` might be fetched at a time.
* In support of these changes, a `$format` parameter has been added to `WP_Comment::get_children()`. This param allows you to request a flattened array of comment children, suitable for feeding into `Walker_Comment`.
* `WP_Query` loops are now informed about total available comment counts and comment pages by the `WP_Comment_Query` (`found_comments`, `max_num_pages`), instead of by `Walker_Comment`.

Aside from radical performance improvements in the case of a post with many
comments, this changeset fixes a bug that caused the first page of comments to
be partial (`found_comments` % `comments_per_page`), rather than the last, as
you'd expect.

Props boonebgorges, wonderboymusic.
Fixes #8071.
Built from https://develop.svn.wordpress.org/trunk@34561


git-svn-id: http://core.svn.wordpress.org/trunk@34525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 20:40:25 +00:00
Scott Taylor
80974b0db6 Links: in get_adjacent_post(), add a "get_{$adjacent}_post_excluded_terms" filter.
Props rmccue, Japh, MikeHansenMe.
Fixes #9571.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 02:38:25 +00:00
Scott Taylor
9405b8b10e Canonical/Rewrite: After [34492], fix rel="canonical" URLs for paginated posts.
Props wonderboymusic, joostdevalk.
See #11694.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:30:24 +00:00
Scott Taylor
6dc400395c Links: the esc_html() additions in [34444] aren't very nice to screen reader <span>s. Revert those specific calls.
See #14900.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-23 04:26:27 +00:00
Scott Taylor
d866a40d09 After [34444​], wp_get_shortlink() can call get_queried_object_id() instead of using the $wp_query global.
See #14900.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 20:09:23 +00:00
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