WordPress.org

Ready to get started?Download WordPress

Forums

attachment_fields_to_save and ALT-text for image (1 post)

  1. andrewsalko
    Member
    Posted 1 year ago #

    Try to automatically add "ALT" text to images, using filter attachment_fields_to_save, looks like:

    function filter_addAltText($post, $attachment)
    {
    $attachment['image_alt']='My special image ALT text!';
    return $post;
    }

    But no effect. Any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Topic