[wp-trac] [WordPress Trac] #23264: Add filter for default links for multisite installs

WordPress Trac noreply at wordpress.org
Tue Jan 22 08:11:52 UTC 2013


#23264: Add filter for default links for multisite installs
-----------------------------+-------------------------
 Reporter:  fliespl          |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Multisite
  Version:                   |   Severity:  minor
 Keywords:                   |
-----------------------------+-------------------------
 Topic says it all. It would be great to add filter to the array of default
 links, as other parts are customizable either through filters or site
 entries in the database.

 Change:
 {{{
         foreach ( $default_links as $link ) {
                 $wpdb->insert( $wpdb->links, $link);
                 $wpdb->insert( $wpdb->term_relationships,
 array('term_taxonomy_id' => $blogroll_tt_id, 'object_id' =>
 $wpdb->insert_id) );
         }
 }}}

 to:
 {{{
         foreach ( $default_links as $link ) {
                 $wpdb->insert( $wpdb->links, $link);
                 $wpdb->insert( $wpdb->term_relationships,
 array('term_taxonomy_id' => $blogroll_tt_id, 'object_id' =>
 $wpdb->insert_id) );
         }

         $default_links = apply_filters( 'wp_install_default_links',
 $default_links );
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23264>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list