[wp-trac] [WordPress Trac] #15847: Add filter in wp_insert_attachment for $data

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 2 19:49:12 UTC 2011

#15847: Add filter in wp_insert_attachment for $data
 Reporter:  pampfelimetten  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Plugins         |     Version:  3.0.3
 Severity:  normal          |  Resolution:
 Keywords:                  |

Comment (by pampfelimetten):

 Just in case anybody wants to do the same as me, this is the code I now
 use with the 3.1 version:

 function cba_wp_unique_post_slug_is_bad_attachment_slug ($false, $slug) {
         if(is_numeric($slug)) return true;
         else return false;
 add_filter( 'wp_unique_post_slug_is_bad_attachment_slug',
 'cba_wp_unique_post_slug_is_bad_attachment_slug', '10', 2);

Ticket URL: <http://core.trac.wordpress.org/ticket/15847#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list