Make WordPress Core

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#13007 closed enhancement (wontfix)

Provide Post-like UI for editing commentmeta

Reported by: beaulebens's profile beaulebens Owned by:
Milestone: Priority: low
Severity: normal Version: 3.0
Component: Comments Keywords:
Focuses: Cc:


Now that the commentmeta table is available, it seems like it'd make sense to have a simple UI for accessing/editing metadata associated with a comment via wp-admin.

I imagine this could be largely a copy-paste of the Custom Fields portion of the Post Edit screen, just tying into wp_commentmeta instead. This UI could just appear on the bottom of the current Comment Edit screen (/wp-admin/comment.php?action=editcomment&c=123)

Unless someone beats me to it, I'll take a stab at a patch some time soonish.

Change History (10)

#1 @mikeschinkel
14 years ago

  • Cc mikeschinkel@… added

#2 @ptahdunbar
13 years ago

  • Cc trac@… added

#3 @sparkweb
12 years ago

I wanted to do the same thing. I wrapped this in a plugin and I did a copy-paste on the code and got it all displaying fine, but then ran into big troubles on the jQuery side, trying to get it to add/save/update/delete. I couldn't really figure out what was going on in wp-admin/js/ Here's the link to the plugin in case anyone wants to take it from here:

Since I couldn't even get Add to work, I set the whole meta box to be hidden if there wasn't any meta data to be found for the comment.

#4 @nacin
12 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

We shouldn't have this in core, considering we should probably phase out the Custom Fields box for posts too. A plugin sounds pretty nifty.

#5 @scribu
12 years ago

  • Keywords needs-patch removed

Agree with phasing out the Custom Fields box. It's useless if the theme (or a plugin) doesn't do something with the inserted data.

#6 @sparkweb
12 years ago

But as a theme developer, I use custom fields all the time for little things on a page-by-page basis. Isn't it better to just leave it turned off on screen settings but available to be turned on (viewable) by anyone who needs it?

I know it's better to create your own meta_box (which I guess I'd kind of agree with), but that definitely takes some technical skill. Seems like it would be a pretty big barrier to entry for a lot of folks just wanting to use one or two custom fields in a page or post.

Last edited 12 years ago by sparkweb (previous) (diff)

#7 @scribu
12 years ago

It is already hidden by default.

Yeah, it does take quite some skill actually; the 'save_post' hook is full of gotchas.

#8 @sparkweb
12 years ago

So I guess what I'm saying is: don't phase out the custom fields box for posts, instead just leave it hidden. Seems like it would be consistent to have the same functionality for comment meta as well. Although, since this is a much-less-used feature, I guess it would be fine to just leave it as a plugin for those that need -- except that the plugin doesn't exist (yet).

#9 follow-up: @GaryJ
12 years ago

  • Cc gary@… added

Slightly OT: Is there a ticket related to the phasing out of Custom Fields for posts?

#10 in reply to: ↑ 9 @nacin
12 years ago

Replying to GaryJ:

Slightly OT: Is there a ticket related to the phasing out of Custom Fields for posts?

Nope. I doubt this will happen soon, but we've laid the groundwork for a while now -- we now hide the meta box by default, we've introduced register_meta() to mitigate any info-disclosure risks, and are working on an API for custom meta boxes that will hopefully make it easy for developers to do their own box.

Note: See TracTickets for help on using tickets.