Opened 9 years ago
Closed 9 years ago
#36801 closed enhancement (worksforme)
Add post type to editor form class
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | close |
Focuses: | Cc: |
Description (last modified by )
typical source code of the editor in the admin is like this:
<form name="post" action="post.php" method="post" id="post">
Suggestion:
When i add (or edit) a post type MyVideos, it is good, if the <form>
contained the class name, like:
<form class="posttype-MyVideos" name="post" action="post.php" method="post" id="post">
default for typical posts or pages should be i.e. class="posttype-post" and class="posttype-page"
Change History (3)
Note: See
TracTickets for help on using
tickets.
Why? The post type is already part of the
<body>
. For example, for thepost
post type it looks like this:<body class="wp-admin wp-core-ui post-new-php post-type-post …">
IMHO the editor should not need to know about the post type (and probably can't the way things are set up now).
If you need to target the editor for a specific post type, you can use
.post-type-<type> form