| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 7 months |
| seen | Apr 26 at 15:51 | |
| stats | profile views | 2 |
|
Apr 28 |
awarded | Self-Learner |
|
Mar 22 |
awarded | Revival |
|
Feb 25 |
awarded | Teacher |
|
Dec 12 |
awarded | Scholar |
|
Dec 12 |
revised |
Filter to modify post_title after image upload? Added Wordpress version number, since my accepted answer relies on the latest version. |
|
Dec 12 |
accepted | Filter to modify post_title after image upload? |
|
Dec 12 |
answered | Filter to modify post_title after image upload? |
|
Dec 12 |
comment |
Filter to modify post_title after image upload? After updating my site to Wordpress 3.5, I realized this was much simpler now, since it no longer requires a Title on images, and doesn't fill in the Title when reordering images. If you'll modify your answer to mention this, and just include the add_attachment action (but change 'Untitled' to an empty string ''), I'll accept it. Thanks! |
|
Dec 12 |
suggested | suggested edit on Filter to modify post_title after image upload? |
|
Dec 4 |
comment |
Filter to modify post_title after image upload? Thanks, but when I add the filter for image_send_to_editor, the function doesn't seem to be called at all. I can't find official documentation for image_send_to_editor but it sounds like it's related to editing images. What action on the blog triggers it? What I think I'm looking for is something that modifies the image's "post_title" attribute when it's displayed to the user on a blog page - right? |
|
Dec 3 |
comment |
Filter to modify post_title after image upload? Thanks, but when I display the blog page with the images on it, the display_untitled function doesn't seem to be called at all for the images, just for the post itself. If I print the return from get_post_type($id) at the top of the function, it always prints "post". Shouldn't it be called for each image somewhere, or am I missing something? |
|
Dec 3 |
awarded | Student |
|
Dec 3 |
comment |
Filter to modify post_title after image upload? I think you're really close with this answer. The "add_attachment" function works great, and sets the newly-uploaded image file to have a post_title of "Untitled". However, the second function only gets called for posts, and not for media files. I added a call to error_log() to display the output of get_post_type($id) when the blog is displayed, and it always displays "post", so the media file is never processed. Any other ideas? Thanks! |
|
Oct 22 |
revised |
Filter to modify post_title after image upload? added 125 characters in body |
|
Oct 22 |
awarded | Editor |
|
Oct 22 |
comment |
Filter to modify post_title after image upload? Thanks - I saw that actually, but I don't really want to remove the title attribute completely, I just don't want it to be set to the image filename. If the user chooses to set the title to something, I don't want to remove it. |
|
Oct 22 |
revised |
Filter to modify post_title after image upload? added 321 characters in body |
|
Oct 22 |
asked | Filter to modify post_title after image upload? |