Skip to content

Commit 6f5dc76

Browse files
committed
Merge branch 'exclusions-query-block-fixes' into dev
2 parents 6df0831 + aeff5e6 commit 6f5dc76

File tree

37 files changed

+1565
-463
lines changed

37 files changed

+1565
-463
lines changed

assets/js/wppic-script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jQuery(document).ready(function($) {
5454
'image': $this.data('image'),
5555
'expiration': $this.data('expiration'),
5656
'layout': $this.data('layout'),
57+
'itemSlugs': $this.data('slugs'),
5758
};
5859
$.post(wppicAjax.ajaxurl, data, function(response) {
5960
$this.append(response);

assets/js/wppic-script.min.js

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,67 @@
33
* Plugin URI: http://b-website.com/
44
* Author: Brice CAPOBIANCO - b*web
55
*/
6-
jQuery(document).ready(function(e){e(".wp-pic > div").fadeIn(600);e(".wp-pic").delegate(".wp-pic-flip","mouseover",function(){e(".wp-pic-flip").each(function(){var t;var n=e(this);n.on("mouseenter",function(){clearTimeout(t)}).on("mouseleave",function(){t=setTimeout(function(){n.removeClass("wp-pic-flipped")},2e3)})})});e(".wp-pic").on("click",".wp-pic-download",function(){e(this).closest(".wp-pic-flip").addClass("wp-pic-flipped");return true});e(".wp-pic").on("click",".wp-pic-goback",function(){e(this).closest(".wp-pic-flip").removeClass("wp-pic-flipped");return true});e(".wp-pic").on("click",".wp-pic-dl-ico, .wp-pic-dl-link",function(){e(this).closest(".wp-pic-back").find(".wp-pic-dl-ico").addClass("wp-pic-dl-effet");setTimeout(function(){e(".wp-pic-dl-ico.wp-pic-dl-effet").removeClass("wp-pic-dl-effet")},1200);return true});if(e(".wp-pic.wp-pic-ajax").length>0){e(".wp-pic.wp-pic-ajax").each(function(){var t=e(this);var n={action:"async_wppic_shortcode_content",type:t.data("type"),slug:t.data("slug"),image:t.data("image"),expiration:t.data("expiration"),layout:t.data("layout")};e.post(wppicAjax.ajaxurl,n,function(e){t.append(e);t.find("div").fadeIn(600,function(){t.find(".wp-pic-body-loading").remove()})})})}})
6+
jQuery(document).ready(function($) {
7+
8+
// fadeIn on page load
9+
$('.wp-pic > div').fadeIn(600);
10+
11+
$('.wp-pic').delegate('.wp-pic-flip', 'mouseover', function() {
12+
$('.wp-pic-flip').each(function(){
13+
var timeoutFlip;
14+
var $this = $(this);
15+
$this.on('mouseenter', function() {
16+
clearTimeout(timeoutFlip);
17+
}).on('mouseleave', function() {
18+
timeoutFlip = setTimeout( function () {
19+
$this.removeClass('wp-pic-flipped');
20+
}, 2000);
21+
});
22+
});
23+
});
24+
25+
$('.wp-pic').on('click','.wp-pic-download', function(){
26+
$(this).closest('.wp-pic-flip').addClass('wp-pic-flipped');
27+
return true;
28+
});
29+
30+
$('.wp-pic').on('click','.wp-pic-goback', function(){
31+
$(this).closest('.wp-pic-flip').removeClass('wp-pic-flipped');
32+
return true;
33+
});
34+
35+
$('.wp-pic').on('click','.wp-pic-dl-ico, .wp-pic-dl-link', function(){
36+
$(this).closest('.wp-pic-back').find('.wp-pic-dl-ico').addClass('wp-pic-dl-effet');
37+
setTimeout( function () {
38+
$('.wp-pic-dl-ico.wp-pic-dl-effet').removeClass('wp-pic-dl-effet');
39+
}, 1200);
40+
return true;
41+
});
42+
43+
44+
//Card ajax load
45+
if ($('.wp-pic.wp-pic-ajax').length > 0){
46+
47+
//ajax request and callback
48+
$('.wp-pic.wp-pic-ajax').each(function(){
49+
var $this = $(this);
50+
var data = {
51+
'action': 'async_wppic_shortcode_content',
52+
'type': $this.data('type'),
53+
'slug': $this.data('slug'),
54+
'image': $this.data('image'),
55+
'expiration': $this.data('expiration'),
56+
'layout': $this.data('layout'),
57+
'itemSlugs': $this.data('slugs'),
58+
};
59+
$.post(wppicAjax.ajaxurl, data, function(response) {
60+
$this.append(response);
61+
$this.find('div').fadeIn(600, function() {
62+
$this.find('.wp-pic-body-loading').remove();
63+
});
64+
});
65+
});
66+
67+
}
68+
69+
});

build/blocks/PluginInfoCard/block.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
},
9494
"cols": {
9595
"type": "number",
96-
"default": 1
96+
"default": 2
9797
},
9898
"colGap": {
9999
"type": "number",
@@ -106,6 +106,10 @@
106106
"uniqueId": {
107107
"type": "string",
108108
"default": ""
109+
},
110+
"itemSlugs": {
111+
"type": "object",
112+
"default": {}
109113
}
110114
},
111115
"example": {

build/blocks/PluginInfoCardQuery/block.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
"type": "array",
2121
"default": []
2222
},
23+
"uniqueId": {
24+
"type": "string",
25+
"default": ""
26+
},
2327
"search": {
2428
"type": "string",
2529
"default": ""
@@ -45,9 +49,17 @@
4549
"default": "8"
4650
},
4751
"cols": {
48-
"type": "number",
52+
"type": "string",
4953
"default": 2
5054
},
55+
"colGap": {
56+
"type": "number",
57+
"default": 20
58+
},
59+
"rowGap": {
60+
"type": "number",
61+
"default": 20
62+
},
5163
"type": {
5264
"type": "string",
5365
"default": "plugin"
@@ -123,6 +135,10 @@
123135
"sort": {
124136
"type": "string",
125137
"default": "ASC"
138+
},
139+
"itemSlugs": {
140+
"type": "object",
141+
"default": {}
126142
}
127143
},
128144
"example": {

build/blocks/PluginScreenshotsInfoCard/block.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@
151151
"colorMetaText": {
152152
"type": "string",
153153
"default": "#FFFFFF"
154+
},
155+
"skipAnimatedGifs": {
156+
"type": "boolean",
157+
"default": false
154158
}
155159
},
156160
"example": {

build/blocks/SitePluginsCardGrid/block.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
"rowGap": {
6969
"type": "number",
7070
"default": 20
71+
},
72+
"itemSlugs": {
73+
"type": "object",
74+
"default": {}
7175
}
7276
},
7377
"example": {

build/wppic-blocks.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1584fb2891cfb26e5c95');
1+
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => '95da3e21258631c47f9d');

build/wppic-blocks.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wppic-admin.css

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/wppic-editor.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)