Support » Plugins and Hacks » Image attribute "title" being stripped from posts.

  • Anyone know why wp_update_post() would strip title=”” image attribute from posts?

    I have a cron script that updates $my_post[‘post_date’] & $my_post[‘post_date_gmt’]

    And for some reason the wp_updat_post() strips the title img attribute from my posts.

    Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve tested it through and through. I’ve narrowed it down to the following fucntion. When I comment that fucntion out, the title attribute isn’t stripped. Here’s the code that I can comment out and avoid said issue.

    $my_post = array();
      $my_post['ID'] = $post_id_to_update;
      $my_post['post_date'] = $tdate;
      $my_post['post_date_gmt'] = $tgmdate;
    wp_update_post( $my_post );

    And when I say “stripped” the entire attribute is removed. For example…

    Before function…

    <img src="http://domain.com/image.jpg" alt="alt message about image" title="image title" width="461" height="450" class="alignnone size-full wp-image-4383" />

    After function…

    <img src="http://domain.com/image.jpg" alt="alt message about image" width="461" height="450" class="alignnone size-full wp-image-4383" />

    I find similar thing on my site. The title attribute gets stripped from images.

    http://indiapoint.net/fb/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image attribute "title" being stripped from posts.’ is closed to new replies.