The MU forums have moved to

Custom image header API and the cropped images.. (4 posts)

  1. recoilfx
    Posted 16 years ago #


    I've used the custom image header api on the kubrick theme, but I have noticed that is the old cropped images are not deleted. They just keep piling up at the folders in blogs.dir as users change their banners.

    The cropped images do not show up the uploads section either, so the users have no way of managing these cropped pictures.

    What to do?
    Thanks in advanced.

  2. recoilfx
    Posted 16 years ago #

    Okay, found a bug in the custom image header api, basically it didn't register the picture in the database.. fixed it.

    commented out custom-header.php, line 285, added these code at around 293.

    $object = array(
    'post_title' => basename($header),
    'post_content' => $url,
    'post_mime_type' => 'import','guid' => $url);

    // Save the data
    $id = wp_insert_attachment($object, $header);

    $header = apply_filters('wp_create_file_in_uploads', $header, $id); //Fixed

  3. drmiketemp
    Posted 16 years ago # please to report it.

    I wouldn't mention wpmu when you do so.

  4. moose123
    Posted 16 years ago #

    Recoilfx, thanks for this fix...working great now. Mine was displaying the *first* customer header image but not any subsequent ones, even though new ones would upload into the K2 custom image header tool and I could crop and save them.

    Thanks again!

About this Topic

  • Started 16 years ago by recoilfx
  • Latest reply from moose123