Skip to content

Commit

Permalink
Merge 73dfd1d into 8eac0c0
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Apr 29, 2020
2 parents 8eac0c0 + 73dfd1d commit 0bb11c2
Show file tree
Hide file tree
Showing 15 changed files with 1,335 additions and 1,136 deletions.
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = function( grunt ) {
'!code_of_conduct.md',
'!contributing/**',
'!contributing.md',
'!data/**',
'!docker-compose.yml',
'!unsplash.zip',
'!Gruntfile.js',
Expand All @@ -34,6 +35,7 @@ module.exports = function( grunt ) {
'!phpunit.xml',
'!readme.md',
'!renovate.json',
'!scripts/**',
'!tests/**',
'!vendor/**',
'!webpack.config.js',
Expand Down
2 changes: 1 addition & 1 deletion assets/src/media-selector/models/images_query_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ImagesQueryModel = wp.media.model.Query.extend(
options.context = this;
options.type = 'GET';
options.url = !! args.s
? addQueryArgs( `${ route }/search`, { search: args.s } )
? addQueryArgs( `${ route }`, { search: args.s } )
: route;
options.data = {
page: args.paged,
Expand Down
9 changes: 7 additions & 2 deletions assets/src/media-selector/views/image_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ const ImageView = wp.media.view.Attachment.extend( {
this.views.detach();

this.$el.html( this.template( options ) );

const img = this.$el.find( '.centered img' );
if ( 1 === img.length ) {
if (
1 === img.length &&
options.size &&
options.size.width &&
options.size.height &&
options.color
) {
img[ 0 ].width = options.size.width;
img[ 0 ].height = options.size.height;
img[ 0 ].style.backgroundColor = options.color;
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"require": {
"ext-json": "*",
"ext-openssl": "*",
"php": ">=5.6.20",
"unsplash/unsplash": "^2.5"
"php": ">=5.6.20"
},
"require-dev": {
"automattic/vipwpcs": "^2.0",
Expand Down
Loading

0 comments on commit 0bb11c2

Please sign in to comment.