humanmade / humanmade/Unpublish

issue with _ in post type

Open
#40 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
24
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Thank you for this simple solution. It has worked very well however there is an issue with the display of the calendar when the post type has an _ in the name. I was able to trace the issue to this after seeing it work on other post types. Then I created another one with an _ in the name and could replicate the issue. Our example post type is day_camp and I am using the following snippet in functions:

```
$types = array( 'run', 'program', 'day_camp', 'home_slide' );
foreach( $types as $type ) {
add_post_type_support( $type, 'unpublish' );
}
```

I've attached the screenshot displaying the behavior on that post type. I am not seeing any console errors, just the odd layout issue.
![Screen Shot 2020-11-16 at 2 34 39 PM](https://user-images.githubusercontent.com/19677993/99310882-e9b1c580-2818-11eb-85f4-adb5decaa472.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the calendar display problem with the functions snippet and a post type containing an underscore, such as day_camp or home_slide, and compare it with run or program. Use the attached screenshot as the expected symptom; done means underscore-named post types display the calendar layout correctly without console errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.