mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 09:29:48 +01:00
Add jquery.masonry.min.js. fixes #25351.
git-svn-id: https://develop.svn.wordpress.org/trunk@27389 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
83ee32a35c
commit
1329d5ebc0
@ -55,6 +55,7 @@ module.exports = function(grunt) {
|
||||
// Ignore unminified versions of external libs we don't ship:
|
||||
'!wp-includes/js/backbone.js',
|
||||
'!wp-includes/js/underscore.js',
|
||||
'!wp-includes/js/jquery/jquery.masonry.js',
|
||||
'!wp-includes/version.php' // Exclude version.php
|
||||
],
|
||||
dest: BUILD_DIR
|
||||
|
11
src/wp-includes/js/jquery/jquery.masonry.min.js
vendored
Normal file
11
src/wp-includes/js/jquery/jquery.masonry.min.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/*!
|
||||
* Masonry v2 shim
|
||||
* to maintain backwards compatibility
|
||||
* as of Masonry v3.1.2
|
||||
*
|
||||
* Cascading grid layout library
|
||||
* http://masonry.desandro.com
|
||||
* MIT License
|
||||
* by David DeSandro
|
||||
*/
|
||||
!function(a){var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?b.prototype.options.transitionDuration:0),void 0===a||a){var c=this.options.animationOptions,d=c&&c.duration;d&&(this.options.transitionDuration="string"==typeof d?d:d+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){this._remapV2Options(),c.apply(this,arguments)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),f.apply(this,arguments)}}(window);
|
@ -201,7 +201,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
// Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
|
||||
// It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
|
||||
$scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array(), '3.1.2', 1 );
|
||||
$scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$suffix.js", array( 'jquery', 'masonry' ), '3.1.2', 1 );
|
||||
$scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2', 1 );
|
||||
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user