[wp-trac] [WordPress Trac] #35409: Custom Taxonomy UI is not generated in "Press This" Panel

WordPress Trac noreply at wordpress.org
Mon Jan 11 21:45:43 UTC 2016


#35409: Custom Taxonomy UI is not generated in "Press This" Panel
--------------------------------+-----------------------------
 Reporter:  undergroundnetwork  |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Future Release
Component:  Press This          |     Version:  4.2
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  ui
--------------------------------+-----------------------------

Comment (by undergroundnetwork):

 Replying to [comment:1 kraftbj]:
 > While the conversation regarding expanding PT has centered around
 allowing plugins to hook in meta boxes of some type, custom taxonomies on
 the `post` post type isn't something I've thought of personally. It seems
 plausible without opening up a Pandora's box.
 >
 > Regarding using a CPT for Press This, can I ask how you have that setup?
 Using it for CPTs isn't something I explored during development.

 I used the following code to get Press This to work with a Custom Post
 type:


 {{{
 /**
  * Plugin Name: Custom Press-This Post Type
  * Plugin URI:  http://wordpress.stackexchange.com/a/192065/26350
  */
 add_action( 'wp_ajax_press-this-save-post', function()
 {
     add_filter( 'wp_insert_post_data', function( $data )
     {
         if( isset( $data['post_type'] ) && 'post' === $data['post_type'] )
             $data['post_type'] = 'un_ratethepress'; // <-- Edit this to
 your needs!

         return $data;
     }, PHP_INT_MAX );

 }, 0 );
 }}}
  It works GREAT!  Whenever I press the Press This bookmarklet it now uses
 the custom post type.


 The reason WHY we're using a Custom Post Type is that we're creating a
 website where we rate News Articles from around the web for accuracy in
 reporting, kind of like a "Snopes" for News and "Press This" is perfect
 for this in the way it works (reposting articles, grabbing summaries, and
 allowing you to comment.) For "Fair Use" guidelines, when you repost other
 people's content you want to be commenting on that content otherwise you
 are potentially stealing their content (per copyright guidelines)

 We have an additional taxonomy called RATING and it looks like this:

 [[Image(http://media.underground.net/images/trac/concept2.jpg)]]

 - Not Sure if you wanted the WHY or the HOW so I included both.

 Thanks!
 Charles

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35409#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list