Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#22497 closed enhancement (wontfix)

Post type should be able to show on mobile apps

Reported by: markoheijnen's profile markoheijnen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: needs-refresh dev-feedback
Focuses: Cc:

Description

Currently the mobile apps only show Post and Pages. Part of the reason is that the apps can't know if the post type is worth showing in the apps since it's heavily based on several meta-boxes. I think this is a nice add-on for developers to make that decision.

The patch is really simple and is just adding a extra parameter to register post type.

Attachments (1)

show_mobile.diff (1.7 KB) - added by markoheijnen 12 years ago.
show_mobile parameter for register_post_type

Download all attachments as: .zip

Change History (21)

@markoheijnen
12 years ago

show_mobile parameter for register_post_type

#1 @mordauk
12 years ago

  • Cc pippin@… added

#2 @koke
12 years ago

It's a good start, but the problem is most custom post types would require a custom UI anyway

#3 @nacin
12 years ago

A post type would have to opt into this, so they really only should if they know that the mobile device can properly serve a workable experience. The "supports" arguments can go a long way: Whether the post type supports title, editor, thumbnail, etc.

#4 @markoheijnen
12 years ago

I like this way because of the opt in. We can make assumptions but that is the wrong we to do. WordPress should try to do it's job a good as it can. And with this solution someone can allow a certain post type to show up.

Also till now we didn't come up with a good way to deal with custom post types in a good way. This is a first step.

#5 @wonderboymusic
12 years ago

-1

This is app/theme logic, should not be tightly coupled with component registration.

#6 @markoheijnen
12 years ago

This isn't theme logic at all. This is back-end logic. It's the same as 'show_ui'

#7 follow-up: @wonderboymusic
12 years ago

Changing core code to change what shows up the WordPress app makes no sense to me - the mobile app should just respect the show_ui flag then. Seems like the lack of extensibility of the app is the problem.

#8 @markoheijnen
12 years ago

That is somehow the problem. It's also the lack of extensibility of wp-admin. This solution is however a temporarily solution for now since the app can't know if the mobile device can show the post type properly.

#9 in reply to: ↑ 7 @mordauk
12 years ago

Replying to wonderboymusic:

Changing core code to change what shows up the WordPress app makes no sense to me - the mobile app should just respect the show_ui flag then. Seems like the lack of extensibility of the app is the problem.

Simply respecting the show_ui flag will never work, not unless the app also supports custom meta boxes (which seems far less likely).

I'm all for this. I see no reason why a a simple CPT (with no meta boxes) shouldn't be accessible from the app.

#10 follow-up: @wonderboymusic
12 years ago

If the app doesn't support custom meta boxes, what's the point of opting in a custom post type? then you are only ever providing support for post types that have the same UI as page and post, which means you maybe shouldn't be using custom post type in the first place.

#11 in reply to: ↑ 10 @mordauk
12 years ago

Replying to wonderboymusic:

If the app doesn't support custom meta boxes, what's the point of opting in a custom post type? then you are only ever providing support for post types that have the same UI as page and post, which means you maybe shouldn't be using custom post type in the first place.

There are tons of cases where a CPT will have the exact same UI as posts / pages. Meta boxes are not the only reason to use a CPT.

For example, I might run a site that does reviews and tutorials. Each of them would be there own CPT, even though they share an identical UI (default). Why should these CPTs be excluded from the app? Saying these should be a page/post isn't always valid either, especially as CPTs allow completely separate URL structures for each type.

#12 @markoheijnen
12 years ago

We can't go from 0 to a perfect solution. We need to take steps and this is one step we need to take. Obviously you want to have custom mete box support but that can take forever and most likely never happens. It's not because we don't want to but it's almost impossible to have a great experience.

#13 follow-up: @wonderboymusic
12 years ago

I don't think register_post_type is the place make sure the WordPress.com phone app works the way you want. To me, it's like saying: I don't like the app's nav design, so let's change admin.css.

#14 in reply to: ↑ 13 @mordauk
12 years ago

Replying to wonderboymusic:

I don't think register_post_type is the place make sure the WordPress.com phone app works the way you want. To me, it's like saying: I don't like the app's nav design, so let's change admin.css.

Isn't respecting show_ui really the same thing? The only difference is that it doesn't require an update to core code.

#15 @wonderboymusic
12 years ago

show_ui is already there, so the app maker should find a way to support post types with that flag set to true. Otherwise, what's next, show_tablet? show_xbox?

#16 @mordauk
12 years ago

I can see your point, but I don't see any problem with upgrading core to make it better support an external application. That's one of the reason we make changes in core: to improve support for other systems / integrations. APIs are upgraded to make them easier to use. show_mobile is nothing more than another parameter in the post type API.

And in this case the app is hardly an external / 3rd party application. Further supporting WordPress.com integration is nothing like supporting Xbox integration.

#17 @markoheijnen
12 years ago

In this case app maker are your co-contributors. Who work on the mobile apps to make the WordPress (overall) experience better. This ticket is needed for now because of the lack of other possibilities in WordPress core.

#18 @koke
12 years ago

  • Cc koke added
  • Keywords mobile added

#19 @chriscct7
10 years ago

  • Keywords needs-refresh dev-feedback added; has-patch mobile removed

#20 @wonderboymusic
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.