ewww_added_new_image( $id, $meta ); return false; } /** * Runs failure routine for an item from the queue. * * @access protected * * @param array $item The id of the attachment, how many attempts have been made to process * the item and whether it is a new upload. */ protected function failure( $item ) { if ( empty( $item['id'] ) ) { return; } if ( ! class_exists( 'nggMeta' ) ) { if ( defined( 'NGGALLERY_ABSPATH' ) && ewwwio_is_file( NGGALLERY_ABSPATH . 'lib/meta.php' ) ) { require_once NGGALLERY_ABSPATH . '/lib/meta.php'; } else { return; } } // Retrieve the metadata for the image. $meta = new nggMeta( $item['id'] ); if ( ! empty( $meta ) && isset( $meta->image->imagePath ) ) { ewww_image_optimizer_add_file_exclusion( $meta->image->imagePath ); } } }