Make WordPress Core

Changeset 28217


Ignore:
Timestamp:
04/25/2014 02:20:05 PM (11 years ago)
Author:
ocean90
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/customize-models.js

    r28152 r28217  
    114114            }
    115115
     116            if (this.get('imageWidth') <= this.get('themeWidth')) {
     117                return false;
     118            }
     119
    116120            return true;
    117121        }
  • trunk/tests/qunit/wp-admin/js/customize-header.js

    r27847 r28217  
    104104            imageHeight: 8600
    105105        });
     106
     107        equal(this.model.shouldBeCropped(), false);
     108    });
     109
     110    test('should not be cropped when the image width is smaller or equal as theme width', function() {
     111        this.model.set({
     112            themeFlexWidth: false,
     113            themeFlexHeight: false,
     114            imageWidth: 1000,
     115            imageHeight: 100
     116        });
     117
     118        equal(this.model.shouldBeCropped(), false);
     119    });
     120
     121    test('should not be cropped when the image width is smaller or equal as theme width, theme supports flex height and width', function() {
     122        this.model.set({
     123            themeFlexWidth: true,
     124            themeFlexHeight: true,
     125            imageWidth: 900,
     126            imageHeight: 100
     127        });
     128
    106129        equal(this.model.shouldBeCropped(), false);
    107130    });
Note: See TracChangeset for help on using the changeset viewer.