Recent Posts Widget: Use `ob_end_flush()` instead of `ob_flush()`.

`ob_end_flush()` flushes the output buffer *and* turns output buffering off, same as `ob_get_flush()`.

props m_i_n.
see #28009 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@28217 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-04-25 14:20:05 +00:00
parent 0f759f0c01
commit 5d8f69e0c5
2 changed files with 27 additions and 0 deletions

View File

@ -113,6 +113,10 @@
return false;
}
if (this.get('imageWidth') <= this.get('themeWidth')) {
return false;
}
return true;
}
});

View File

@ -103,6 +103,29 @@ jQuery( function() {
imageWidth: 10000,
imageHeight: 8600
});
equal(this.model.shouldBeCropped(), false);
});
test('should not be cropped when the image width is smaller or equal as theme width', function() {
this.model.set({
themeFlexWidth: false,
themeFlexHeight: false,
imageWidth: 1000,
imageHeight: 100
});
equal(this.model.shouldBeCropped(), false);
});
test('should not be cropped when the image width is smaller or equal as theme width, theme supports flex height and width', function() {
this.model.set({
themeFlexWidth: true,
themeFlexHeight: true,
imageWidth: 900,
imageHeight: 100
});
equal(this.model.shouldBeCropped(), false);
});
});