__group__,ticket,summary,owner,_component,_version,priority,severity,milestone,type,_status,workflow,_created,modified,_description,_reporter
Tickets Awaiting Review,56599,"""All"" view not selected for all relevant views for custom post type",,"Posts, Post Types",4.2,normal,trivial,Awaiting Review,defect (bug),new,has-patch,2022-09-19T10:58:34Z,2022-09-19T14:24:10Z,"When the screen options get saved, the parameter `mode=list` gets appended to the URL. For the posts table, the “All” view gets the `.current` HTML class, since `\WP_Posts_List_Table::is_base_request()` returns `true`. For all other post types—including pages—it returns `false`.",alpipego
Candidates for Closure,50989,"""Blog pages show at most"" setting not working when 2 posts are made sticky",,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,close,2020-08-13T17:34:04Z,2023-01-16T16:50:49Z,"Version: WordPress 5.5
Site: https://wesleytech.com
In WordPress Settings -> Reading, for the setting ""Blog pages show at most"".
When a single blog post is set to sticky using the ""stick to the top of the blog"" setting on the blog post edit page, the ""Blog pages show at most"" setting is respected.
However, when TWO blog posts are set as sticky, then the ""Blog pages show at most"" setting is NOT respected, and an extra post gets shown on the home page.
For example, if your ""Blog pages show at most"" setting is set to 6, and you then make 2 blog posts sticky, then your home page will show 7 posts. ",wesleytech
Unpatched Bugs,18701,"""hierarchical"" argument for get_pages() does nothing",DrewAPicture*,"Posts, Post Types",3.0,normal,normal,,defect (bug),accepted,,2011-09-19T06:48:32Z,2019-06-04T20:42:19Z,"The `hierarchical` argument for `get_pages()` is never actually used. It is in an `if` statement, but one that requires `child_of` to also be set:
{{{
if ( $child_of || $hierarchical )
$pages = & get_page_children($child_of, $pages);
}}}
Props Vynce Montgomery for pointing this out to me.",Viper007Bond
Tickets Awaiting Review,56686,"""internal"" post status practical usage?",,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,dev-feedback,2022-09-29T08:19:08Z,2022-10-04T17:01:02Z,"https://developer.wordpress.org/reference/functions/register_post_status/
has an ""internal"" param, however I couldn't find what practical use/meaning this has. What happens if we set ""internal"" true in practical terms when doing a WP_Query? Does it affect anything else besides WP_Query?
It seems this is legacy and without any practical use? (maybe deprecate and remove?)",malthert
Tickets with Patches,10219,"""Older Entries"" and ""Newer Entries"" links are wrong when entries displayed in ascending order",,"Posts, Post Types",,normal,normal,,enhancement,new,has-patch,2009-06-19T16:41:02Z,2019-06-04T20:40:45Z,"I added ""?order=ASC"" to a tag URL I was sending out to some people, because I wanted them to view a set of blog postings in ascending chronological order, and I noticed that the ""Older Entries"" and ""Newer Entries"" links at the bottom of the page were reversed.
I fixed this with the attached changes to the default theme. I don't know if this is the ""right"" fix, but it worked for me, and if it isn't quite wrong, perhaps at least it will give a more experienced WordPress developer than I an idea for how to fix it properly.
",jikamens
Tickets Awaiting Review,49355,"""Publishing failed. Error message: Could not update post in the database"" caused by encoding",,"Posts, Post Types",5.3.2,normal,normal,Awaiting Review,defect (bug),new,,2020-02-04T01:30:57Z,2023-07-02T14:44:32Z,"I have some text that I am copying into the title of a post. I get the following error:
""Publishing failed. Error message: Could not update post in the database""
The text is:
𝐀 𝐖𝐢𝐧 𝐟𝐨𝐫 𝐚 𝐉𝐮𝐬𝐭𝐢𝐜𝐞 𝐂𝐞𝐧𝐭𝐫𝐞 𝐂𝐥𝐢𝐞𝐧𝐭!
I am having trouble understanding what encoding this text is.
Why is this failing to save to the database? My database is set to utf8mb4. Why WordPress is choking on it?",1000camels
Tickets Awaiting Review,48954,"""Sticky"" post state shows even for non-Post post-types",,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-12-12T21:54:48Z,2019-12-12T22:15:24Z,"Reported in the support forums: https://wordpress.org/support/topic/sticky-tag-remains/
When users of my Post Type Switcher plugin switch a Post into a Page, that page still shows as ""Sticky"" in the Pages list-table UI, even though Pages do not support the ""sticky"" functionality.",johnjamesjacoby
Unpatched Bugs,47279,$post object passed to clean_post_cache action can contain outdated values,,"Posts, Post Types",,normal,normal,Future Release,defect (bug),new,needs-unit-tests,2019-05-15T14:28:45Z,2019-05-15T21:57:01Z,"This occurs when publishing or deleting a post.
In the `clean_post_cache()` function, `get_post( $post )` is called and assigned to `$post`.
At that moment, the value of the `$post` parameter `post_status` = `draft` if publishing, `publish` if deleting the post.
There is then a call to `wp_cache_delete( $post->ID, 'post_meta' );`, which correctly updates the value of post_status, if you perform another `get_post()` right after.
But, the `$post` object is then passed to the action `clean_post_cache`, with the outdated values instead.
So if someone hooks a function on `clean_post_cache`, and uses the `$post` object passed, it's going to receive incorrect values compared to what would be expected. But if you perform a `get_post()` inside that function, you will get the correct values.
I only tested this with the `post_status` parameter, but this might be affecting others too.
I would expect that the `$post` object passed to the `clean_post_cache` action contains up-to-date values.",tabrisrp
Unpatched Bugs,31331,$post->post_date displays current time if status is pending or draft,,"Posts, Post Types",4.1,normal,normal,,defect (bug),new,,2015-02-14T17:11:45Z,2019-06-04T20:49:15Z,"Create a new post and save as a draft or save as 'pending'. On single.php enter these lines of code:
{{{
global $post;
var_dump(date(""Y-m-d H:i:s"")); //current time
var_dump($post);
}}}
If you wait about 5 minutes to refresh the front-end page after saving the post as draft/pending, you'll notice that the current time and the $post->post_date are the same (accounting for timezone differences). Further more, if you refresh the page after another 5 minutes, the $post->post_date will change. However, the $post->post_date and $post->post_modified are different. When comparing to the database values, the $post->post_modified matches its database value, but $post->post_date will continue to match the current time and '''not''' what is in the database for `post_date`.
It seems to me that the post object should reflect what is in the database regardless of the post_status. If a post is draft/pending, it is inconsistent to use post_date to note when the post was originally created.
I can see the code that is responsible for this is on wp-includes/query.php on line 3527-3528:
{{{
if ( 'future' != $status )
$this->posts[0]->post_date = current_time('mysql');
}}}
I apologize if I'm thinking about this wrongly.",danbrellis
Unpatched Bugs,46288,'get_extended' breaks when using 'more' gutenberg block,,"Posts, Post Types",5.0,normal,normal,Future Release,defect (bug),new,,2019-02-20T10:21:14Z,2019-04-24T06:21:18Z,"'get_extended' returns the closing tag ' in the extended content, which prevents 'the_content' filter from working correctly.
Steps to replicate:
{{{#!php
', '', $post);
}}}
",joewebber
Tickets with Patches,24248,'guid' not properly escaped,,"Posts, Post Types",2.5,normal,normal,,defect (bug),new,has-patch,2013-05-02T14:03:35Z,2022-10-04T20:12:24Z,"Probably related issues: #18274 #19248
'guid' being saved in database not properly escaped, example:
{{{http://www.wordpress.dev/?post_type=changeset&p=57}}} , see the ampersand encode {{{&}}}
It supposed to be {{{&}}} or at least {{{&}}}
Once 'auto-draft' saved, 'guid' is correct: {{{http://www.wordpress.dev/?post_type=changeset&p=57}}}
Once post is saved as 'draft' or published (triggered 'update post' on auto-draft), 'guid' gets malformed.
Source of issue: inappropriate usage of {{{get_post_field()}}} function in the {{{wp_insert_post()}}}
{{{get_post_field()}}} defaults to 'display' context, we not specify context while obtaining field, and in the {{{wp_insert_post()}}} we are not going to display it anywhere, just get, check, and save again, correct?
Attached patch adds the 'raw' context to usage of {{{get_post_field()}}} with 'guid'
",meloniq
Tickets Awaiting Review,40585,'Update' vs 'Schedule',,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),reopened,has-patch,2017-04-27T16:48:26Z,2017-05-08T18:44:30Z,"Hi, today i work with WordPress and i noticed a problem. My timeline event is:
1) I have an article ""X"" published of the 26 april at 20.00.
2) Today, 27 april at 18.02 i start the edit the article
3) At 18.15 finish edit article and modified date of article in pubblication in 27 april at 18.15
4) Now i don't look button ""Update"" but i look button ""Planning"".
I have feeling that WordPress don't check date in this moment (18.15) but check date open edit article (18.02).
The article is pubblished in all cases but theoretically the article is deleter on the google serp for some minutes.
Sorry for my english :)",micheleconversano
Candidates for Closure,54903,(no title) bug,,"Posts, Post Types",5.8.3,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2022-01-25T18:21:10Z,2022-02-01T13:49:51Z,"If a user makes a post without a title, the post shows up as (no title). However, if the user tries to delete, change status, etc.. of that (no title) post, core does not render those commands. The page refreshes with no changes.
",samjco
Tickets Awaiting Review,41128,404 Page not found after using same URL in post / page,,"Posts, Post Types",4.8,normal,normal,Awaiting Review,defect (bug),new,,2017-06-22T15:40:28Z,2017-06-22T17:13:21Z,"Starting from a clean Wordpress 4.8 installation.
1. Configure permalinks to: http://domain.com/post-title/
2. Create a post with title 'new'
3. Remove the post with title 'new' to trash
4. Create a new page with title 'new'
5. Remove post 'new' from trash (not necessarily, both cases result in 404)
6. The page you created trows a 404 due to a database error since it has two different objects with the same URL, though different objects.
",jpgos
Tickets Awaiting Review,56480,_add_post_type_submenus doesn't use WP_Post_Type::$menu_position,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2022-08-31T17:17:11Z,2023-04-12T19:26:37Z,"Although it's possible to add a post type as a submenu when registering by setting the property show_in_menu, it's not possible to set the position.
This is happening because in the function [https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/post.php#L2071 _add_post_type_submenus] (wp-includes/post.php) the function add_submenu_page is called without passing the parameter $position.
{{{#!php
true ) ) as $ptype ) {
$ptype_obj = get_post_type_object( $ptype );
// Sub-menus only.
if ( ! $ptype_obj->show_in_menu || true === $ptype_obj->show_in_menu ) {
continue;
}
add_submenu_page( $ptype_obj->show_in_menu, $ptype_obj->labels->name, $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, ""edit.php?post_type=$ptype"" );
}
}
}}}
Steps to reproduce the issue:
1. Add the code snippet in the functions.php of the theme (notice the 'menu_position')
{{{#!php
array(
'name' => 'Foo',
),
'show_in_menu' => 'edit.php?post_type=page',
'menu_position' => 20,
'public' => true,
)
);
register_post_type(
'bar',
array(
'labels' => array(
'name' => 'Bar',
),
'show_in_menu' => 'edit.php?post_type=page',
'menu_position' => 10,
'public' => true,
)
);
}}}
2. Visit the Dashboard and check that under the menu Pages, ""Foo"" appears **before** ""Bar""
Expected behaviour: ""Foo"" appears **after** ""Bar""",Rahmohn
Tickets Needing Feedback,30452,_wp_translate_postdata() redundantly+destructively checks current_user_can( $ptype->cap->edit_others_posts ) on update,,"Posts, Post Types",,normal,normal,,defect (bug),new,dev-feedback,2014-11-21T23:13:46Z,2019-06-04T20:48:03Z,"The product use-case is that the creator of a post should always be able to edit the post, even when they've assigned someone else as a byline. To do so, I'm storing their user ID to post meta:
{{{
public function action_wp_insert_post_persist_author( $post_id, $post, $update ) {
$post_obj = Post::get_by_post_id( $post_id );
if ( $update
|| ! in_array( $post->post_type, Fusion()->get_post_types() )
|| ! $post_obj
|| ! $post->post_author ) {
return;
}
$post_obj->set_first_author_id( $post->post_author );
}
}}}
And then filtering `map_meta_cap`:
{{{
/**
* Filter map meta cap to do whatever custom caps we need
*/
public function filter_map_meta_cap( $caps, $cap, $user_id, $args ) {
switch ( $cap ) {
case 'edit_post':
$post_obj = Post::get_by_post_id( $args[0] );
if ( ! $post_obj ) {
break;
}
$post_type = get_post_type_object( $post_obj->get_post_type() );
// Allow first authors to always edit the post
if ( $post_obj->get_first_author_id() && $user_id == $post_obj->get_first_author_id() ) {
// Don't require editing others' posts
if ( false !== ( $key = array_search( $post_type->cap->edit_others_posts, $caps ) ) ) {
unset( $caps[ $key ] );
}
// If the post is published...
if ( 'publish' == $post_obj->get_status() ) {
$caps[] = $post_type->cap->edit_published_posts;
} elseif ( 'trash' == $post_obj->get_status() ) {
if ( 'publish' == get_post_meta( $post_obj->get_id(), '_wp_trash_meta_status', true ) ) {
$caps[] = $post_type->cap->edit_published_posts;
}
} else {
// If the post is draft...
$caps[] = $post_type->cap->edit_posts;
}
}
break;
}
return $caps;
}
}}}
This approach generally works — except the original author isn't able to save an update to a post because `_wp_translate_postdata()` aggressively checks `current_user_can( $ptype->cap->edit_others_posts )` ([https://core.trac.wordpress.org/browser/tags/4.0.1/src/wp-admin/includes/post.php#L67 ref]).
A check for `current_user_can( $ptype->cap->edit_post, $post_data['ID'] )` was added to `_wp_translate_postdata()` in r22950, but the changeset also leaves in the `edit_others_posts` check.
Given `current_user_can( 'edit_post' )` falls back to `edit_others_posts` behind the scenes ([https://core.trac.wordpress.org/browser/tags/4.0.1/src/wp-includes/capabilities.php#L1114 ref]), I'd expect we could remove the second check.",danielbachhuber
Unpatched Bugs,48622,`editable_slug` filter does not pass the correct value,,"Posts, Post Types",5.3,normal,normal,Future Release,defect (bug),new,,2019-11-14T05:23:52Z,2019-11-14T15:36:42Z,"''Originally reported in https://github.com/WordPress/gutenberg/issues/15802.''
**Describe the bug**
When using the block editor, the 1st param $post_name passed to the editable_slug filter hook is not the same as the classic editor, which is the expected one.
**To reproduce**
1. Install Classic Editor to switch from block to classic
2. Create a draft post with title ""the post title"" and slug ""this-is-the-slug""
3. Create a muplugin with: add_filter( 'editable_slug', function( $post_name ) { wp_die( $post_name ); } );
4. Refresh your edit page
**Expected behavior**
With the classic editor you should have ""this-is-the-slug""
but when using block editor you have ""the-post-title"", sounds like the post_title sanitize with sanitize_title, it should be the real post_,name like classic is doing.",noisysocks
Tickets with Patches,36634,`register_post_status()` default causes notices in post list table,,"Posts, Post Types",,normal,normal,,defect (bug),new,has-patch,2016-04-22T15:14:08Z,2019-06-04T20:57:24Z,"The default value for the `$label_count` parameter in `register_post_status()` is an ""array of `$label`, twice."" As far as I can see, `$label_count` is used only once in core: in `WP_Posts_List_Table::get_views()`, where it's passed to `translate_nooped_plural()`.
However, `translate_nooped_plural()` assumes the array it receives was generated through `_n_noop()` or similar. So the default `$label_count` value leads to undefined-index notices for each of the expected array keys when viewing the list table.
To replicate, register a post status with these args, assign a post the 'test' status, and view the post list table:
{{{
add_action( 'init', function () {
register_post_status( 'test', array( 'label' => 'Test', 'show_in_admin_status_list' => true ) );
} );
}}}
The attached patch would fix the notices by checking the `$nooped_plural` keys in `translate_nooped_plural()` and attempting to return a fallback value.
Also, even though `$label_count` is an optional argument, it looks to me like developers are expected to register it as the list table expects. So, the patch would add a `_doing_it_wrong()` call to `register_post_status()` when no `$label_count` is included. This does, however, also flag the `auto-draft` and `inherit` statuses.",dlh
Tickets Awaiting Review,48410,`wp_insert_post()` can result in duplicate post data,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2019-10-23T15:04:14Z,2020-01-02T02:10:25Z,"If 2 identical calls to `wp_insert_post()` are made close enough together, 2 posts are added to the database instead of 1. These posts differ by post ID only. The slug for example is the same.
This seems to happen because `wp_insert_post()` does a fair amount of processing before the database write takes place. The check to determine if a post already exists can be _stale_ at the point of insertion.",henry.wright
Tickets Awaiting Review,39939,A Contributor cannot preview their own post if it's scheduled,,"Posts, Post Types",,normal,minor,Awaiting Review,defect (bug),new,needs-unit-tests,2017-02-22T12:52:02Z,2017-02-23T05:36:25Z,"Steps to reproduce:
1. A Contributor writes a post and submits it for review. At this point they can preview their post.
2. An Editor or Administrator approves the post and schedules it for publication at a later date.
3. The contributor viewing the Posts listing table can no longer preview their post.
Previously: #33694
",johnbillion
Tickets Awaiting Review,55920,Ability to query by post author in post_exists(),,"Posts, Post Types",6.0,normal,normal,Awaiting Review,enhancement,new,has-patch,2022-06-04T22:57:51Z,2022-06-07T18:42:04Z,"Needed the ability to determine if post exists by title && author when running wp_insert_post() in form submission.
I was using this to create a list of user saved favourite posts.
So this might be useful for others too
function post_exists( $title, $content = '', $date = '', $type = '', $status = '', $author = '' ) {...}
Pull Request #2783",mcqTia
Tickets Needing Feedback,15230,Action hook before the inserting post into the database,,"Posts, Post Types",3.1,normal,normal,Future Release,enhancement,new,dev-feedback,2010-10-27T09:18:46Z,2021-05-11T12:51:37Z,"Something like
{{{
do_action( 'pre_post_insert', $data, $postarr );
}}}
added to ''wp_insert_post'' function right after the ""else"" statement on line 2501 in .../wp-includes/post.php
",johnnypea
Tickets Awaiting Review,41324,Action of password-protect form.,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2017-07-14T12:38:49Z,2017-07-14T12:43:17Z,"The default form action too-easily (I think just two submissions of a blank or incorrect password) loads wp-login.php?action=postpass with a 'service unavailable' message').
Simple validation to ensure correct password can prevent this.
",gulliver
Tickets Needing Feedback,23207,Add $labels argument to register_post_status(),,"Posts, Post Types",3.0,normal,normal,,enhancement,reopened,dev-feedback,2013-01-15T19:32:54Z,2019-06-04T20:43:43Z,"WordPress functions '''register_taxonomy()''' and '''register_post_type()''' has '''labels''' argument. Why not add labels to '''register_post_status()'''?
The current way to add status:
{{{
$args = array(
'label' => __( 'draft', 'text_domain' ),
'label_count' => _n_noop( 'Draft (%s)', 'Drafts (%s)', 'text_domain' ),
'public' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'exclude_from_search' => true,
);
register_post_status( 'draft', $args );
}}}
The new way (using labels):
{{{
$labels = array(
'name' => __( 'Draft', 'text_domain' ),
'singular_count' => __( 'Draft (%s)', 'text_domain' ),
'plural_count' => __( 'Drafts (%s)', 'text_domain' ),
'any_other_label' => __( 'Any Other Label', 'text_domain' )
);
$args = array(
'labels' => $labels,
'public' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'exclude_from_search' => true,
);
register_post_status( 'draft', $args );
}}}",ramiy
Candidates for Closure,46171,"Add ""backing up this post in your browser"" label to post-type",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,dev-feedback,2019-02-01T20:58:56Z,2019-02-01T20:58:56Z,"When the internet connection is lost, on a non-block-based post-type, some helpful text appears in an admin notice to alert users their content will not be lost:
""We’re backing up this post in your browser, just in case""
Keyword: **post**.
It would be nice if that string were post-type specific, perhaps part of the `labels` array of the post-type registration process.",johnjamesjacoby
Candidates for Closure,48370,"Add ""next/previous"" links to Edit Post screen",,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,dev-feedback,2019-10-18T17:37:06Z,2019-10-19T10:39:15Z,"Maybe a good idea for blogs or shops to have some sort of ""next/previous"" links inside the edit post page so it's easier to navigate through posts, pages and products without leaving the edit page.
At the moment it's a bit un-logical since when i am on page 5 and i open a post i want to edit then after i have updated it i want to edit the next one or the previous one in the list. Only way possible is to click on all posts but then your back to page 1. You can do a go back through the browser back tab but that's not the proper way to work.
",Hein35
Unpatched Enhancements,30917,"Add ""Save and Close"" button to page/post edit screen",,"Posts, Post Types",,normal,normal,,enhancement,new,,2015-01-05T19:36:30Z,2019-06-04T20:48:23Z,"It would be useful to have an additional button in the Publish box of the page/post the edit screen to save the post and then return to the main page/post edit/listing screen. Currently, the Save button reloads the page/post and you then have to click on the menu link to view the page/post main edit/listing screen.",Vitzkrieg
Tickets Awaiting Review,53195,Add $post or $post_id to the quick_edit_custom_box hook,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2021-05-12T11:17:34Z,2021-05-12T11:17:34Z,"Right now when you're adding a custom box to quick edit, you can't set an existing value without using JavaScript, cause you don't have acces to the post. For a more elaborate explanation, see the User Contributed Notes, top one by stevenlinx: https://developer.wordpress.org/reference/hooks/quick_edit_custom_box/
It would be more elegant if we could just use the post within the hook I think.",tomjdevisser
Tickets Awaiting Review,54376,Add `is_post_publicly_viewable` filter,,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2021-11-04T22:33:22Z,2022-02-03T20:31:39Z,"Related to #49628, #54375.
Add a filter to the is_post_publicly_viewable() function to allow theme and plugin developers to override the default value.
In some circumstances a developer may require the checks use different conditions to the default. ",peterwilsoncc
Tickets Needing Feedback,36492,Add `WP_Post_Status` class,,"Posts, Post Types",3.0,normal,normal,,enhancement,reviewing,dev-feedback,2016-04-12T10:30:14Z,2019-06-04T20:56:46Z,"Similar to #36217 and #36224, a dedicated class for post statuses would make it easier to work with those as they are currently represented through raw objects.
The global variable `$wp_post_statuses` would then hold objects of `WP_Post_Status` which would provide the benefits of autocompletion in IDEs, and we could possibly add methods to the class in the future to make post status management easier.",flixos90
Tickets Awaiting Review,59986,Add a filter into the $wp_meta_boxes output loop to provide the ability to change data,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2023-11-29T13:52:42Z,2023-11-29T15:43:44Z,"I have a metabox added via plugin that connects a custom post type with users. But I don't like the name of the Meta Box, it obscures the purpose of the box. So, the plugin doesn't have this option, and I have to change global $wp_meta_boxes for the desired effect, which isn't the correct thing to do. Of course, I could write a plugin author plea to add a filter (and it will be the third ""brilliant idea"" from me in two days 🙈), but it is possible to stumble across this need with another plugin as well. This is why I think it is necessary to add the filter to the core.
Related ticket: https://core.trac.wordpress.org/ticket/39969",oglekler
Tickets Awaiting Review,54020,Add a filter to allow updating post without changing the modified dates,,"Posts, Post Types",5.9,normal,normal,Awaiting Review,enhancement,new,dev-feedback,2021-08-26T22:40:11Z,2021-09-29T21:12:15Z,"wp_update_post calls wp_insert_post which has code that always changes the modified date
this causes problems when trying to fix posts via batch/wp-cli type operations
{{{#!php
post_date_gmt;
$data['post_modified_gmt'] = $post->post_date_gmt;
return $data;
};
add_filter( 'wp_insert_post_data', $function, 10, 2 );
$updated = wp_update_post( $args );
remove_filter( 'wp_insert_post_data', $function );
}}}
This function needs to make get_post() call for each insert and this slows the process in a big way
I have added a filter that allows us to turn off the modification and set the date if needed
{{{#!php
date1, 'post_date_gmt' => date2 )
*/
$update_date = apply_filters( 'wp_update_post_preserve_dates', false, $postarr );
if( false === $update_date ) {
$post_modified = current_time( 'mysql' );
$post_modified_gmt = current_time( 'mysql', 1 );
} elseif ( ! is_array( $update_date ) && strtotime( $update_date ) ){
$post_modified = $update_date;
$post_modified_gmt = get_gmt_from_date( $update_date );
} elseif ( is_array( $update_date ) && isset( $update_date['post_modified'] ) && isset( $update_date['post_modified_gmt'] ) ){
$post_modified = $update_date['post_modified'];
$post_modified_gmt = $update_date['post_modified_gmt'];
} else {
$post_modified = $postarr['post_modified'];
$post_modified_gmt = $postarr['post_modified_gmt'];
}
} else {
$post_modified = $post_date;
$post_modified_gmt = $post_date_gmt;
}
}}}
",pbearne
Tickets Awaiting Review,49708,Add a new function get_page_by_guid,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,,2020-03-27T09:20:31Z,2024-01-26T07:45:56Z,"We have two different functions to get a post base from another field rather than ID `get_page_by_path` and `get_page_by_title`. When working with RESTful API working with unique identifier could be more handy than auto incremental or a path that could change.
I propose to build a function named `get_page_by_guid` and help developers to search a Post more accurate with guid.",killua99
Tickets Awaiting Review,44435,Add Action / Filter in Post Details page for Screen Meta Links,,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2018-06-22T09:58:58Z,2019-01-16T06:50:09Z,We can add action/filter in wordpress backend for Screen Meta Links so that using plugin we can add our own links with screen meta links.,mohdjafarcedcoss
Tickets with Patches,50546,Add better error notices when deleting things fail,,"Posts, Post Types",,normal,normal,Future Release,enhancement,new,dev-feedback,2020-07-03T09:50:01Z,2020-07-07T13:48:56Z,"I've stumbled upon this when working with foreign key restraints and post deletion. Working on a project I've added some data to the custom DB table row that has a foreign key association with custom post type post.
So, when I try to delete the post it will fail, as it should 🎉.
But the error I got was: `Error in deleting`.
Hmmm, ok. Not a big deal. WordPress is pretty flexible in most cases, so there's bound to be a filter for that.
When searching for it, upon checking the above string I've found 5 matches in 3 files. So if some error happens when deleting a post, you'll get that message in `wp_die`. If it happens on attachment delete, the same message.
How are you supposed to know where that error came from, just from the message? You need to check the error log, etc. Which is ok when you're a developer, but what if you're not? A user could get this message on the screen from some plugin and then they'll open up a support question with this message.
Not really helping the debugging process.
I'm not saying the entire stack trace should be visible (that is advanced debugging), but even just adding `Error in deleting a post`, or `Error in deleting an attachment` would be an improvement IMO.
Having some extra details would be even better, but small steps first.
",dingo_d
Tickets with Patches,33714,Add custom post types to the 'At a Glance' widget,,"Posts, Post Types",3.8,low,normal,,enhancement,new,needs-docs,2015-09-03T20:48:57Z,2019-06-04T21:03:54Z,"This patch introduces a new argument to the `register_post_type()` function which will list a custom post type in the 'At a Glance' widget.
A few notes:
- For backwards compatibility reasons the new argument is set to false by default.
- If no menu_icon argument is set, then it will default to `dashicons-marker`. This is the same behaviour as previous.
- I've added menu_icon arguments to the core post/page post_types. I'm not sure if this has any negative implications.
- Removed a small chunk of unnecessary CSS where the dashicons were hardcoded into the styling rather than using the existing `.dashicons` classes. (Related #27414)
- `wp_dashboard_quota()` was slightly refactored due to the removal of some of the CSS.",paulwilde
Tickets with Patches,20810,Add disable arg or attributes arg to wp_dropdown_categories() & wp_dropdown_pages(),,"Posts, Post Types",2.1,normal,normal,,enhancement,new,has-patch,2012-06-01T19:27:07Z,2019-06-04T20:43:12Z,"It would be beneficial to be able to add disabled=""disabled"" attribute to the select tag or add multiple attributes to the select tag.
Related: #20156, #20167",wpsmith
Tickets Awaiting Review,51403,Add filter for _post_states as it outputs raw HTML,,"Posts, Post Types",5.5.1,normal,normal,Awaiting Review,enhancement,new,,2020-09-28T07:39:47Z,2020-09-28T07:39:47Z,"Currently this function can't be overridden with a filter, so it outputs raw HTML separators and such directly into the post title in the edit screen. However it should be suggested to make it possible to display the post states in your own custom function, e.g. remove the separators and the divider with the title, which are currently hard-coded at the moment in the function as raw HTML?",brandbrilliance
Tickets with Patches,36237,Add filter for post statuses in quickedit,,"Posts, Post Types",4.4.2,normal,normal,,enhancement,new,has-patch,2016-03-14T16:53:31Z,2019-06-04T20:55:48Z,"To make changes to the quick edit status list, one has to use JS or action ''quick_edit_custom_box'' to add extra fields. In instances where some of the statuses need to be removed, JS is required. [[BR]]
I propose that the statuses in ''wp-admin/includes/class-wp-posts-list-table.php (line 1284-1300)'' be stored in an array then filtered using ''quick_edit_statuses'' before the array is iterated through to create the select options.[[BR]]
I'm available to submit a patch that does this ",kakomap
Unpatched Enhancements,30250,Add filter for query used in `wp_count_posts()`,,"Posts, Post Types",,normal,normal,,enhancement,assigned,,2014-11-04T18:04:59Z,2019-06-04T20:47:58Z,"Use case: if my list table is filtering to a specific taxonomy term, I'd like my view counts to reflect that filter.
The existing filter added in #16603 still means I need a lot of duplicate code, and two queries.",danielbachhuber
Candidates for Closure,44017,Add filter to display edit post link without 'edit_post' capability,,"Posts, Post Types",,normal,major,Awaiting Review,enhancement,new,reporter-feedback,2018-05-09T04:40:20Z,2018-06-05T04:12:20Z,"WordPress has come a long way from just being a Blogging CMS. Now we can allow our end users to Post using different plugin without bringing the users in WP Admin. So, basically users don't need the 'edit_post' capability to be just able to create and edit posts using plugins.
Hence, this filter is needed so that plugins can allow any user to view the built in edit post link on front-end if needed.",rafsuntaskin
Tickets Awaiting Review,57622,Add filter to get_page_by_path,,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,has-patch,2023-02-03T07:47:30Z,2023-02-03T19:15:44Z,"Everything looks like that use `WP_Query` in `get_page_by_path` will be reverted [https://core.trac.wordpress.org/ticket/56689 56689].
Therefore, I have an idea to add a filter that allows ability to control results.
Example:
`apply_filters('get_page_by_path', $found_page, $page_path, $output_type, $post_type)`",uzumymw
Tickets Awaiting Review,44377,"add filter to post_submit_meta_box() to conditionally refrain from outputting the ""Visibility"" fields",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2018-06-15T19:07:57Z,2018-06-15T19:07:57Z,"I have a CPT that, by it's very nature, always has visibility `public` (not private nor password protected).
Since I don't want users selecting anything other than `public`, currently, I enqueue some CSS that hides the ""Visibility"" related fields in the ""Publish"" metabox on `/wp-admin/post.php` and `/wp-admin/post-new.php`, but that just seems kludgy.
**Note:** in case a ""sneaky"" user finds my CSS, unhides the fields and sets the post to be private or password protected,
I also hook into [[https://developer.wordpress.org/reference/hooks/wp_insert_post_data/|wp_insert_post_data]] to ""correct"" `post_status` and `post_password`.
It would be helpful if there were a filter in [[https://developer.wordpress.org/reference/functions/post_submit_meta_box/|post_submit_meta_box()]] to control whether the ""Visibility"" related fields are output.
Such a filter would be similar in spirit to the [[https://developer.wordpress.org/reference/hooks/view_mode_post_types/|view_mode_post_types]] filter in [[https://developer.wordpress.org/reference/classes/wp_screen/render_view_mode/|WP_Screen::render_view_mode()]] that controls whether the ""View Mode"" related fields are output in ""Screen Options"". Prior to `view_mode_post_types` being introduced in 4.4, I used to hide those fields via CSS when appropriate.
",pbiron
Tickets Needing Feedback,12955,Add get_post filter,,"Posts, Post Types",,normal,normal,Future Release,feature request,new,dev-feedback,2010-04-10T13:50:07Z,2018-08-28T13:43:50Z,This patch filters the return value of the get_post() function. I would find this very helpful for a plugin I'm developing.,JohnLamansky
Tickets Needing Feedback,12726,Add get_post_by_*() functions,,"Posts, Post Types",3.0,normal,normal,,enhancement,assigned,dev-feedback,2010-03-27T05:57:13Z,2019-06-04T20:41:11Z,"Current there are get_page_by_path() and get_page_by_title() function but they hardcode the post_type of 'page'. With support for new custom post types I'm finding a need for functionality to look up posts of custom post types:
{{{
$args = array('post_type','my_custom_post_type');
$path = 'foo-bar';
$post = get_post_by_path($path,$args);
$title = 'Foo Bar'
$post = get_post_by_title($title,$args);
}}}
Another option would be a simple get_post_by():
{{{
$args = array('post_type','my_custom_post_type');
$path = 'foo-bar';
$post = get_post_by('path',$path,$args);
$title = 'Foo Bar'
$post = get_post_by('title',$title,$args);
}}}
This code is not hard to write but looking at the functions in post.php there's not one consistent style so I'm not sure what the best approach would be to write it. Further, I don't completely understand the significance of all the code in get_page_by_path() so wouldn't want to start with it (although I could see it being modified to use the more generic functions that I propose.)
I can make these updates if I get enough direction from the core team, or I'd happily just see them get done. :)
",mikeschinkel
Tickets with Patches,13972,Add new category link - capability check needed,,"Posts, Post Types",3.0,normal,minor,Future Release,defect (bug),new,has-patch,2010-06-18T09:01:43Z,2018-01-23T03:26:40Z,"/wp-admin/link-add.php
If user doesn´t have ""manage_categories"" capability, add new link page, will show ""add new category"" link and form,
it should be hidden.
",wjm
Unpatched Bugs,31504,Add new item gives bunch of errors if disabled,,"Posts, Post Types",4.1,normal,normal,,defect (bug),new,,2015-03-02T14:00:00Z,2019-06-04T20:49:24Z,"I created new post category 'cars'. But cars are added/deleted via Php code automatically via:
wp_insert_post(...)
and
wp_delete_post(...)
So I wanted to remove 'add new car' from navigation menu. And somehow remove the 'delete' capability.
So I used this code in plugins register_post_type $args:
{{{
array(
...
'capability_type' => 'car',
/*'capabilities' => array(
'create_posts' => false, // Removes support for the ""Add New"" function - DOESN'T WORK
'delete_post' => false,
'publish_posts' => false,
),
'map_meta_cap' => true, // Set to false, if users are not allowed to edit/delete existing posts
*/
...)
}}}
Appears the 'add_new' is not shown, but now I got bunch of warnings all over the admin:
{{{
Notice: Undefined offset: 0 in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1075
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1077
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1081
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1083
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1084
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1084
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1087
Notice: Trying to get property of non-object in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1087
Notice: Undefined offset: 0 in C:\Program Files (x86)\Zend\Apache2\htdocs\GitHub\*WEB-NAME*\wp-includes\capabilities.php on line 1075
}}}
",ozzWANTED
Candidates for Closure,55733,Add option to sort Pages by Slug,,"Posts, Post Types",5.9.3,normal,normal,Awaiting Review,feature request,new,close,2022-05-14T14:49:12Z,2022-05-15T16:05:45Z,"Please add an option to sort list of Pages by Slug (that is, make the Slug column sortable).
Right now, for some reason, WordPress only offers to sort by Title - which is of useless as Title is just a SEO-formatted blurb that's irrelevant for a meaningful sort order.
(Yes, I'm aware of a free plug-in - that appeared just 3 months ago - that allows to sort by slug. Still, this essential feature must be in core WordPress functionality).",zevrix
Tickets Awaiting Review,60189,Add post duplication quick action,,"Posts, Post Types",trunk,normal,normal,Awaiting Review,feature request,new,,2024-01-03T21:59:24Z,2024-01-03T21:59:24Z,"It seems like a useful feature (and one recent complaint from a client) to quickly duplicate a post so users can, for example, protect an existing version and work on a new draft.
It's possible to do it right now if they copy all the blocks and paste them on a new page, but it'd be quicker and easier to click somewhere instead.
I propose to add a new post quick action, as well as an action inside the post editor.",zaguiini
Candidates for Closure,37965,Add post_last_activity column to posts database table,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,dev-feedback,2016-09-07T07:49:59Z,2019-08-05T22:45:26Z,"I have a need to order posts by their most recent ""activity.""
Activity is purposely ambiguous, but in the context of WordPress core, this would likely mean either:
* the publish time if no comments
* the time of the most recent comment
* For something like bbPress, this would mean the `post_date` of the most recent child post
I'm currently storing this data in `postmeta`, but even with type hinting, ordering `meta_value` by `DATETIME` is a slow query, particularly when there are millions of rows in both the `posts` and `postmeta` database tables.
(I'd considered repurposing the `post_modified`, but unwinding the way core uses this internally, paired with not wanting to confuse other developers with the oddity, along with `post_modified` not being an indexed column, made this a lot of work for not very much gain.)
To be efficient, this new column would require additional compound indexes akin to `type_status_date`. I suspect it would also need an accompanying `post_last_activity_gmt` column, as well as some kind of back-fill upgrade routine on existing posts.
Rather than hacking this into bbPress core in a bespoke way, or creating a separate plugin to shoe-horn this idea into all of the core queries, I figured I'd drop the feature request here for deeper discussion first, to get a read on how viable modifying core like this is to everyone.",johnjamesjacoby
Tickets Needing Feedback,14077,Add support for removal of multiple features from a post type in remove_post_type_support,,"Posts, Post Types",3.0,normal,minor,,enhancement,new,dev-feedback,2010-06-24T18:10:59Z,2020-01-09T00:34:23Z,"From [http://groups.google.com/group/wp-hackers/browse_thread/thread/1843101eba1f29fc this thread]
add_post_type_support allows an array to be passed as the 2nd parameter, but remove_post_type_support doesn't.
The patch attached adds the functionality.",Utkarsh
Candidates for Closure,41893,Add URL filter in posts list table get_edit_link(),,"Posts, Post Types",4.9,normal,normal,Awaiting Review,enhancement,new,dev-feedback,2017-09-15T19:58:55Z,2020-02-15T13:02:42Z,"In `get_edit_link()` in the WP_Posts_List_Table class, the URL to edit.php is hard-coded and is not filterable. I'm currently working on a project that has complex filtering and the client wants to maintain the filters as they click through to different statuses.
Currently, the only way to update just the URL to edit.php is to use the `""views_{$this->screen->id}""` filter, use regex to find the URL in the markup, then update the URL in the markup as-needed. The proposed `wp_posts_list_table_edit_url` filter would allow filtering of the generated URL separate from the markup.
",GunGeekATX
Tickets Awaiting Review,28006,Add visual cues when viewing drafts on the frontend,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,assigned,,2014-04-24T08:07:28Z,2019-04-22T16:46:38Z,"This is a relatively minor issue, but I've often had the problem where I think a post is published because I can view it on the frontend and there is nothing on the page that indicates that I am viewing a draft. If this happens to me from time to time then I'm sure it happens to other users too.
I propose adding a few unobtrusive visual cues to the single post page that indicates that you are viewing a draft. I have attached my changes here - they include:
* Adding ""(Draft)"" to the end the 'edit post' text in the admin bar
* Adding ""(Draft)"" to the end of the default link generated by {{{ edit_post_link() }}}
* Adding a new body class to single post pages: {{{ single-status-{status} }}}
These changes are minor enough to not break the existing display, yet significant enough to clearly show that you are currently viewing a draft. The addition of the post status to the body class will also help with customising the page according to the current status.",hlashbrooke
Tickets with Patches,20167,Add wp_pages_checklist for creating checklist of pages on site,,"Posts, Post Types",,normal,normal,,enhancement,new,has-patch,2012-03-04T04:57:00Z,2019-06-04T20:42:54Z,"Per conclusion of [http://core.trac.wordpress.org/ticket/20156#comment:15 ticket #20156]
""If someone does write a patch that implements wp_posts_checklist() and
uses it in nav-menus.php, please open a new ticket.""
The attached patch:
- extends Walker with Walker_Page_Checklist
- adds wp_pages_checklist() and wp_pages_checklist() functions
functionality structure was modeled after wp_category_checklist and wp_dropdown_pages to keep with WP standards.
If this patch is accepted my intention is to finish the request and implement it into nav-menus.php.",jackreichert
Tickets Awaiting Review,52950,add_meta_box issue in wordpress 5.7,,"Posts, Post Types",5.7,normal,major,Awaiting Review,defect (bug),new,,2021-03-31T13:09:44Z,2021-03-31T17:23:29Z,"I recently moved to the new WordPress version 5.7 and now I am facing an issue in the add_meta_box function in function.php. The issue I am facing is the custom post type ID which I added in the add_meta_box function is conflicts with my custom post slug. Whenever I add a new post or open an existing post it shows a pre-generated slug from that custom post type without saving. Please see my code below.
{{{#!php
cap->create_posts ) )
echo ' ' . esc_html( $post_type_object->labels->add_new ) . '';
/**
* Fires after the Add New button is added to screen.
*
* The after_add_new- hook fires in a number of contexts.
*
* The dynamic portion of the hook name, `$pagenow`, is a global variable
* referring to the filename of the current page, such as 'edit.php',
* 'post.php' etc. A complete hook for the latter would be
* 'before_add_new-post.php'.
*/
do_action('after_add_new-'.$pagenow);
}}}
",vivekbhusal
Tickets Awaiting Review,40500,Adding custom capabilities to a custom post type seems to break permalink link on post edit screen,,"Posts, Post Types",4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-04-20T16:28:46Z,2019-11-27T20:38:26Z,"Added custom capabilities to a wordpress custom post type to be used in conjunction with a role scoper plugin ....
see: https://www.dropbox.com/s/7gzvma9t3lm028j/Screenshot%202017-04-20%2010.27.15.png?dl=0)
... seems to make the permalink link that shows up on the post edit screen, beneath the title, non-functional (ie, no URL is actually outputted). Also does not have the ""view [custom post type]"" link that typically appears in the black wordpress admin toolbar.
Otherwise, everything works as designed.
Confirmed on two separate hosts with plugins disabled and default theme.
Confirmed that removing custom capabilities fixes the issue.
Confirmed that adding capability using alternative method of simply
'capability_type' => array('print', 'prints'), also has the same result. ",finitejest
Tickets Needing Feedback,55978,Adding optional post parameter to get_the_modified_author function,,"Posts, Post Types",2.8,normal,normal,Future Release,enhancement,new,dev-feedback,2022-06-14T17:57:41Z,2023-02-07T06:14:00Z,"With the current implementation of the `get_the_modified_author()` it is not possible to use this function with the custom WP_Query loop. It takes the post ID using the `get_post()` which returns the global post id and there is no way to pass the ID from the custom query.
We want to add the optional post parameter in `get_the_modified_author` function so that we can use this function in custom loops as well.
By doing this change we also make this function follow the same standard as other ""get_the_"" functions like `get_the_title`, `get_the_content`, `get_the_terms` etc.
",samirmalpande
Tickets Awaiting Review,39841,Additional Post Button Options,,"Posts, Post Types",4.7.2,normal,normal,Awaiting Review,enhancement,new,,2017-02-10T18:38:24Z,2017-02-14T08:39:25Z,"Turn ""Update""/""Publish"" into a button with a dropdown. So if a user selects say Update & Return it will redirect the user back to the posts admin screen. If a users selects the Update & Add New option then it would update that existing post, then redirect to a new posts screen or return to the post list screen instead.",lukecavanagh
Tickets Awaiting Review,42146,Admin side menu id not displaying proper when name is long,,"Posts, Post Types",4.8.2,normal,normal,Awaiting Review,defect (bug),new,has-patch,2017-10-08T10:30:32Z,2017-10-08T10:41:38Z,"I am registering one custom post type. Post type menu name is too long without space. If menu name is ""mycustomedesignerbywordpressdeveloper"" then it goes outside of admin menu.",arzookansagra
Unpatched Bugs,16600,AdminMenu rendering code chokes on uppercase,,"Posts, Post Types",3.1,normal,minor,,defect (bug),reopened,,2011-02-20T02:43:25Z,2019-06-04T20:41:50Z,"When registering custom taxonomies for a custom post type, if the post type name contains uppercase letters, the menu items for the custom taxonomies are not shown.
It looks like the post type name is lowercased in some parts of the core code (but no all) and so string comparisons fail.
Just isolated this behaviour, so I'm still not sure how much of the core this affects.
Moreover, when I saved posts with the intended mixed-case name, they have been saved to the DB with lowercased post_type
It it is indeed the intended behaviour, a note should be added to the Codex:
""Custom Post Type names must be lowercase""
The attached sample (real) code reproduces the problem by setting ""post_type_tag"" to ""DomainName"" instead of ""domain_name"". Numbers work properly, however.
Tested with latest SVN (RC4 + r17467)",jltallon
Tickets Awaiting Review,55248,Ajax call has stop to work (single custom post content),,"Posts, Post Types",5.9.1,normal,normal,Awaiting Review,defect (bug),new,,2022-02-24T13:31:54Z,2022-03-01T12:40:41Z,"Ajax call which should get a content from a single custom post item has stop to work. On other hand, Ajax call which is getting more Portfolio items (more custom post items) works fine (you have all in the video - sorry for my English).
All was fine until the WP ver 5.9 but the bug is there after updating on ver 5.9.1
Video link - https://www.youtube.com/watch?v=Gcxtm4FF58E",zak87
Tickets with Patches,12826,AJAX trash posts,,"Posts, Post Types",2.9,normal,normal,,enhancement,new,has-patch,2010-04-03T02:57:06Z,2019-07-05T03:15:38Z,"Add AJAX to trash posts, like comment moderation.
From GSoC ideas list:
>Add AJAX Paging to Admin Screens. Something we've never gotten around to is adding AJAX paging to the list-type screens (edit.php, etc). Currently, getting to the next page of items means a screen refresh. For this project, add ajax paging to all the list-type screens in the WordPress admin. We have all the underlying PHP, but it needs some JavaScript love.",meheranandk
Tickets with Patches,19958,"Allow custom post types as ""home"" and get_posts() to return results for more than one post type",pbearne*,"Posts, Post Types",3.3.1,normal,normal,Future Release,enhancement,accepted,has-patch,2012-02-04T00:59:13Z,2023-11-10T16:27:20Z,"In
{{{
Wordpress admin > Settings > Reading
}}}
there is an option to define what the home page or the front page should be
{{{
Front page displays
}}}
Radio button
{{{
A static page (select below)
}}}
is followed by a dropdown containing a list of all pages.
I would request that custom page types be allowed in this dropdown. This way, I could make my bbPress forums or my All-in-one event calendar, etc my homepage.
",sooskriszta
Tickets Awaiting Review,46283,Allow filtering post-type archive rewrites,,"Posts, Post Types",3.1,normal,normal,Awaiting Review,enhancement,new,has-patch,2019-02-20T02:59:18Z,2019-02-20T02:59:18Z,"If one wishes to introduce additional query arguments into a post-type archive's rewrite structure, the current options are rather cumbersome: filter the rewrites as they're generated, filter the whole rewrites array, or reproduce a considerable amount of logic from `WP_Post_Type::add_rewrite_rules()`. By introducing a few filters on the archive-specific rewrites, it becomes far easier to customize a post type's archive rewrites.",ethitter
Tickets Awaiting Review,55287,Allow for DISTINCT in WP_Query method,,"Posts, Post Types",6.0,normal,normal,Awaiting Review,feature request,new,,2022-03-01T15:55:09Z,2022-03-01T15:55:09Z,"Dear wordpress developers,
Currently I'm working with a plugin to create designs.
This plugin has an element called a repeater element that basically makes use of the core WP_Query method in order to fetch custom post types or normal post types.
However, since I'm using this page builder or theme builder, I am in no way capable of using DISTINCT within the filter https://developer.wordpress.org/reference/hooks/posts_distinct/
Because this requires me to send the WP_Query instance, which is basically only used within the repeater element and can not be set to a variable in this particular case.
This means I'll have to rebuild everything through code, instead of being able to use my page or theme builder.
Now I get the idea of saying this is a bug with the page or theme builder plugin.
But in fact, what I want to know is why are we using a filter to create a DISTINCT query inside of WP_Query? Isn't it possible to implement this inside of the WP_Query arguments instead? I basically want to say: fetch posts with unique titles. This seems much more logical as the SQL query is build from WP_Query...
I've already looked through the entire codex, and couldn't find any possible parameter that could be used for this...
My question to you is: Can this please be added to wordpress core?
I find it highly frustrating that WP_Query doesn't have this sort of capabilities out of the box.",simbaclaws
Tickets Awaiting Review,53425,Allow meta_input to be updated through user input,,"Posts, Post Types",5.8,normal,normal,Awaiting Review,enhancement,new,has-patch,2021-06-16T09:38:54Z,2021-06-16T09:38:54Z,"Hi everyone!
This is my first ticket on WordPress trac!
Since 2 years and this changeset [44295], it's not possible anymore to insert/update metadata through user input using **meta_input** entry.
Indeed ''_wp_get_allowed_postdata()'' remove the ''meta_input'' entry from ''$_POST''. Therefore the ''wp_update_post()'' function, then the ''wp_insert_post()'' one receive data without ''meta_input''.
I check the code a lot, and there is no hooks to re-inject properly the ''meta_input'' entry. (all the hooks come too late, after post inserting/updating).
I will finally get to my goal, but in an ugly and heavy way.
I propose to introduce a new hook to filter the not allowed post data fields, changing ''[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/post.php#L214 _wp_get_allowed_postdata()]'' function like that (line 224):
{{{#!php
/**
* Filters the not allowed fields before to remove them from post data.
*
* By default, meta_input, file and guid are not allowed in post data.
*
* @param array $not_allowed Default not allowed post data fields.
* @param array $post_data Array of post data.
*
* @return array Not allowed post data fields.
*/
$not_allowed = (array) apply_filters( 'not_allowed_postdata', array( 'meta_input', 'file', 'guid' ), $post_data );
return array_diff_key( $post_data, array_flip( $not_allowed ) );
}}}
Thanks.
Have a nice day :-)",freepius
Tickets Awaiting Review,41949,Allow multiple values for the same meta key to be passed to `wp_insert_post()`,,"Posts, Post Types",4.4,normal,normal,Awaiting Review,defect (bug),new,has-patch,2017-09-22T02:03:21Z,2023-08-25T07:51:09Z,"[33910] introduced the `meta_input` argument to `wp_insert_post()`. However, there is no way to pass multiple values for the same meta key to be stored individually.",desrosj
Tickets Awaiting Review,45035,"allow register_post_type() arg to control whether a CPT's counts are added to the ""At a Glance"" Dashboard widget",,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,has-patch,2018-10-03T15:38:28Z,2019-08-16T19:02:06Z,"It would be nice if there an arg to `register_post_type()` that controlled whether the CPT's counts were added to the ""At a Glance"" Dashboard widget, e.g.
{{{#!php
true, ... ) );
}}}
Ideally, I think it should default to the value of `show_in_menu`, but as current behavior is the equivalent of `false` I'd be OK with that as the default as well.
Another ""nice to have"" would be to allow the param to take a string value that would be interpreted as a `post_status` to show the count for, e.g., show counts for custom post_status = `mycustompoststatus` instead of `publish`.
I have code that does all of the above, but it would have to be refactored a little bit to submit as a patch (especially to account for the `_builtin` post_types that already appear in AAG).
If folks think this would be a good enhancement I'd be glad to work on that refactoring and submit a patch.",pbiron
Tickets Needing Feedback,44524,Allow Users to View Custom Post Type Admin Page,,"Posts, Post Types",,normal,normal,Future Release,defect (bug),new,dev-feedback,2018-07-05T19:39:48Z,2020-02-21T00:26:01Z,"Creating a custom post type and giving it custom capabilities, a user who can `edit_posts` but cannot `create_posts` cannot access the admin page: `/wp-admin/edit.php?post_type=cpt`.
",wpsmith
Tickets Awaiting Review,38599,Allow verbose rewrite rules with custom post types,,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,,2016-11-01T00:08:41Z,2021-07-27T05:50:55Z,"Every time I create a custom post type (say, Book) I invariably want a structure like this:
/books/ - static page where I can write all sorts of overview content with all of the formatting provided by the theme's page template (not a basic post type archive)
/books/book-1/
/books/book-2/ - custom post type permalinks
This is possible by using a rewrite slug of books.
However, if someone then creates a subpage of books, they'll get a 404 error, full stop.
This has been around a long time, and many workarounds have been provided in trying to get verbose rules triggered, such as: https://gist.github.com/mattberridge/2960966
Rewrite rules underwent some major changes a while ago for improved performance (to get %postname% permastructures working well, then there were pretty attachment URLs, etc), which results in these workarounds no longer working. (Custom post type rules get inserted at a place which isn't easy to reorder and conflicts with other rules).
Instead, I have to keep using unique prefixes which make things look messy and confusing to visitors:
/books/
/book/book-1/ (even though there is no /book/ page on my site)
Having a nicer structure seems like a very common use case (especially given the number of search results you'll find about workarounds).
I'd like to suggest allowing custom post types to trigger verbose rules in a way that will work.",smerriman
Candidates for Closure,52178,Allowed memory size exhausted / url creates new post entry?,,"Posts, Post Types",5.6,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2020-12-26T18:19:40Z,2021-01-05T05:57:58Z,"We get repeated bots (across multiple WP sites) hitting a specific URL pattern, they append a query string onto the end of a wordpress URL like this:
{{{
https://www.example.com/permalink-to-article?q=user%2Fpassword&name%5B%23markup%5D=id&name%5B%23type%5D=markup&name%5B%23post_render%5D%5B%5D=passthru
}}}
This causes a memory exhausted error here:
/wp/wp-includes/post.php at line 773:
{{{
} elseif ( is_object( $post ) ) {
if ( empty( $post->filter ) ) {
$_post = sanitize_post( $post, 'raw' );
$_post = new WP_Post( $_post ); ##<--- HERE
} elseif ( 'raw' === $post->filter ) {
$_post = new WP_Post( $post );
} else {
}}}
",sgatz
Tickets Needing Feedback,35546,"AllPosts page UI: ""Edit"" name in ""Bulk Actions"" does not match with ""Bulk Edit"" group box",,"Posts, Post Types",,normal,minor,Future Release,enhancement,new,,2016-01-20T19:42:09Z,2017-08-07T16:15:17Z,"This may mislead a user. Because not all users know that there are 3 types of editing on this page:
1. Hidden menu ""Edit"".
2. Hidden menu ""Quick Edit"".
3. ""Edit"" in the ""Bulk Actions"" list. This name is equal to the 1. when it is not the same.
Should ""Edit"" in the""Bulk Actions"" be changed on ""Bulk Edit""?",antonrinas
Tickets Awaiting Review,35538,"AllPosts page UI: link ""All"" has incorrect color",,"Posts, Post Types",4.4.1,normal,trivial,Awaiting Review,defect (bug),new,,2016-01-19T23:15:48Z,2023-07-09T20:45:45Z,"STEPS TO REPRODUCE:
1) Log in (administrator), remove all posts.
2) Create new post. Go to AllPosts page.
3) Remove post to trash by clicking ""Trash"" menu item.
EXPECTED RESULT: ""All (0)"" link color #000
ACTUAL RESULT: ""All (0)"" link color #0073aa",antonrinas
Unpatched Bugs,35606,AllPosts page: contradiction in filtering by Category and category assigning to the post,,"Posts, Post Types",4.4.1,normal,minor,,defect (bug),new,,2016-01-25T20:52:14Z,2019-06-04T20:54:43Z,"'''STEPS TO REPRODUCE''':
1. Log in as administrator.
2. Go to Posts->Categories.
3. Add category: Name - ""Test category"", Slug - ""test-category"".
4. Add category: Name - ""Test subcategory"", Slug - ""test-subcategory"", Parent - ""Test category"".
5. Go to AllPosts page.
6. Add new post: Title - ""Test post"", assign it to ""Test category"".
7. Add new post: Title - ""Test post for subcategory"", assign it to ""Test subcategory"".
8. Go to AllPosts page.
9. Filter posts by category ""Test category"".
'''EXPECTED RESULT''':
Post ""Test post"" is presented as a result of filtration.
'''ACTUAL RESULT''':
Posts ""Test post"", ""Test for subcategory"" is presented as a result of filtration. If to follow this logic, post ""Test post for subcategory"" had to be assigned to ""Test subcategory"" and automatically to parent category in the moment of creation.
See attachment.",antonrinas
Tickets Needing Feedback,35537,AllPosts page: sorting is not remembered,,"Posts, Post Types",4.4.1,normal,minor,Future Release,enhancement,new,dev-feedback,2016-01-19T22:43:43Z,2017-02-06T09:13:22Z,"STEPS TO REPRODUCE
1) Log in (administrator).
2) Remove all posts.
3) Create 3 new posts with titles accordingly ""1"", ""2"", ""3""
4) Go to AllPosts page.
5) Click on ""Title"" column header to sort posts by title (as a result: posts is sorted in order 1,2,3).
6) Click ""Published (3)"".
7) Click ""All (3)""
EXPECTED RESULT: posts is sorted in order 1,2,3
ACTUAL RESULT: posts is sorted in order 3,2,1",antonrinas
Unpatched Bugs,35550,AllPosts page: Tags field does not accept characters <>,,"Posts, Post Types",4.4.1,normal,minor,,defect (bug),new,,2016-01-20T21:43:49Z,2019-06-04T20:54:37Z," STEPS TO REPRODUCE
1. Log in as administrator and create new post ""Test post"".
2. Go to AllPosts page. Check ""Test post"" and perform ""Edit"" bulk action.
3. Type into ""Tags"" 2 characters ""<>"". Click ""Update""
EXPECTED RESULT: Characters <> are added as a tag.
EXPECTED RESULT: Characters <> are not added as a tag.",antonrinas
Tickets with Patches,50877,Always sanitize post types' and taxonomies' rewrite arguments,flixos90,"Posts, Post Types",,normal,normal,Future Release,defect (bug),assigned,has-patch,2020-08-07T21:42:39Z,2020-08-19T03:41:57Z,"When registering a post type or taxonomy, currently the `$rewrite` argument / property is only sanitized if pretty permalinks are enabled.
While this condition makes sense for whether to add the actual rewrite rules, sanitization itself should not depend on this external factor. Right now, effectively the `$rewrite` property will be invalid for post types and taxonomies when pretty permalinks are not enabled. When changing the permalink structure during a request (e.g. relevant in tests), this may result in PHP warnings, since the `$rewrite` property is expected to be an array, but due to lack of sanitization could still be e.g. a boolean `true`.
Sanitization of rewrite arguments should always happen for post types and taxonomies to ensure integrity of the property.",flixos90
Tickets Awaiting Review,31416,An accessibility issue with the Publish metabox,,"Posts, Post Types",4.1.1,normal,normal,Awaiting Review,defect (bug),new,,2015-02-22T22:03:33Z,2018-12-09T20:28:05Z,"Taking a closer look at the Publish metabox for posts I realise that it has what I would call a bug. Take a look at the image attached. It tells me a post is published, while it's still asking for confirmation to be published. This screen shows up when first a post is set to private -and so gets published privately- and next is set to public, without hitting the 'Publish' button.
The post is actually published privately, which should show up as it's status, as it normally does. It tells me though it's published (which impies it should be published publicly).
I stumbled upon this, while I was searching for a more intiutive solution for inexperienced posters on one of my sites to post privately. I found two threads in forums which adress this issue:
https://wordpress.org/support/topic/how-to-set-new-post-visibility-to-private-by-default?replies=14
http://wordpress.stackexchange.com/questions/118970/set-posts-of-a-custom-post-type-to-be-private-by-default
Neither of threads mention (or seem to be aware?) of this shortcoming, while both try to solve the same issue I'm having. I question whether this problem can be solved, while the Publish metabox has such shortcomings.
I hope that by fixing this little bug, it might actually be possible to create a more accessisble Publish metabox for guests on a site, maybe by a hack or plugin, but preferably within the WP core files.
[[Image(http://www.basbva.nl/wp-content/uploads/2015/02/publish-metabox-bug.jpg)]]",basbva
Tickets Awaiting Review,60796,An error for page and post without revisions support,,"Posts, Post Types",6.4,normal,normal,Awaiting Review,defect (bug),new,,2024-03-18T10:03:04Z,2024-03-18T10:03:04Z,"Since **6.4.0** the `$revisions_enabled` argument was added to the arguments array of `register_meta()` function (https://developer.wordpress.org/reference/functions/register_meta/#changelog).
For post and page with disabled revisions support there is an error:
Error: Function register_meta was called incorrectly. Meta keys cannot enable revisions support unless the object subtype supports revisions. Please see Debugging in WordPress for more information. (This message was added in version 6.4.0.).
In register_block_core_footnotes() function `revisions_enabled` argument is permanently set to true and it's makes this error.",danielpietrasik
Tickets Awaiting Review,52519,Anchor links not working on password-protected pages (on first click),,"Posts, Post Types",5.6.1,normal,normal,Awaiting Review,defect (bug),new,,2021-02-13T17:40:11Z,2021-02-14T07:31:00Z,"When first clicking an anchor link, the target of which is a password-protected page, and entering the password, the page is loaded without the #anchor in the URL and without jumping to the anchor content. The person has to go back and click the link again after entering the password to jump to the anchor on the page.",chrslcy
Tickets Awaiting Review,49109,Array offset access notice problem with `remove_meta_box()` and `add_meta_box()` function.,,"Posts, Post Types",5.3.2,normal,critical,Awaiting Review,defect (bug),new,,2019-12-31T13:57:29Z,2020-02-26T10:56:19Z,"When I use `remove_meta_box()` function:
{{{#!php
_x( 'Social posts', 'post type general name', 'text-domain' ),
'singular_name' => _x( 'Social post', 'post type singular name', 'text-domain' ),
'menu_name' => _x( 'Social posts', 'admin menu', 'text-domain' ),
'name_admin_bar' => _x( 'Social post', 'add new on admin bar', 'text-domain' ),
'add_new' => _x( 'Add New', 'social-post', 'text-domain' ),
'add_new_item' => __( 'Add New Social post', 'text-domain' ),
'new_item' => __( 'New Social post', 'text-domain' ),
'edit_item' => __( 'Edit Social post', 'text-domain' ),
'view_item' => __( 'View Social post', 'text-domain' ),
'all_items' => __( 'All Social posts', 'text-domain' ),
'search_items' => __( 'Search Social posts', 'text-domain' ),
'parent_item_colon' => __( 'Parent Social posts:', 'text-domain' ),
'not_found' => __( 'No social-posts found.', 'text-domain' ),
'not_found_in_trash' => __( 'No social-posts found in Trash.', 'text-domain' )
);
$args = array(
'labels' => $labels,
'description' => __( 'Description.', 'text-domain' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'social-post' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => 10,
'menu_icon' => 'dashicons-id',
'delete_with_user' => true,
'can_export' => true,
'show_in_rest' => true,
'supports' => array( 'editor' )
);
register_post_type( 'social-post', $args );
}}}
And if i add post the list post page shows title as ""Auto Draft""
",rajanit2000
Tickets Awaiting Review,55306,"Before posts/pages listing if there multiple filter drop-downs, view of pagination buttons are not better looking.",,"Posts, Post Types",5.9.1,normal,normal,Awaiting Review,enhancement,new,has-patch,2022-03-03T12:21:37Z,2022-04-27T11:50:32Z,"While working on multiple drop-downs for particular post type, I came to find this bug when there is pagination is involved, UI is slightly damaged.
Check the attachments for more details.
",haritpanchal
Tickets Needing Feedback,35871,before_delete_post incorrectly triggered from edit.php to post.php,,"Posts, Post Types",4.4.2,normal,normal,,defect (bug),new,reporter-feedback,2016-02-19T10:44:18Z,2019-06-04T20:55:27Z,"It seems there's a bug where {{{before_delete_post}}} triggers when clicking the post name (on edit.php) to go to the post.php admin edit screen. I have this code
{{{#!php
post_content, '' ) && ( ! $multipage || $page == 1 ) )
}}}
as you see, $post->post_content is queried. Then if $post is null, the program falls.
A solution can be to check:
{{{#!php
set('post__not_in', array(5800));
}
}
}
add_action('pre_get_posts', 'mod_func', 999);
}}}
Screenshot:
[https://webgeek.hu/wp-bug-post-counter.jpg]
Hope you can understand me, I'm not the best in English.
If you have questions, feel free to ask me.
Thanks for helping in advance (and thanks for working hard for years),
Sincerely,
Somogyi Balázs
",err
Tickets Awaiting Review,59374,"Bulk Edit does not let me remove ""Uncategorized"" for categorized posts",,"Posts, Post Types",6.3.1,normal,normal,Awaiting Review,feature request,new,,2023-09-17T11:23:39Z,2023-09-17T11:23:39Z,"Bulk Edit Posts does not let you remove category ""Uncategorized"" even when the posts do all have an additional Category.",cmdgw
Tickets Awaiting Review,56728,Can we fix featured image view issue when allowed SVG image type?,,"Posts, Post Types",6.0.2,normal,normal,Awaiting Review,defect (bug),new,,2022-10-04T09:17:51Z,2022-10-04T09:17:51Z,"Hi,
I am facing issue when allowing to upload SVG image on wordpress media.
You can see mentioned SS.
Thank you ",sumitsingh
Candidates for Closure,48013,Can't make a new post,< default>,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),assigned,reporter-feedback,2019-09-10T22:41:31Z,2019-10-08T19:22:07Z,"{{{
TypeError: Cannot read property 'show_ui' of undefined
at https://tjinews.xyz/wp-includes/js/dist/editor.min.js?ver=9.2.6:17:119556
at i (https://tjinews.xyz/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:6:91)
at An.filter (https://tjinews.xyz/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:99:338)
at https://tjinews.xyz/wp-includes/js/dist/editor.min.js?ver=9.2.6:17:119521
at Td (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:82:11)
at hi (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:102:385)
at Qg (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144:217)
at Rg (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145:76)
at Sc (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158:109)
at Z (https://tjinews.xyz/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156:492)
}}}",tjinews
Tickets with Patches,25349,Can't retrieve calculated excerpt bound by on single page view,,"Posts, Post Types",3.6.1,normal,normal,Future Release,enhancement,new,has-patch,2013-09-18T05:22:53Z,2021-06-01T13:35:00Z,"Submitting as Mr. Nacin suggested would be a good idea.
The issue in words I understand is: when you use the_excerpt() on (for instance) a custom page template, it ignores the comment that you might have carefully placed in your content. I would expect it to honor this, since that is kind of the point of that special comment. the_content() will honor it when used on non-single-pages, but in the case of a custom page template, the_content() will of course spit out the entirely of the content.
Andrew gave me this code which does the trick: https://gist.github.com/nacin/ab97d4b0e57b169d26d5 but is apparently hacky and not for public consumption.
This is my lame visual of where I was running into the issue: http://glui.me/?i=5bcy8yr99pl7xel/2013-09-17_at_4.28_PM_2x.png/
Also apparently I'm not the only one who's had this come up recently: https://twitter.com/ShaneHudson/status/380105193419186176",chriscoyier
Unpatched Bugs,36595,"can't set post_modified in wp_insert_post, becomes post_date",,"Posts, Post Types",1.0,normal,normal,,defect (bug),new,dev-feedback,2016-04-19T15:34:29Z,2020-04-01T19:46:50Z,"When manually instering a post, post_modified isn't working, it becomes the post_date
{{{#!php
'test',
'post_content' => 'test',
'post_status' => 'publish',
'post_type' => 'test',
'post_author' => 1,
'post_date' => '2015-01-22 22:00:12',
'post_modified' => '2016-04-18 12:12:12',
'comment_status' => 'closed'
);
wp_insert_post( $wp_test );
}}}
outcome: post_modified = '2015-01-22 22:00:12'",gijsgg
Tickets Awaiting Review,55152,Cannot delete post content if the title is empty,,"Posts, Post Types",2.1,normal,normal,Awaiting Review,defect (bug),new,,2022-02-12T04:54:56Z,2022-02-14T04:07:37Z,"Hi,
I installed WordPress on my new website at [https://openinghours.co.il/]
I've created a custom theme and custom fields and taxonomies for ""post"", in a custom php file, that is called in functions.php.
When I try to test and see if custom fields are saved, I noticed something interesting: when the WordPress default post title (the_title) is empty, and the_content and custom fields are filled, I cannot delete the content that's in ""the_content"" on update or on save draft.
I can delete content from custom fields and it works, but if the content is not empty, I try to delete the content and save draft, the content is still there.
However, after testing, I've found that if ""the_title"" is not empty, I can delete the content that's located in ""the_content"".
The problem accrues only when ""the_title"" (The default post title) is empty.
I am not sure, but I think it doesn't have any relation to the custom fields. However, I I didn't tested it on a site without custom fields.
I hope that I described it clearly, if you have any questions please ask. ",wpdans
Unpatched Bugs,22022,Can’t properly add pages of type edit.php?post_type=xxx as submenu items to arbitrary parent menus,,"Posts, Post Types",3.0,normal,normal,,defect (bug),new,,2012-09-27T20:22:43Z,2019-06-04T20:43:26Z,"The following code illustrates the problem.
{{{
add_menu_page('My Pages', 'My Pages', 'edit_posts', 'parentslug', array(class, func));
add_submenu_page('parentslug', 'Settings', 'Settings', 'edit_posts', 'mysettings', array(class, func));
add_submenu_page('parentslug', 'Custom Post Type', 'Custom Post Type', 'edit_posts', 'edit.php?post_type=xxx');
}}}
When you click on the first submenu item, the menu stays open, displaying the submenu items as it should. When you click on the item for the custom post type, the parent menu is closed and submenu pages are not displayed.
The root of the problem is how $parent_page is handled for pages of type edit.php?post_type=xxx. In get_admin_page_parent(), $parent_file is always set to $submenu[$parent], which may cause the submenu slug to be different from $parent_file. But in _wp_menu_output, if the submenu slug and parent slug are not equal, the 'wp-has-current-submenu wp-menu-open' classes do not get added which means the menu gets displayed as being closed.
Since there are no actions called between get_admin_parent_page() and the output of the menu, the only workaround I can see is some ugly JS that fixes up the classes.
It seems like the least intrusive fix would be to just move the call to apply_filters(""parent_file) in menu-header.php to after the call to get_admin_page_parent() so that $parent_file can truly be overridden. This also seems inline with the intent of the filter.
",jjharr
Tickets Awaiting Review,37775,Capabilities inconsistence when registering CPT,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,,2016-08-22T21:52:54Z,2019-04-25T10:57:20Z,"When registering CPT I can define `capabilities`, and some of them can be ""turned off"", so I can disable, for example, creating a new CPT object with `'create_posts' => false`.
But here is the interesting part:
{{{
'delete_post' => null,
'delete_posts' => false,
}}}
To prevent deletion, I need to specify exactly like above, otherwise I will get notices from WP.
In my opinion, we should have 1 approach, like `false`",slaFFik
Tickets Awaiting Review,60121,"catastrophic content overwrite from ""Add New Pattern""",,"Posts, Post Types",6.4.2,normal,blocker,Awaiting Review,defect (bug),new,,2023-12-20T11:20:48Z,2023-12-20T11:20:48Z,"""Add New Pattern"" /wp-admin/post-new.php?post_type=wp_block&lang=en
from /wp-admin/edit.php?post_type=wp_block
and Publishing it
overwrites / replaces the last there added pattern,
giving it the same post id like the one overwritten / replaced.
When then creating a pattern from a post editor Gutenberg block, that pattern is added next to the pattern(s) at /wp-admin/edit.php?post_type=wp_block giving it an id jumping all those ids equalling attempts at adding a pattern from there.
",vialars
Unpatched Bugs,19031,Category view incorrectly counting custom posts,,"Posts, Post Types",3.2,normal,normal,,defect (bug),new,,2011-10-24T02:40:31Z,2019-06-04T20:42:32Z,"If you define a custom post-type something like this:
{{{
Array
(
[taxonomies] => Array
(
[0] => category
[1] => post_tag
)
[label] => Book
[rewrite_slug] =>
[query_var] =>
[public] =>
[show_ui] => 1
[show_in_nav_menus] => 1
[publicly_queryable] =>
[exclude_from_search] => 1
)
}}}
Even if the post-type is NOT public or NOT publicly_queriable (see above), the counts of the posts in each category still shows, totally ignoring the settings of the post-type.
== Expected Output ==
I would expect the count to be related to the results displayed. If there are no visible results for that category (i.e. the user can't see them due to public settings), I would expect the count to go to zero.
== Actual Output ==
The count of posts in the given category seems to have nothing to do with the visible results.
This is related to this bug: #18950",fireproofsocks
Unpatched Bugs,25798,Certain single CPT items result in 404 since 3.7,,"Posts, Post Types",3.7,normal,normal,,defect (bug),new,needs-unit-tests,2013-11-01T14:58:10Z,2019-06-04T20:45:08Z,"Related: #25749
The changes in [25182] to the query_var mapping of hierarchical post types have broken single permalinks in some cases, when Permalink setting is set to ""Post name"". To reproduce:
1. Register a post type as follows:
{{{
register_post_type( 'bbg_test', array(
// ...
'hierarchical' => true,
'public' => true,
'rewrite' => true, // any value other than false
'query_var' => false,
// ...
) );
}}}
2. Set permalink settings to ""Post name"" (and flush)
3. Create a new post of the type above, and attempt to visit at the url `http://example.com/bbg_test/foo` (or whatever). Result: 404.
4. Change to any other permalink setting. Result: page loads as expected.
Cause: When the CPT is registered with `'rewrite'` other than `false`, it passes the test at http://core.trac.wordpress.org/browser/tags/3.7/src/wp-includes/post.php#L1275. When it's hierarchical, it passes the test at line 1293. When, because `'query_var'` is set to `false`, the rewrite tag set on line 1294 is of the form 'post_type=bbg_test&pagename=foo' (instead of 'bbg_test=foo'). Then, when an item is loaded, during `WP::parse_request()`, it passes the `preg_match()` test here http://core.trac.wordpress.org/browser/tags/3.7/src/wp-includes/class-wp.php#L198, but a page (ie, an item with `post_type` 'page') is not found by `get_page_by_path()`, and as a result the correct rewrite rule is not matched.
As noted, this is a regression in 3.7 [25182], before which `preg_match( '/pagename=\$matches...` wouldn't have matched.
Obviously it's an edge case that (a) a post type is hierarchical AND has query_var set to false, and also (b) permalinks are set to ""Post name"", but it is a change in behavior that broke one of my plugins, and has been a bit of a bear to track down :) I'm going to set `query_var` to true for my purposes (no harm done on my end) but that may not be possible for others.",boonebgorges
Candidates for Closure,50292,Change 'post updated' notification text to '[post type name] updated',,"Posts, Post Types",,normal,normal,Awaiting Review,enhancement,new,close,2020-06-01T09:48:27Z,2020-07-28T01:36:16Z,"When working with a custom post type if you update the post you get the notification ""Post updated."" - would this be better to show the post type name instead of post? It's more descriptive.
I have flagged 'updated' but I suspect there maybe more instances of this with other statuses.",ninetyninew
Unpatched Enhancements,34546,Change in function `get_post_field`,,"Posts, Post Types",,normal,normal,,enhancement,new,,2015-11-01T18:35:51Z,2019-06-04T20:53:00Z,"I suggest change for function get_post_field();
1. Second param should be optional;
2. Add default value in param of function.
Additional I have question. Why in function get_the_ID() or get_post_title(); don't call function get_post_field ?
In many functions in first line is $post = get_post( $post );
If we insert my patch then we can use:
{{{
function get_the_ID() {
return get_post_field('ID', null, 'display', false);
}
}}}
OR
{{{
function get_the_guid( $id = 0 ) {
return apply_filters( 'get_the_guid', get_post_field( 'guid', $id ) );
}
}}}
",sebastian.pisula
Tickets Awaiting Review,59085,Command Palette - switching posts wrong url redirect for non FSE sites,,"Posts, Post Types",6.3,normal,normal,Awaiting Review,defect (bug),new,,2023-08-12T12:24:23Z,2023-08-12T12:24:23Z,"With the new update to WordPress 6.3, they introduced the command palette. This is great for quickly and easily switching between posts and other things.
It is enabled for all sites (including sites not using a FSE theme)
However, when trying to switch to a different post, it redirects me to:
{{{/wp-admin/site-editor.php?postType=post&postId=12621}}}
Which I then get the error:
{{{The theme you are currently using is not compatible with the Site Editor.}}}
The command should change the slug it tries to visit depending on if your site supports FSE or not.
Either:
{{{/wp-admin/post.php?post=12621&action=edit}}}
or
{{{/wp-admin/site-editor.php?postType=post&postId=12621}}}
",tdrayson
Unpatched Enhancements,50921,Consider adding title attributes for metabox order buttons,joedolson*,"Posts, Post Types",5.5,normal,normal,Future Release,enhancement,accepted,,2020-08-12T04:48:33Z,2021-05-26T09:02:02Z,It's obvious but I feel the title attribute for new metabox indicators will be helpful for some users to know what will these indicator buttons do by browser's tooltip.,ibachal
Tickets Awaiting Review,32824,Consistent search fields between posts and terms,,"Posts, Post Types",,normal,normal,Awaiting Review,feature request,new,,2015-06-29T13:42:54Z,2017-07-23T02:17:53Z,"Searching for posts [https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/query.php#L2091 currently checks] the `post_title` and `post_content` fields, while [https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/taxonomy.php#L1899 searching terms] checks the `name` and `slug` fields. Could `post_name` be added to the where clause for posts, and `description` be added to terms? That way, searching would consistently check an entity's title, slug, and content.",ashworthcreative
Unpatched Bugs,52389,Consistently check for non-empty post ID in attachment functions,SergeyBiryukov*,"Posts, Post Types",,normal,normal,Future Release,defect (bug),accepted,,2021-01-28T10:53:31Z,2021-02-17T23:54:41Z,"Background: #50679, #52196.
As a result of the changes in [49084] and [50039], `wp_get_attachment_metadata()` conditionally calls `get_post()` if the attachment ID is not passed:
{{{
$attachment_id = (int) $attachment_id;
if ( ! $attachment_id ) {
$post = get_post();
if ( ! $post ) {
return false;
}
$attachment_id = $post->ID;
}
}}}
This is not really consistent with other attachment functions, which just always call `get_post()` unconditionally:
{{{
$attachment_id = (int) $attachment_id;
$post = get_post( $attachment_id );
}}}
Let's bring some consistency here, there is no reason for these minor differences.
This applies at least to:
* `wp_get_attachment_metadata()`
* `wp_get_attachment_url()`
* `wp_get_attachment_caption()`
* `wp_get_attachment_thumb_file()`
* `wp_get_attachment_thumb_url()`",SergeyBiryukov
Tickets Awaiting Review,40079,Content of static pages does not show when you have a count_post in the theme,,"Posts, Post Types",4.7.3,normal,normal,Awaiting Review,defect (bug),new,,2017-03-09T14:08:13Z,2017-03-09T14:14:38Z,"in page.php when you have elsewhere:
{{{#!php
publish;
$numberofcats = wp_count_terms('category');
echo ""
"".$posts."" articles in "".$numberofcats. "" categories:
"";
?>
}}}
then the content inside the loop of a static page will display the content of an article. well for me i fixed it with:
{{{#!php
"".$count_posts->publish."" articles in "".$numberofcats. "" categories:"";
?>
}}}
I am testing it on a custom theme but with plain code you will see this too.
tested it on a plain installation with custom theme in page.php:
{{{
}}}
",devlink1337
Tickets with Patches,15784,Contributors can't easily view others' posts in a certain term,,"Posts, Post Types",3.0,normal,normal,,defect (bug),new,has-patch,2010-12-12T11:38:39Z,2019-06-04T20:41:39Z,"As a contributor, the default tab is 'Me', not 'All'. But you can go to 'All' and see a list of all posts.
At that time, you can also search for posts, and filter by category, date, etc. Those all work fine. You can also filter by category or tag by clicking a term in those columns, but this doesn't work -- all_posts=1 gets removed, and you end up seeing the 'Me' tab again.
You can manually append all_posts=1, but there's no way to actually filter by term viewing all posts via the UI.
Interestingly, the author query var works. That'd be bad if it didn't. But it doesn't append all_posts=1, so it's done internally.",nacin
Tickets with Patches,41448,Contributors shouldn't be able to change the date of their drafts,,"Posts, Post Types",2.7,low,normal,Future Release,defect (bug),new,needs-unit-tests,2017-07-26T12:33:48Z,2017-08-04T13:24:10Z,"(I'm guessing that) contributors shouldn't be able to change a post's publication date—that's why the ''Publish'' box doesn't include the date when logged in as a contributor in the first place. However, if a contributor quick edits a post in the ''All Posts'' screen, they'll be able to change the post's date.
We should remove the date field from the ''Quick Edit'' form. Or, alternatively, we should allow contributors to edit this date while they're editing a post. Either way, both screens should be consistent.",davilera
Tickets Awaiting Review,57741,"Core throwing 'Attempt to read property ""post_type"" on null'",,"Posts, Post Types",6.1.1,normal,normal,Awaiting Review,defect (bug),new,,2023-02-17T04:04:23Z,2023-02-17T10:25:39Z,"A calls B. B calls C.
C is calling get_post() passing in args from B.
C then proceeds to immediately use the results of get_post() ($post->post_type) without checking the response, resulting in an edge condition where a warning is thrown: Attempt to read property ""post_type"" on null
A: https://github.com/WordPress/WordPress/blob/f0789b64238a97adc3ce0c9b8cdf33c1753f550c/wp-admin/post.php#L186-L189
B: https://github.com/WordPress/WordPress/blob/f0789b64238a97adc3ce0c9b8cdf33c1753f550c/wp-admin/edit-form-blocks.php#L249-L253
C: https://github.com/WordPress/WordPress/blob/f0789b64238a97adc3ce0c9b8cdf33c1753f550c/wp-includes/media.php#L4552-L4558",haykuro
Candidates for Closure,55442,count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-includes/post-template.php on line 319,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2022-03-22T21:59:34Z,2022-03-22T23:41:57Z,"Call get_the_content() with no arguments and $post is null. If post is null then this is ran:
{{{#!php
$elements = compact( 'page', 'more', 'preview', 'pages', 'multipage' );
}}}
Associate array has keys with null values. Then on lin3 319 is
{{{#!php
if ( $elements['page'] > count( $elements['pages'] ) ) {
}}}
Which causes this notice:
{{{
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-includes/post-template.php on line 319 Notice: Trying to access array offset on value of type null in /var/www/html/wp-includes/post-template.php on line 325
}}}
",davidscpl
Tickets Awaiting Review,29117,Custom Field metabox shows table header information even though it has no data to show.,,"Posts, Post Types",2.9,normal,normal,Awaiting Review,defect (bug),new,has-patch,2014-08-05T13:33:42Z,2019-06-20T12:36:47Z,This can be verified by adding a post and then submitting an empty meta key and meta value. A validation error occurs but at the same time the table header information is displayed.,Ankit K Gupta
Tickets with Patches,37627,Custom Fields Heading shows up when all meta values are serialized arrays/objects,,"Posts, Post Types",,normal,normal,,defect (bug),new,has-patch,2016-08-10T18:38:23Z,2019-06-04T21:02:53Z,"`_list_meta_row` skips the meta rows when the value is a serialized array/objects.
When all meta values are serialized arrays/objects OR when you only have one meta with the value being serialized array/object the table heading shows up:
[[Image(https://cldup.com/sVKAp24YMF.png)]]
[[Image(https://cldup.com/0axQNTon98.png)]]
There is a check for protected metas before the table rendering
wp-admin/includes/meta-boxes.php:631
{{{
$metadata = has_meta($post->ID);
foreach ( $metadata as $key => $value ) {
if ( is_protected_meta( $metadata[ $key ][ 'meta_key' ], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ][ 'meta_key' ] ) )
unset( $metadata[ $key ] );
}
list_meta( $metadata );
}}}
but it does not take in account meta values, which are skipped later.
''This might be considered an edge case, but it is better to be noted.''
Discovered this when I reported: #37626",implenton
Tickets with Patches,12706,Custom post status bugs,,"Posts, Post Types",3.0,normal,normal,Future Release,task (blessed),reopened,needs-unit-tests,2010-03-25T14:41:39Z,2022-06-02T13:42:36Z,"A developer should be able to register a custom post status using `register_post_status()`. The admin UI (including post submit box and quick edit) should reflect this new custom post status. Furthermore, there are many hard-coded references to 'draft' and 'pending' statuses in core that should properly use the post status API.
All existing arguments to `register_post_status()` should be fully implemented, should also support per-post-type arguments. As things get implemented across core, there will likely be a need for supporting capabilities and bits of API.
Related: #23169 (register_post_status_for_object_type), #23168 (unregister_post_status).",ptahdunbar
Tickets Awaiting Review,59766,Custom post type archive URLs are being resolved in an unexpected way if a page with the same slug exists and the URL's casing doesn't exactly match the custom post type's rewrite slug,,"Posts, Post Types",6.3.2,normal,normal,Awaiting Review,defect (bug),new,has-patch,2023-10-30T13:34:38Z,2024-01-18T20:19:53Z,"== Steps to reproduce:
- Have a custom post type with an archive slug of `/projects/`
- Have a post with post_type `page` with an identical slug, e.g. ""Projects"", with a slug of ""/projects/""
- Visit ""https://example.com/Projects"" (note the Titlecase spelling here)
- Observe how the request is being resolved to the single page ""Projects"" instead of the (expected) post type archive page, even though the rule for the post type comes first.
== Proposed solution
- I was able to fix this behavior locally by making all archive rewrite rules for custom post types case-insensitive. In `class-wp-post-type.php`, line #658:
{{{#!php
name"", 'top' );
// ...
}}}
",nonverbla
Tickets Awaiting Review,47041,Custom Post type author empty,,"Posts, Post Types",5.1.1,normal,normal,Awaiting Review,defect (bug),new,,2019-04-25T11:30:05Z,2020-04-22T06:20:09Z,"If I created Custom post type with rest enabled [ for Gutenberg support ] and I try to created/publish custom post type then Post author is empty instead of the current user
I checked with bbPress Post type forum, For enabled rest support, refer the following code
{{{#!php
function twentyseventeen_rest_support_bbpress() {
global $wp_post_types;
$forum_post_type = bbp_get_forum_post_type();
if (isset($wp_post_types[$forum_post_type])) {
$wp_post_types[ $forum_post_type ]->show_in_rest = true;
}
}
add_action('init', 'twentyseventeen_rest_support_bbpress', 25);
}}}
",dipesh.kakadiya
Tickets Awaiting Review,20438,Custom Post Types with Post Format support aren't registered against post_format taxonomy,,"Posts, Post Types",,normal,normal,Awaiting Review,defect (bug),reopened,,2012-04-13T16:56:40Z,2022-05-13T22:06:11Z,"When a custom post type adds support for {{{post-formats}}}, this doesn't actually register the {{{post_format}}} taxonomy for the post_type.
Here's a quick test:
{{{
add_action( 'init', function() {
register_post_type( 'not-post', array( 'supports' => 'post-formats' ) );
global $wp_taxonomies;
var_dump( 'post supports post_format:', in_array( 'post', $wp_taxonomies[ 'post_format' ]->object_type ) );
var_dump( 'not-post supports post_format:', in_array( 'not-post', $wp_taxonomies[ 'post_format' ]->object_type ) );
} );
}}}
The {{{post_format}}} taxonomy doesn't get returned when {{{get_object_taxonomies}}} is called for the custom post type and one side-effect of this is that the {{{post_format_relationships}}} cache does not get flushed by {{{clean_object_term_cache}}} leading to stale values when a post format is changed.
(The {{{post}}} post_type is immune to this because core registers the {{{post_format}}} taxonomy with it.)
When a post_type adds support for post-formats, an explicit association should be made between the post_type and the {{{post_format}}} taxonomy.",batmoo
Tickets Awaiting Review,43084,dashboard confuses published posts count with all posts,,"Posts, Post Types",2.7,normal,normal,Awaiting Review,defect (bug),new,,2018-01-13T23:22:05Z,2019-05-15T08:11:35Z,"the following is a good first bug for new contributors, IMO!
because it's very easy to fix
https://core.trac.wordpress.org/tickets/good-first-bugs
in dashboard, in ""at a glance"" section there's a misleading link:
1. its hyper reference uri leads to list of '''all existing''' posts
/wp-admin/edit.php?post_type=post
there are currently 26 posts in my blog
2. its label is ""8 posts"" where 8 -- is the number of '''currently published''' posts
/wp-admin/edit.php?post_status=publish&post_type=post
there are currently 8 published posts in my blog
3. its icon is the pushpin. and the pushpin usually means '''sticky''' posts
/wp-admin/edit.php?post_type=post&show_sticky=1
there are currently 1 sticky post in my blog
thus, as you can see, this link confuses ""all posts (26)"" with ""published posts (8)"" AND with ""sticky posts (1)""
I know, WordPress uses pushpin icon to indicate any post, so, maybe, I'm wrong about sticky posts.
But I'm definitely not mistaken in that you cannot label the link as ""8 posts"" and make it refer to the list of 26 posts -- it should be fixed.
Either label should be ""26 posts"" or it should go to list of published posts.
IMO, the latter choice (lead to published posts).",awardpress
Tickets Awaiting Review,50843,Default category for custom posts when post_content is empty,,"Posts, Post Types",5.5,normal,normal,Awaiting Review,defect (bug),new,,2020-08-04T15:44:52Z,2020-08-11T19:08:40Z,"If you enter only the post_content and save, or enter the post_title and post_content and save, the default category is selected and it works as intended.
But when I type in only the post_title and save it, no categories appear to be selected.
Upon investigating the reason, if no post_content is entered, the post_status value will be ""auto_draft"" and as a result the default category will not be applied.
Is the above as expected?
WordPress: 5.5-RC1-48708",tmatsuur
Tickets Needing Feedback,30775,Delete empty post problem,wonderboymusic,"Posts, Post Types",3.3,normal,normal,,defect (bug),reopened,dev-feedback,2014-12-19T02:20:16Z,2021-11-27T03:26:30Z,"If empty post was created it cannot be deleted
Details are here http://arul.ru/pages/writings/delete_post_problem.htm",axdr
Candidates for Closure,47427,deleted pages for a plugin prevent page creation during re-installation of plugin,,"Posts, Post Types",5.2.1,normal,normal,Awaiting Review,defect (bug),new,reporter-feedback,2019-05-29T13:56:00Z,2019-06-01T12:07:13Z,"Plugin xyz creates pages 'login' and 'registration' when it is installed. Those pages are subsequently deleted (moved to trash) and the plugin is uninstalled. If the plugin is then re-installed it will not be able to create 'login' and 'registration' because these pages are sitting in trash. That should not happen because an active 'login' page should not be equal to a 'login' page in trash, they should be separate and distinct page instances which cannot affect each other unless the user takes explicit action (similar to the philosophy behind package installation in Linux):
1. The current behavior should be modified to allow concurrent active and trash instances of the same page.
2. A plugin should have a force option for creating pages.
3. There should be a force restore from trash option. The user would need to be warned, but it should be their choice.
",nbi1
Tickets with Patches,34808,Deprecate get_media_embedded_in_content() and get_tag_regex(),,"Posts, Post Types",,normal,normal,,defect (bug),new,has-patch,2015-11-28T05:08:54Z,2019-06-04T20:53:17Z,"Both are ""dead"" functions not used anywhere in core. Seem like left overs from the post types code in 3.6.
`get_media_embedded_in_content()` is buggy: cannot handle nested `