[wp-trac] [WordPress Trac] #18958: Can't set "Show on screen" for Custom post types

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 20 17:55:09 UTC 2012


#18958: Can't set "Show on screen" for Custom post types
-----------------------------+------------------
 Reporter:  dd32             |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  3.5
Component:  Administration   |     Version:  3.3
 Severity:  normal           |  Resolution:
 Keywords:  has-patch early  |
-----------------------------+------------------

Comment (by nacin):

 This could work as an upgrade routine:

 {{{
 /**
  * Execute changes made in WordPress 3.5.
  *
  * @since 3.5.0
  */
 function upgrade_350() {
         if ( $wp_current_db_version < 99999 && is_main_site() && !
 defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
                 $meta_keys = array();
                 foreach ( array_merge( get_post_types(), get_taxonomies()
 ) as $name ) {
                         if ( false !== strpos( $name, '-' ) )
                         $meta_keys[] = 'edit_' . str_replace( '-', '_',
 $name ) . '_per_page';
                 }
                 if ( $meta_keys ) {
                         $meta_keys = implode( "', '", $meta_keys );
                         $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE
 meta_key IN ('$meta_keys')" );
                 }
         }
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18958#comment:35>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list