Shortcodes by Angie Makes - Version 1.17

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Shortcodes by Angie Makes
Version 1.17
Comparing to
See all releases

Code changes from version 1.16 to 1.17

README.md CHANGED
@@ -1,21 +1,41 @@
1
- # WordPress Canvas Shortcodes #
2
 
3
  **Contributors:** cbaldelomar
4
  **Donate link:** http://webplantmedia.com/pay-now/
5
- **Tags:** shortcode, shortcodes
6
  **Requires at least:** 3.7
7
- **Tested up to:** 3.7.1
8
  **Stable tag:** trunk
9
  **License:** GPLv2 or later
10
  **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- A family of shortcodes to enhance site functionality.
13
 
14
  ## Description ##
15
 
16
- Enhance Pages with the following features. Accordion, Tabs, Toggle, Columns, Testimonials, Borders, Buttons, Full Width, Notifications, Google Maps, Social Icons, Progress Bars, Pricing, Highlights, Custom HTML, Code.
17
-
18
- See the shortcodes in action at [WordPress Canvas Shortcodes](http://wordpresscanvas.com/features/shortcodes/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ### Professional Support
21
 
@@ -27,7 +47,7 @@ If you're a theme author, plugin author, or just a code hobbyist, you can follow
27
 
28
  ### Donations
29
 
30
- Yes, I do accept donations. If you want to buy me a sandwich or whatever, you can do so from my [payment page](http://webplantmedia.com/pay-now/). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
31
 
32
  ## Installation ##
33
 
@@ -44,6 +64,10 @@ Use the shortcode manager in the TinyMCE text editor
44
 
45
  ## Changelog ##
46
 
 
 
 
 
47
  ### Version 1.16
48
 
49
  * updated youtube icon
@@ -117,4 +141,3 @@ Use the shortcode manager in the TinyMCE text editor
117
  ### Version 1.1
118
 
119
  * Plugin released. Everything is new!
120
-
1
+ # WordPress Canvas - Shortcodes #
2
 
3
  **Contributors:** cbaldelomar
4
  **Donate link:** http://webplantmedia.com/pay-now/
5
+ **Tags:** shortcode, shortcodes, accordion, accordions, tab, tabs, toggle, columns, column, section, sections, testimonials, border, borders, button, buttons, fullwidth, full width, notification, notifications, google maps, maps, googlemaps, social icons, progress bar, pricing, pricing box, highlights, countdown, rsvp, custom html, code, code snippets, snippets, isotope, masonry, posts, post_type
6
  **Requires at least:** 3.7
7
+ **Tested up to:** 3.8.1
8
  **Stable tag:** trunk
9
  **License:** GPLv2 or later
10
  **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ A family of shortcodes to enhance your site functionality.
13
 
14
  ## Description ##
15
 
16
+ Enhance your pages and posts with the following features.
17
+
18
+ * Accordion
19
+ * Tabs
20
+ * Toggle
21
+ * Columns & Sections
22
+ * Testimonials
23
+ * Borders
24
+ * Buttons
25
+ * Full Width
26
+ * Notifications
27
+ * Google Maps
28
+ * Social Icons
29
+ * Progress Bars
30
+ * Pricing
31
+ * Highlights
32
+ * Countdown
33
+ * RSVP
34
+ * Custom HTML
35
+ * Code Snippets
36
+ * Isotope / Masonry Posts
37
+
38
+ [Live Demo & Documentation](http://wordpresscanvas.com/features/shortcodes/)
39
 
40
  ### Professional Support
41
 
47
 
48
  ### Donations
49
 
50
+ Thank you so much for even considering supporting my work. If you have benefited from my WordPress plugins, or are appreciative of my customer support, and feel led to send me a monetary donation, please follow the link [here](http://webplantmedia.com/donate/). I am truly thankful for your hard earned giving.
51
 
52
  ## Installation ##
53
 
64
 
65
  ## Changelog ##
66
 
67
+ ### Version 1.17
68
+
69
+ * Added ability to showcase posts of any post type in an isotope / masonry layout.
70
+
71
  ### Version 1.16
72
 
73
  * updated youtube icon
141
  ### Version 1.1
142
 
143
  * Plugin released. Everything is new!
 
includes/css/style.css CHANGED
@@ -1092,3 +1092,192 @@ pre.pre-wrap {
1092
  padding-bottom: 5px;
1093
  display: none;
1094
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1092
  padding-bottom: 5px;
1093
  display: none;
1094
  }
1095
+
1096
+
1097
+ /**
1098
+ * [wc_post]
1099
+ * ----------------------------------------------------------------------------
1100
+ */
1101
+ .wc-shortcodes-post-content {
1102
+ padding: 0 20px;
1103
+ }
1104
+ .wc-shortcodes-post-border {
1105
+ border: 1px solid #dddddd;
1106
+ }
1107
+ .wc-shortcodes-entry-thumbnail {
1108
+ margin: 0;
1109
+ text-align: center;
1110
+ }
1111
+ .wc-shortcodes-entry-title {
1112
+ margin-top: 20px;
1113
+ margin-bottom: 20px;
1114
+ }
1115
+ .wc-shortcodes-entry-meta {
1116
+ margin-top: 20px;
1117
+ margin-bottom: 0;
1118
+ }
1119
+ .wc-shortcodes-entry-meta-inner {
1120
+ margin-bottom: 20px;
1121
+ }
1122
+ .wc-shortcodes-entry-summary {
1123
+ margin-top: 20px;
1124
+ margin-bottom: 0;
1125
+ }
1126
+ .wc-shortcodes-entry-quote blockquote {
1127
+ margin-top: 0;
1128
+ padding: 10px 20px;
1129
+ }
1130
+ .wc-shortcodes-footer-entry-meta {
1131
+ margin-top: 20px;
1132
+ margin-bottom: 0;
1133
+ font-size: 80%;
1134
+ }
1135
+ .wc-shortcodes-posts {
1136
+ position: relative;
1137
+ }
1138
+ .wc-shortcodes-post-box {
1139
+ background-color: #ffffff;
1140
+ margin-bottom: 20px;
1141
+ }
1142
+ .wc-shortcodes-sep {
1143
+ padding-left: 5px;
1144
+ padding-right: 5px;
1145
+ }
1146
+ .wc-shortcodes-sep,
1147
+ .wc-shortcodes-author,
1148
+ .wc-shortcodes-date {
1149
+ float: left;
1150
+ }
1151
+ /* Comment Box */
1152
+ .wc-shortcodes-comments-link {
1153
+ float: right;
1154
+ }
1155
+ .wc-shortcodes-comments-link a {
1156
+ position: relative;
1157
+ margin-left: 3px;
1158
+ padding: 2px 7px;
1159
+ background-color: #eeeeee;
1160
+ color: #999999;
1161
+ line-height: 1;
1162
+ }
1163
+
1164
+ .wc-shortcodes-comments-link a:after {
1165
+ content: "";
1166
+ position: absolute;
1167
+ left: 40%;
1168
+ bottom: -8px;
1169
+ width: 0px;
1170
+ height: 0px;
1171
+ border-bottom: 8px solid rgba(255,255,255,0);
1172
+ border-left: 8px solid #eeeeee;
1173
+ font-size: 0px;
1174
+ line-height: 0px;
1175
+ }
1176
+ .wc-shortcodes-comments-link a,
1177
+ .wc-shortcodes-comments-link a:hover,
1178
+ .wc-shortcodes-comments-link a:visited,
1179
+ .wc-shortcodes-comments-link a:active,
1180
+ .wc-shortcodes-comments-link a:focus {
1181
+ color: #999999;
1182
+ text-decoration: none;
1183
+ }
1184
+
1185
+ /* Isotopes */
1186
+ .wc-shortcodes-posts,
1187
+ .wc-shortcodes-posts .wc-shortcodes-post-box {
1188
+ -webkit-transition-duration: 0.8s;
1189
+ -moz-transition-duration: 0.8s;
1190
+ -ms-transition-duration: 0.8s;
1191
+ -o-transition-duration: 0.8s;
1192
+ transition-duration: 0.8s;
1193
+ }
1194
+ .isotope-item {
1195
+ z-index: 2;
1196
+ }
1197
+
1198
+ .isotope-hidden.isotope-item {
1199
+ pointer-events: none;
1200
+ z-index: 1;
1201
+ }
1202
+
1203
+ .wc-shortcodes-posts {
1204
+ -webkit-transition-property: height, width;
1205
+ -moz-transition-property: height, width;
1206
+ -ms-transition-property: height, width;
1207
+ -o-transition-property: height, width;
1208
+ transition-property: height, width;
1209
+ }
1210
+
1211
+ .wc-shortcodes-posts .wc-shortcodes-post-box {
1212
+ -webkit-transition-property: -webkit-transform, opacity;
1213
+ -moz-transition-property: -moz-transform, opacity;
1214
+ -ms-transition-property: -ms-transform, opacity;
1215
+ -o-transition-property: -o-transform, opacity;
1216
+ transition-property: transform, opacity;
1217
+ }
1218
+
1219
+ /* isotope filtering */
1220
+ .wc-shortcodes-filtering {
1221
+ margin-bottom: 20px;
1222
+ }
1223
+ .wc-shortcodes-filtering .tag-divider {
1224
+ display: inline-block;
1225
+ padding: 0 7px;
1226
+ }
1227
+
1228
+ /* Post Gallery Slider */
1229
+ .rslides-wrapper {
1230
+ position: relative;
1231
+ background-color: #000000;
1232
+ }
1233
+ .rslides {
1234
+ position: relative;
1235
+ list-style: none;
1236
+ overflow: hidden;
1237
+ width: 100%;
1238
+ padding: 0;
1239
+ margin: 0;
1240
+ }
1241
+
1242
+ .rslides li {
1243
+ -webkit-backface-visibility: hidden;
1244
+ position: absolute;
1245
+ display: none;
1246
+ width: 100%;
1247
+ left: 0;
1248
+ top: 0;
1249
+ text-align: center;
1250
+ }
1251
+
1252
+ .rslides li:first-child {
1253
+ position: relative;
1254
+ display: block;
1255
+ float: left;
1256
+ }
1257
+
1258
+ .rslides img {
1259
+ display: inline-block;
1260
+ height: auto;
1261
+ /* float: left; */
1262
+ /* width: 100%; */
1263
+ border: 0;
1264
+ }
1265
+ .rslides_nav {
1266
+ position: absolute;
1267
+ top: 50%;
1268
+ margin-top: -18px;
1269
+ width: 36px;
1270
+ height:36px;
1271
+ background-repeat: no-repeat;
1272
+ background-position: center center;
1273
+ background-color: rgba(0,0,0,.2);
1274
+ z-index: 2;
1275
+ }
1276
+ .rslides_nav.prev {
1277
+ left: 0;
1278
+ background-image: url("../img/slide-arrow-left.png");
1279
+ }
1280
+ .rslides_nav.next {
1281
+ right: 0;
1282
+ background-image: url("../img/slide-arrow-right.png");
1283
+ }
includes/functions.php CHANGED
@@ -128,3 +128,41 @@ function wc_shortcodes_send_rsvp_email() {
128
  add_action( 'wp_ajax_nopriv_wc-send-rsvp-email', 'wc_shortcodes_send_rsvp_email' );
129
  // send email when logged in
130
  add_action( 'wp_ajax_wc-send-rsvp-email', 'wc_shortcodes_send_rsvp_email' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  add_action( 'wp_ajax_nopriv_wc-send-rsvp-email', 'wc_shortcodes_send_rsvp_email' );
129
  // send email when logged in
130
  add_action( 'wp_ajax_wc-send-rsvp-email', 'wc_shortcodes_send_rsvp_email' );
131
+
132
+ if ( ! function_exists( 'wc_shortcodes_display_term_classes' ) ) {
133
+ function wc_shortcodes_display_term_classes( $taxonomy ) {
134
+ global $post;
135
+
136
+ $classes = array();
137
+
138
+ if ( is_object_in_taxonomy( $post->post_type, $taxonomy ) ) {
139
+ foreach ( (array) wp_get_post_terms( $post->ID, $taxonomy ) as $term ) {
140
+ if ( empty( $term->slug ) )
141
+ continue;
142
+ $classes[] = 'wc-shortcodes-filter-' . sanitize_html_class($term->slug, $term->term_id);
143
+ }
144
+ }
145
+
146
+ return $classes;
147
+ }
148
+ }
149
+
150
+ if ( ! function_exists( 'wc_shortcodes_comma_delim_to_array' ) ) {
151
+ function wc_shortcodes_comma_delim_to_array( $string ) {
152
+ $a = explode( ',', $string );
153
+
154
+ foreach ( $a as $key => $value ) {
155
+ $value = trim( $value );
156
+
157
+ if ( empty( $value ) )
158
+ unset( $a[ $key ] );
159
+ else
160
+ $a[ $key ] = $value;
161
+ }
162
+
163
+ if ( empty( $a ) )
164
+ return '';
165
+ else
166
+ return $a;
167
+ }
168
+ }
includes/img/slide-arrow-left.png ADDED
Binary file
includes/img/slide-arrow-right.png ADDED
Binary file
includes/js/admin.js CHANGED
@@ -120,7 +120,7 @@
120
 
121
  if ( 'undefined' === typeof element.sizes ) {
122
  preview_img = element.url;
123
- preview_html = "";
124
  }
125
  else if ( ( 'string' === typeof options.imgsize ) && ( 'object' === typeof element.sizes[ options.imgsize ] ) ) {
126
  preview_img = element.sizes[ options.imgsize ].url;
120
 
121
  if ( 'undefined' === typeof element.sizes ) {
122
  preview_img = element.url;
123
+ preview_html += "<img src='"+preview_img+"' />";
124
  }
125
  else if ( ( 'string' === typeof options.imgsize ) && ( 'object' === typeof element.sizes[ options.imgsize ] ) ) {
126
  preview_img = element.sizes[ options.imgsize ].url;
includes/js/jquery.isotope.min.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Isotope v1.5.25
3
+ * An exquisite jQuery plugin for magical layouts
4
+ * http://isotope.metafizzy.co
5
+ *
6
+ * Commercial use requires one-time purchase of a commercial license
7
+ * http://isotope.metafizzy.co/docs/license.html
8
+ *
9
+ * Non-commercial use is licensed under the MIT License
10
+ *
11
+ * Copyright 2013 Metafizzy
12
+ */
13
+ (function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&w.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return c=c.filter(function(a,b){return b.nodeType===1}),this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b=Math.round(b+this.offset.left),c=Math.round(c+this.offset.top);var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(l)return;var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a,n);l=!0};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0],s=p&&p.$el,t;while(!s||!s.length){t=this.styleQueue[o++];if(!t)return;s=t.$el}var u=parseFloat(getComputedStyle(s[0])[r]);u>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);
includes/js/posts.js ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+ "use strict";
3
+
4
+ // Modified Isotope methods for gutters in masonry
5
+ $.Isotope.prototype._getMasonryGutterColumns = function() {
6
+ var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
7
+ var containerWidth = this.element.width();
8
+
9
+ this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||
10
+ // Or use the size of the first item
11
+ this.$filteredAtoms.outerWidth(true) ||
12
+ // If there's no items, use size of container
13
+ containerWidth;
14
+
15
+ this.masonry.columnWidth += gutter;
16
+
17
+ this.masonry.cols = Math.floor((containerWidth + gutter) / this.masonry.columnWidth);
18
+ this.masonry.cols = Math.max(this.masonry.cols, 1);
19
+ };
20
+
21
+ $.Isotope.prototype._masonryReset = function() {
22
+ // Layout-specific props
23
+ this.masonry = {};
24
+ // FIXME shouldn't have to call this again
25
+ this._getMasonryGutterColumns();
26
+ var i = this.masonry.cols;
27
+ this.masonry.colYs = [];
28
+ while (i--) {
29
+ this.masonry.colYs.push(0);
30
+ }
31
+ };
32
+
33
+ $.Isotope.prototype._masonryResizeChanged = function() {
34
+ var prevSegments = this.masonry.cols;
35
+ // Update cols/rows
36
+ this._getMasonryGutterColumns();
37
+ // Return if updated cols/rows is not equal to previous
38
+ return (this.masonry.cols !== prevSegments);
39
+ };
40
+
41
+ $(document).ready(function(){
42
+ var $container = $('.wc-shortcodes-posts');
43
+ var columnWidth = 0;
44
+ var gutterWidth = 0;
45
+
46
+ var calculateGrid = function() {
47
+ var columns = parseInt( $container.data('columns') );
48
+ var gutterSpace = $container.data('gutterSpace');
49
+ var containerWidth = $container.width();
50
+ var marginBottom = 0;
51
+
52
+ if ( isNaN( gutterSpace ) ) {
53
+ gutterSpace = .020;
54
+ }
55
+ else if ( gutterSpace > 0.05 || gutterSpace < 0 ) {
56
+ gutterSpace = .020;
57
+ }
58
+
59
+ if ( containerWidth < 568 ) { columns = 1; }
60
+ else if ( containerWidth < 768 ) { columns -= 2; }
61
+ else if ( containerWidth < 991 ) { columns -= 1; }
62
+
63
+ if ( columns < 1 ) {
64
+ columns = 1;
65
+ }
66
+
67
+ gutterWidth = Math.floor( containerWidth * gutterSpace );
68
+
69
+ var allGutters = gutterWidth * ( columns - 1 );
70
+ var contentWidth = containerWidth - allGutters;
71
+
72
+ columnWidth = Math.floor( contentWidth / columns );
73
+
74
+ marginBottom = gutterWidth;
75
+ if ( 1 == columns ) {
76
+ marginBottom = 20;
77
+ }
78
+ $container.children('.wc-shortcodes-post-box').css({'width':columnWidth+'px', 'marginBottom':marginBottom+'px'});
79
+ }
80
+
81
+ calculateGrid();
82
+
83
+
84
+ $container.isotope({
85
+ itemSelector : '.wc-shortcodes-post-box',
86
+ resizable: false,
87
+ masonry: {
88
+ columnWidth: columnWidth,
89
+ gutterWidth: gutterWidth
90
+ }
91
+ });
92
+ $(window).smartresize(function(){
93
+ calculateGrid();
94
+ $container.isotope({
95
+ masonry: {
96
+ columnWidth: columnWidth,
97
+ gutterWidth: gutterWidth
98
+ }
99
+ });
100
+ });
101
+
102
+ var $term = $('.wc-shortcodes-filtering .wc-shortcodes-term');
103
+ $term.click( function( event ) {
104
+ event.preventDefault();
105
+
106
+ $term.removeClass('wc-shortcodes-term-active');
107
+ $(this).addClass('wc-shortcodes-term-active');
108
+
109
+ var selector = $(this).attr('data-filter');
110
+ $container.isotope({
111
+ filter: selector,
112
+ masonry: {
113
+ columnWidth: columnWidth,
114
+ gutterWidth: gutterWidth
115
+ }
116
+ });
117
+ return false;
118
+ });
119
+ });
120
+ } )( jQuery );
includes/js/responsiveslides.js ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! ResponsiveSlides.js v1.54
2
+ * http://responsiveslides.com
3
+ * http://viljamis.com
4
+ *
5
+ * Copyright (c) 2011-2012 @viljamis
6
+ * Available under the MIT license
7
+ */
8
+
9
+ /*jslint browser: true, sloppy: true, vars: true, plusplus: true, indent: 2 */
10
+
11
+ (function ($, window, i) {
12
+ $.fn.responsiveSlides = function (options) {
13
+
14
+ // Default settings
15
+ var settings = $.extend({
16
+ "auto": true, // Boolean: Animate automatically, true or false
17
+ "speed": 500, // Integer: Speed of the transition, in milliseconds
18
+ "timeout": 4000, // Integer: Time between slide transitions, in milliseconds
19
+ "pager": false, // Boolean: Show pager, true or false
20
+ "nav": false, // Boolean: Show navigation, true or false
21
+ "random": false, // Boolean: Randomize the order of the slides, true or false
22
+ "pause": false, // Boolean: Pause on hover, true or false
23
+ "pauseControls": true, // Boolean: Pause when hovering controls, true or false
24
+ "prevText": "Previous", // String: Text for the "previous" button
25
+ "nextText": "Next", // String: Text for the "next" button
26
+ "maxwidth": "", // Integer: Max-width of the slideshow, in pixels
27
+ "navContainer": "", // Selector: Where auto generated controls should be appended to, default is after the <ul>
28
+ "manualControls": "", // Selector: Declare custom pager navigation
29
+ "namespace": "rslides", // String: change the default namespace used
30
+ "before": $.noop, // Function: Before callback
31
+ "after": $.noop // Function: After callback
32
+ }, options);
33
+
34
+ return this.each(function () {
35
+
36
+ // Index for namespacing
37
+ i++;
38
+
39
+ var $this = $(this),
40
+
41
+ // Local variables
42
+ vendor,
43
+ selectTab,
44
+ startCycle,
45
+ restartCycle,
46
+ rotate,
47
+ $tabs,
48
+
49
+ // Helpers
50
+ index = 0,
51
+ $slide = $this.children(),
52
+ length = $slide.size(),
53
+ fadeTime = parseFloat(settings.speed),
54
+ waitTime = parseFloat(settings.timeout),
55
+ maxw = parseFloat(settings.maxwidth),
56
+
57
+ // Namespacing
58
+ namespace = settings.namespace,
59
+ namespaceIdx = namespace + i,
60
+
61
+ // Classes
62
+ navClass = namespace + "_nav " + namespaceIdx + "_nav",
63
+ activeClass = namespace + "_here",
64
+ visibleClass = namespaceIdx + "_on",
65
+ slideClassPrefix = namespaceIdx + "_s",
66
+
67
+ // Pager
68
+ $pager = $("<ul class='" + namespace + "_tabs " + namespaceIdx + "_tabs' />"),
69
+
70
+ // Styles for visible and hidden slides
71
+ visible = {"float": "left", "position": "relative", "opacity": 1, "zIndex": 2},
72
+ hidden = {"float": "none", "position": "absolute", "opacity": 0, "zIndex": 1},
73
+
74
+ // Detect transition support
75
+ supportsTransitions = (function () {
76
+ var docBody = document.body || document.documentElement;
77
+ var styles = docBody.style;
78
+ var prop = "transition";
79
+ if (typeof styles[prop] === "string") {
80
+ return true;
81
+ }
82
+ // Tests for vendor specific prop
83
+ vendor = ["Moz", "Webkit", "Khtml", "O", "ms"];
84
+ prop = prop.charAt(0).toUpperCase() + prop.substr(1);
85
+ var i;
86
+ for (i = 0; i < vendor.length; i++) {
87
+ if (typeof styles[vendor[i] + prop] === "string") {
88
+ return true;
89
+ }
90
+ }
91
+ return false;
92
+ })(),
93
+
94
+ // Fading animation
95
+ slideTo = function (idx) {
96
+ settings.before(idx);
97
+ // If CSS3 transitions are supported
98
+ if (supportsTransitions) {
99
+ $slide
100
+ .removeClass(visibleClass)
101
+ .css(hidden)
102
+ .eq(idx)
103
+ .addClass(visibleClass)
104
+ .css(visible);
105
+ index = idx;
106
+ setTimeout(function () {
107
+ settings.after(idx);
108
+ }, fadeTime);
109
+ // If not, use jQuery fallback
110
+ } else {
111
+ $slide
112
+ .stop()
113
+ .fadeOut(fadeTime, function () {
114
+ $(this)
115
+ .removeClass(visibleClass)
116
+ .css(hidden)
117
+ .css("opacity", 1);
118
+ })
119
+ .eq(idx)
120
+ .fadeIn(fadeTime, function () {
121
+ $(this)
122
+ .addClass(visibleClass)
123
+ .css(visible);
124
+ settings.after(idx);
125
+ index = idx;
126
+ });
127
+ }
128
+ };
129
+
130
+ // Random order
131
+ if (settings.random) {
132
+ $slide.sort(function () {
133
+ return (Math.round(Math.random()) - 0.5);
134
+ });
135
+ $this
136
+ .empty()
137
+ .append($slide);
138
+ }
139
+
140
+ // Add ID's to each slide
141
+ $slide.each(function (i) {
142
+ this.id = slideClassPrefix + i;
143
+ });
144
+
145
+ // Add max-width and classes
146
+ $this.addClass(namespace + " " + namespaceIdx);
147
+ if (options && options.maxwidth) {
148
+ $this.css("max-width", maxw);
149
+ }
150
+
151
+ // Hide all slides, then show first one
152
+ $slide
153
+ .hide()
154
+ .css(hidden)
155
+ .eq(0)
156
+ .addClass(visibleClass)
157
+ .css(visible)
158
+ .show();
159
+
160
+ // CSS transitions
161
+ if (supportsTransitions) {
162
+ $slide
163
+ .show()
164
+ .css({
165
+ // -ms prefix isn't needed as IE10 uses prefix free version
166
+ "-webkit-transition": "opacity " + fadeTime + "ms ease-in-out",
167
+ "-moz-transition": "opacity " + fadeTime + "ms ease-in-out",
168
+ "-o-transition": "opacity " + fadeTime + "ms ease-in-out",
169
+ "transition": "opacity " + fadeTime + "ms ease-in-out"
170
+ });
171
+ }
172
+
173
+ // Only run if there's more than one slide
174
+ if ($slide.size() > 1) {
175
+
176
+ // Make sure the timeout is at least 100ms longer than the fade
177
+ if (waitTime < fadeTime + 100) {
178
+ return;
179
+ }
180
+
181
+ // Pager
182
+ if (settings.pager && !settings.manualControls) {
183
+ var tabMarkup = [];
184
+ $slide.each(function (i) {
185
+ var n = i + 1;
186
+ tabMarkup +=
187
+ "<li>" +
188
+ "<a href='#' class='" + slideClassPrefix + n + "'>" + n + "</a>" +
189
+ "</li>";
190
+ });
191
+ $pager.append(tabMarkup);
192
+
193
+ // Inject pager
194
+ if (options.navContainer) {
195
+ $(settings.navContainer).append($pager);
196
+ } else {
197
+ $this.after($pager);
198
+ }
199
+ }
200
+
201
+ // Manual pager controls
202
+ if (settings.manualControls) {
203
+ $pager = $(settings.manualControls);
204
+ $pager.addClass(namespace + "_tabs " + namespaceIdx + "_tabs");
205
+ }
206
+
207
+ // Add pager slide class prefixes
208
+ if (settings.pager || settings.manualControls) {
209
+ $pager.find('li').each(function (i) {
210
+ $(this).addClass(slideClassPrefix + (i + 1));
211
+ });
212
+ }
213
+
214
+ // If we have a pager, we need to set up the selectTab function
215
+ if (settings.pager || settings.manualControls) {
216
+ $tabs = $pager.find('a');
217
+
218
+ // Select pager item
219
+ selectTab = function (idx) {
220
+ $tabs
221
+ .closest("li")
222
+ .removeClass(activeClass)
223
+ .eq(idx)
224
+ .addClass(activeClass);
225
+ };
226
+ }
227
+
228
+ // Auto cycle
229
+ if (settings.auto) {
230
+
231
+ startCycle = function () {
232
+ rotate = setInterval(function () {
233
+
234
+ // Clear the event queue
235
+ $slide.stop(true, true);
236
+
237
+ var idx = index + 1 < length ? index + 1 : 0;
238
+
239
+ // Remove active state and set new if pager is set
240
+ if (settings.pager || settings.manualControls) {
241
+ selectTab(idx);
242
+ }
243
+
244
+ slideTo(idx);
245
+ }, waitTime);
246
+ };
247
+
248
+ // Init cycle
249
+ startCycle();
250
+ }
251
+
252
+ // Restarting cycle
253
+ restartCycle = function () {
254
+ if (settings.auto) {
255
+ // Stop
256
+ clearInterval(rotate);
257
+ // Restart
258
+ startCycle();
259
+ }
260
+ };
261
+
262
+ // Pause on hover
263
+ if (settings.pause) {
264
+ $this.hover(function () {
265
+ clearInterval(rotate);
266
+ }, function () {
267
+ restartCycle();
268
+ });
269
+ }
270
+
271
+ // Pager click event handler
272
+ if (settings.pager || settings.manualControls) {
273
+ $tabs.bind("click", function (e) {
274
+ e.preventDefault();
275
+
276
+ if (!settings.pauseControls) {
277
+ restartCycle();
278
+ }
279
+
280
+ // Get index of clicked tab
281
+ var idx = $tabs.index(this);
282
+
283
+ // Break if element is already active or currently animated
284
+ if (index === idx || $("." + visibleClass).queue('fx').length) {
285
+ return;
286
+ }
287
+
288
+ // Remove active state from old tab and set new one
289
+ selectTab(idx);
290
+
291
+ // Do the animation
292
+ slideTo(idx);
293
+ })
294
+ .eq(0)
295
+ .closest("li")
296
+ .addClass(activeClass);
297
+
298
+ // Pause when hovering pager
299
+ if (settings.pauseControls) {
300
+ $tabs.hover(function () {
301
+ clearInterval(rotate);
302
+ }, function () {
303
+ restartCycle();
304
+ });
305
+ }
306
+ }
307
+
308
+ // Navigation
309
+ if (settings.nav) {
310
+ var navMarkup =
311
+ "<a href='#' class='" + navClass + " prev'>" + settings.prevText + "</a>" +
312
+ "<a href='#' class='" + navClass + " next'>" + settings.nextText + "</a>";
313
+
314
+ // Inject navigation
315
+ if (options.navContainer) {
316
+ $(settings.navContainer).append(navMarkup);
317
+ } else {
318
+ $this.after(navMarkup);
319
+ }
320
+
321
+ var $trigger = $("." + namespaceIdx + "_nav"),
322
+ $prev = $trigger.filter(".prev");
323
+
324
+ // Click event handler
325
+ $trigger.bind("click", function (e) {
326
+ e.preventDefault();
327
+
328
+ var $visibleClass = $("." + visibleClass);
329
+
330
+ // Prevent clicking if currently animated
331
+ if ($visibleClass.queue('fx').length) {
332
+ return;
333
+ }
334
+
335
+ // Adds active class during slide animation
336
+ // $(this)
337
+ // .addClass(namespace + "_active")
338
+ // .delay(fadeTime)
339
+ // .queue(function (next) {
340
+ // $(this).removeClass(namespace + "_active");
341
+ // next();
342
+ // });
343
+
344
+ // Determine where to slide
345
+ var idx = $slide.index($visibleClass),
346
+ prevIdx = idx - 1,
347
+ nextIdx = idx + 1 < length ? index + 1 : 0;
348
+
349
+ // Go to slide
350
+ slideTo($(this)[0] === $prev[0] ? prevIdx : nextIdx);
351
+ if (settings.pager || settings.manualControls) {
352
+ selectTab($(this)[0] === $prev[0] ? prevIdx : nextIdx);
353
+ }
354
+
355
+ if (!settings.pauseControls) {
356
+ restartCycle();
357
+ }
358
+ });
359
+
360
+ // Pause when hovering navigation
361
+ if (settings.pauseControls) {
362
+ $trigger.hover(function () {
363
+ clearInterval(rotate);
364
+ }, function () {
365
+ restartCycle();
366
+ });
367
+ }
368
+ }
369
+
370
+ }
371
+
372
+ // Max-width fallback
373
+ if (typeof document.body.style.maxWidth === "undefined" && options.maxwidth) {
374
+ var widthSupport = function () {
375
+ $this.css("width", "100%");
376
+ if ($this.width() > maxw) {
377
+ $this.css("width", maxw);
378
+ }
379
+ };
380
+
381
+ // Init fallback
382
+ widthSupport();
383
+ $(window).bind("resize", function () {
384
+ widthSupport();
385
+ });
386
+ }
387
+
388
+ });
389
+
390
+ };
391
+ })(jQuery, this, 0);
includes/js/slider.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+ "use strict";
3
+
4
+ $(document).ready(function(){
5
+ $(".rslides").responsiveSlides({
6
+ auto: false, // Boolean: Animate automatically, true or false
7
+ speed: 500, // Integer: Speed of the transition, in milliseconds
8
+ timeout: 4000, // Integer: Time between slide transitions, in milliseconds
9
+ pager: false, // Boolean: Show pager, true or false
10
+ nav: true, // Boolean: Show navigation, true or false
11
+ random: false, // Boolean: Randomize the order of the slides, true or false
12
+ pause: false, // Boolean: Pause on hover, true or false
13
+ pauseControls: true, // Boolean: Pause when hovering controls, true or false
14
+ prevText: "", // String: Text for the "previous" button
15
+ nextText: "", // String: Text for the "next" button
16
+ maxwidth: "", // Integer: Max-width of the slideshow, in pixels
17
+ navContainer: "", // Selector: Where controls should be appended to, default is after the 'ul'
18
+ manualControls: "", // Selector: Declare custom pager navigation
19
+ namespace: "rslides", // String: Change the default namespace used
20
+ before: function(){}, // Function: Before callback
21
+ after: function(){
22
+ var $container = $('.wc-shortcodes-posts');
23
+ if ($container.hasClass('isotope')) {
24
+ $container.isotope( 'reLayout' )
25
+ }
26
+ }// Function: After callback
27
+ });
28
+ });
29
+ } )( jQuery );
includes/mce/js/shortcodes_tinymce.js CHANGED
@@ -42,6 +42,7 @@
42
  // Elements
43
  c = b.addMenu({title:"Elements"});
44
 
 
45
  a.render( c, "Button", "button" );
46
  a.render( c, "Google Map", "googlemap" );
47
  a.render( c, "Heading", "heading" );
@@ -174,6 +175,14 @@
174
 
175
 
176
 
 
 
 
 
 
 
 
 
177
  // Button
178
  if(id === "button") {
179
  tinyMCE.activeEditor.selection.setContent('[wc_button type="primary" url="http://www.wordpresscanvas.com" title="Visit Site" target="self" position="float"]' + wcDummyContent + '[/wc_button]');
42
  // Elements
43
  c = b.addMenu({title:"Elements"});
44
 
45
+ a.render( c, "Posts", "posts" );
46
  a.render( c, "Button", "button" );
47
  a.render( c, "Google Map", "googlemap" );
48
  a.render( c, "Heading", "heading" );
175
 
176
 
177
 
178
+ // Posts
179
+ if(id === "posts") {
180
+ tinyMCE.activeEditor.selection.setContent('[wc_posts author="" author_name="" p="" post__in="" order="DESC" orderby="date" post_status="publish" post_type="post" posts_per_page="10" taxonomy="" field="slug" terms="" title="yes" meta_all="yes" meta_author="yes" meta_date="yes" meta_comments="yes" thumbnail="yes" content="yes" paging="yes" size="large" filtering="yes" columns="3" gutter_space="0.020" heading_type="h2" layout="isotope"][/wc_posts]');
181
+ }
182
+
183
+
184
+
185
+
186
  // Button
187
  if(id === "button") {
188
  tinyMCE.activeEditor.selection.setContent('[wc_button type="primary" url="http://www.wordpresscanvas.com" title="Visit Site" target="self" position="float"]' + wcDummyContent + '[/wc_button]');
includes/scripts.php CHANGED
@@ -28,6 +28,14 @@ if( !function_exists ('wc_shortcodes_scripts') ) :
28
  wp_register_script( 'wc-shortcodes-skillbar', plugin_dir_url( __FILE__ ) . 'js/skillbar.js', array ( 'jquery' ), $ver, true );
29
  wp_register_script( 'wc-shortcodes-fullwidth', plugin_dir_url( __FILE__ ) . 'js/fullwidth.js', array ( 'jquery' ), $ver, true );
30
 
 
 
 
 
 
 
 
 
31
  // countdown
32
  wp_register_script( 'wc-shortcodes-jquery-countdown-js', plugin_dir_url( __FILE__ ) . 'js/jquery.countdown.js', array ( 'jquery' ), $ver, true );
33
  wp_register_script( 'wc-shortcodes-countdown', plugin_dir_url( __FILE__ ) . 'js/countdown.js', array ( 'wc-shortcodes-jquery-countdown-js' ), $ver, true );
28
  wp_register_script( 'wc-shortcodes-skillbar', plugin_dir_url( __FILE__ ) . 'js/skillbar.js', array ( 'jquery' ), $ver, true );
29
  wp_register_script( 'wc-shortcodes-fullwidth', plugin_dir_url( __FILE__ ) . 'js/fullwidth.js', array ( 'jquery' ), $ver, true );
30
 
31
+ // slider
32
+ wp_register_script( 'wordpresscanvas-rslides', plugin_dir_url( __FILE__ ) . 'js/responsiveslides.js', array ( 'jquery' ), '1.0', true );
33
+ wp_register_script( 'wc-shortcodes-slider', plugin_dir_url( __FILE__ ) . 'js/slider.js', array ( 'jquery', 'wordpresscanvas-rslides' ), $ver, true );
34
+
35
+ // isotope
36
+ wp_register_script( 'wordpresscanvas-isotope', plugin_dir_url( __FILE__ ) . 'js/jquery.isotope.min.js', array ( 'jquery' ), '1.5.25', false );
37
+ wp_register_script( 'wc-shortcodes-posts', plugin_dir_url( __FILE__ ) . 'js/posts.js', array ( 'jquery', 'wordpresscanvas-isotope' ), $ver, true );
38
+
39
  // countdown
40
  wp_register_script( 'wc-shortcodes-jquery-countdown-js', plugin_dir_url( __FILE__ ) . 'js/jquery.countdown.js', array ( 'jquery' ), $ver, true );
41
  wp_register_script( 'wc-shortcodes-countdown', plugin_dir_url( __FILE__ ) . 'js/countdown.js', array ( 'wc-shortcodes-jquery-countdown-js' ), $ver, true );
includes/shortcode-functions.php CHANGED
@@ -985,3 +985,157 @@ if( !function_exists('wc_shortcodes_rsvp') ) {
985
  }
986
  add_shortcode( 'wc_rsvp', 'wc_shortcodes_rsvp' );
987
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
985
  }
986
  add_shortcode( 'wc_rsvp', 'wc_shortcodes_rsvp' );
987
  }
988
+
989
+ if( ! function_exists( 'wc_shortcodes_posts' ) ) {
990
+ /**
991
+ * Display posts in various formats
992
+ *
993
+ * @since 3.8
994
+ * @access public
995
+ *
996
+ * @param mixed $atts
997
+ * @return void
998
+ */
999
+ function wc_shortcodes_posts( $atts ) {
1000
+ global $data;
1001
+ global $post;
1002
+
1003
+ wp_enqueue_script('wc-shortcodes-posts');
1004
+
1005
+ if ( (is_front_page() || is_home() ) ) {
1006
+ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : ( ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1 );
1007
+ } else {
1008
+ $paged = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1;
1009
+ }
1010
+
1011
+ $atts = shortcode_atts( array(
1012
+ 'author' => '', //use author id
1013
+ 'author_name' => '', //use 'user_nicename' (NOT name).
1014
+ 'p' => false, //use post id.
1015
+ 'post__in' => false, //use post ids
1016
+ 'order' => 'DESC', // DESC, ASC
1017
+ 'orderby' => 'date',
1018
+ 'post_status' => 'publish',
1019
+ 'post_type' => 'post', // post, page, wc_portfolio_item, etc
1020
+ 'posts_per_page' => 10, //number of post to show per page
1021
+ 'nopaging' => false, //show all posts or use pagination. Default value is 'false', use paging.
1022
+ 'paged' => $paged, // number of page. Show the posts that would normally show up just on page X when using the "Older Entries" link.
1023
+ 'ignore_sticky_posts' => 0,
1024
+
1025
+ 'taxonomy' => '', // category, post_tag, wc_portfolio_tag, etc
1026
+ 'field' => 'slug', // slug or id
1027
+ 'terms' => '', // taxonomy terms.
1028
+
1029
+ 'title' => true, // show heading?
1030
+ 'meta_all' => true, // show all meta info?
1031
+ 'meta_author' => true, // show author?
1032
+ 'meta_date' => true, // show date?
1033
+ 'meta_comments' => true, // show comments?
1034
+ 'thumbnail' => true, // show thumbnail?
1035
+ 'content' => true, // show main content?
1036
+ 'paging' => true, // show pagination navigation?
1037
+
1038
+ 'size' => 'large', // default thumbnail size
1039
+
1040
+ 'filtering' => true, // insert isotope filter navigation
1041
+ 'columns' => '3', // default number of isotope columns
1042
+ 'gutter_space' => '0.020', // gutter width percentage relative to parent element width
1043
+ 'heading_type' => 'h2', // heading tag for title
1044
+ 'layout' => 'isotope', // blog layout
1045
+ ), $atts );
1046
+
1047
+ // clean input values
1048
+ $atts['terms'] = wc_shortcodes_comma_delim_to_array( $atts['terms'] );
1049
+ $atts['post__in'] = wc_shortcodes_comma_delim_to_array( $atts['post__in'] );
1050
+ $atts['columns'] == (int) $atts['columns'];
1051
+ $atts['order'] = strtoupper( $atts['order'] );
1052
+ $atts['heading_type'] = strtolower( $atts['heading_type'] );
1053
+
1054
+ if ( ! is_numeric( $atts['gutter_space'] ) ) {
1055
+ $atts['gutter_space'] = 0.020;
1056
+ }
1057
+ $atts['gutter_space'] = number_format( $atts['gutter_space'], 3 );
1058
+ if ( $atts['gutter_space'] > 0.05 || $atts['gutter_space'] < 0.001 ) {
1059
+ $atts['gutter_space'] = 0.020;
1060
+ }
1061
+
1062
+ if (isset($atts['posts_per_page']) && $atts['posts_per_page']) {
1063
+ $atts['posts_per_page'] = (int) $atts['posts_per_page'];
1064
+ }
1065
+ else {
1066
+ $atts['posts_per_page'] = 0;
1067
+ }
1068
+
1069
+
1070
+
1071
+ // add tax query if user specified
1072
+ if ( ! empty( $atts['terms'] ) ) {
1073
+ $atts['tax_query'] = array(
1074
+ array(
1075
+ 'taxonomy' => $atts['taxonomy'],
1076
+ 'field' => $atts['field'],
1077
+ 'terms' => $atts['terms'],
1078
+ ),
1079
+ );
1080
+ }
1081
+
1082
+ // no paging needed when showing all posts
1083
+ if(isset($atts['posts_per_page']) && $atts['posts_per_page'] == -1) {
1084
+ $atts['nopaging'] = true;
1085
+ }
1086
+
1087
+ // setting attributes right for the php script
1088
+ $valid_headings = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' );
1089
+ $atts['heading_type'] = in_array( $atts['heading_type'], $valid_headings ) ? $atts['heading_type'] : 'h2';
1090
+
1091
+ $valid_columns = array( 2, 3, 4, 5, 6, 7, 8, 9 );
1092
+ $atts['columns'] = in_array( $atts['columns'], $valid_columns ) ? $atts['columns'] : 2;
1093
+
1094
+ ($atts['title'] == "yes") ? ($atts['title'] = true) : ($atts['title'] = false);
1095
+ ($atts['meta_all'] == "yes") ? ($atts['meta_all'] = true) : ($atts['meta_all'] = false);
1096
+ ($atts['meta_author'] == "yes") ? ($atts['meta_author'] = true) : ($atts['meta_author'] = false);
1097
+ ($atts['meta_date'] == "yes") ? ($atts['meta_date'] = true) : ($atts['meta_date'] = false);
1098
+ ($atts['meta_comments'] == "yes") ? ($atts['meta_comments'] = true) : ($atts['meta_comments'] = false);
1099
+ ($atts['thumbnail'] == "yes") ? ($atts['thumbnail'] = true) : ($atts['thumbnail'] = false);
1100
+ ($atts['content'] == "yes") ? ($atts['content'] = true) : ($atts['content'] = false);
1101
+ ($atts['paging'] == "yes") ? ($atts['paging'] = true) : ($atts['paging'] = false);
1102
+ ($atts['filtering'] == "yes") ? ($atts['filtering'] = true) : ($atts['filtering'] = false);
1103
+ ($atts['order'] == "ASC") ? ($atts['order'] = "ASC") : ($atts['order'] = "DESC");
1104
+
1105
+ $ml_query = new WP_Query($atts);
1106
+
1107
+ $html = '';
1108
+
1109
+ $class = array();
1110
+ $class[] = 'wc-shortcodes-posts';
1111
+ $class[] = 'wc-shortcodes-posts-col-' . $atts["columns"];
1112
+ $class[] = 'wc-shortcodes-posts-layout-' . $atts['layout'];
1113
+
1114
+ $html .= '<div data-gutter-space="'.$atts["gutter_space"].'" data-columns="'.$atts["columns"].'" class="' . implode( ' ', $class ) . '">';
1115
+
1116
+ if ( $atts['filtering'] ) {
1117
+ include( 'templates/nav-filtering.php' );
1118
+ }
1119
+
1120
+ while( $ml_query->have_posts() ) :
1121
+ $ml_query->the_post();
1122
+
1123
+ ob_start();
1124
+ include('templates/index.php');
1125
+ $html .= ob_get_clean();
1126
+
1127
+ endwhile;
1128
+
1129
+ $html .= '</div>';
1130
+
1131
+ //no paging if only the latest posts are shown
1132
+ if ( $atts['paging'] ) {
1133
+ ob_start();
1134
+ include('templates/nav-pagination.php');
1135
+ $html .= ob_get_clean();
1136
+ }
1137
+ wp_reset_query();
1138
+ return $html;
1139
+ }
1140
+ }
1141
+ add_shortcode( 'wc_posts', 'wc_shortcodes_posts' );
includes/templates/content-aside.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( $atts['thumbnail'] && has_post_thumbnail() && ! post_password_required() ) : ?>
5
+ <div class="wc-shortcodes-entry-thumbnail">
6
+ <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( $atts['size'] ); ?></a>
7
+ </div>
8
+ <?php endif; ?>
9
+
10
+ <div class="wc-shortcodes-post-content">
11
+ <?php if ( $atts['content'] ) : ?>
12
+ <div class="wc-shortcodes-entry-summary">
13
+ <?php the_content(); ?>
14
+ </div><!-- .entry-summary -->
15
+ <?php endif; ?>
16
+
17
+ <?php include('entry-meta.php'); ?>
18
+
19
+ </div><!-- .wc-shortcodes-post-content -->
20
+ </div><!-- .wc-shortcodes-post-border -->
21
+ </div><!-- #post -->
includes/templates/content-audio.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <div class="wc-shortcodes-entry-audio">
5
+ <?php the_content(); ?>
6
+ </div><!-- .entry-summary -->
7
+
8
+ <div class="wc-shortcodes-post-content">
9
+ <?php if ( $atts['title'] ) : ?>
10
+ <div class="wc-shortcodes-entry-header">
11
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
12
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
13
+ </<?php echo $atts['heading_type']; ?>>
14
+ </div><!-- .entry-header -->
15
+ <?php endif; ?>
16
+
17
+ <?php include('entry-meta.php'); ?>
18
+
19
+ </div><!-- .wc-shortcodes-post-content -->
20
+ </div><!-- .wc-shortcodes-post-border -->
21
+ </div><!-- #post -->
includes/templates/content-chat.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( $atts['thumbnail'] && has_post_thumbnail() && ! post_password_required() ) : ?>
5
+ <div class="wc-shortcodes-entry-thumbnail">
6
+ <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( $atts['size'] ); ?></a>
7
+ </div>
8
+ <?php endif; ?>
9
+
10
+ <div class="wc-shortcodes-post-content">
11
+ <?php if ( $atts['title'] ) : ?>
12
+ <div class="wc-shortcodes-entry-header">
13
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
14
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
15
+ </<?php echo $atts['heading_type']; ?>>
16
+ </div><!-- .entry-header -->
17
+ <?php endif; ?>
18
+
19
+ <?php if ( $atts['content'] ) : ?>
20
+ <div class="wc-shortcodes-entry-summary">
21
+ <?php the_content(); ?>
22
+ </div><!-- .entry-summary -->
23
+ <?php endif; ?>
24
+
25
+ <?php include('entry-meta.php'); ?>
26
+
27
+ </div><!-- .wc-shortcodes-post-content -->
28
+ </div><!-- .wc-shortcodes-post-border -->
29
+ </div><!-- #post -->
includes/templates/content-excerpt.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( $atts['thumbnail'] && has_post_thumbnail() && ! post_password_required() ) : ?>
5
+ <div class="wc-shortcodes-entry-thumbnail">
6
+ <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( $atts['size'] ); ?></a>
7
+ </div>
8
+ <?php endif; ?>
9
+
10
+ <div class="wc-shortcodes-post-content">
11
+ <?php if ( $atts['title'] ) : ?>
12
+ <div class="wc-shortcodes-entry-header">
13
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
14
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
15
+ </<?php echo $atts['heading_type']; ?>>
16
+ </div><!-- .entry-header -->
17
+ <?php endif; ?>
18
+
19
+ <?php if ( $atts['content'] ) : ?>
20
+ <div class="wc-shortcodes-entry-summary">
21
+ <?php the_excerpt(); ?>
22
+ </div><!-- .entry-summary -->
23
+ <?php endif; ?>
24
+
25
+ <?php include('entry-meta.php'); ?>
26
+
27
+ </div><!-- .wc-shortcodes-post-content -->
28
+ </div><!-- .wc-shortcodes-post-border -->
29
+ </div><!-- #post -->
includes/templates/content-gallery.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( get_post_gallery() ) : ?>
5
+ <?php $gallery = get_post_gallery( get_the_ID(), false ); ?>
6
+
7
+ <div class="rslides-wrapper">
8
+ <ul class="rslides">
9
+ <?php foreach( $gallery['src'] as $src ) : ?>
10
+
11
+ <li><a href="<?php the_permalink(); ?>"><img src="<?php echo $src; ?>" class="" alt="" /></a></li>
12
+
13
+ <?php endforeach; ?>
14
+ </ul>
15
+ </div>
16
+ <?php endif; ?>
17
+
18
+ <div class="wc-shortcodes-post-content">
19
+ <?php if ( $atts['title'] ) : ?>
20
+ <div class="wc-shortcodes-entry-header">
21
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
22
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
23
+ </<?php echo $atts['heading_type']; ?>>
24
+ </div><!-- .entry-header -->
25
+ <?php endif; ?>
26
+
27
+ <?php if ( $atts['content'] ) : ?>
28
+ <div class="wc-shortcodes-entry-summary">
29
+ <?php the_excerpt(); ?>
30
+ </div><!-- .entry-summary -->
31
+ <?php endif; ?>
32
+
33
+ <?php include('entry-meta.php'); ?>
34
+
35
+ </div><!-- .wc-shortcodes-post-content -->
36
+ </div><!-- .wc-shortcodes-post-border -->
37
+ </div><!-- #post -->
includes/templates/content-link.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( $atts['thumbnail'] && has_post_thumbnail() && ! post_password_required() ) : ?>
5
+ <div class="wc-shortcodes-entry-thumbnail">
6
+ <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( $atts['size'] ); ?></a>
7
+ </div>
8
+ <?php endif; ?>
9
+
10
+ <div class="wc-shortcodes-post-content">
11
+ <?php if ( $atts['title'] ) : ?>
12
+ <div class="wc-shortcodes-entry-header">
13
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
14
+ <?php
15
+ $content = get_the_content();
16
+ $has_url = get_url_in_content( $content );
17
+ $link = ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
18
+ ?>
19
+ <a href="<?php echo esc_url( $link ); ?>"><?php the_title(); ?></a>
20
+ </<?php echo $atts['heading_type']; ?>>
21
+ </div><!-- .entry-header -->
22
+ <?php endif; ?>
23
+
24
+ <?php if ( $atts['content'] ) : ?>
25
+ <div class="wc-shortcodes-entry-summary">
26
+ <?php the_content(); ?>
27
+ </div><!-- .entry-summary -->
28
+ <?php endif; ?>
29
+
30
+ <?php include('entry-meta.php'); ?>
31
+
32
+ </div><!-- .wc-shortcodes-post-content -->
33
+ </div><!-- .wc-shortcodes-post-border -->
34
+ </div><!-- #post -->
includes/templates/content-quote.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( $atts['content'] ) : ?>
5
+ <div class="wc-shortcodes-entry-quote">
6
+ <?php the_content(); ?>
7
+ </div><!-- .entry-summary -->
8
+ <?php endif; ?>
9
+
10
+ <div class="wc-shortcodes-post-content">
11
+
12
+ <?php include('entry-meta.php'); ?>
13
+
14
+ </div><!-- .wc-shortcodes-post-content -->
15
+ </div><!-- .wc-shortcodes-post-border -->
16
+ </div><!-- #post -->
includes/templates/content-video.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <div class="wc-shortcodes-entry-video">
5
+ <?php the_content(); ?>
6
+ </div><!-- .entry-summary -->
7
+
8
+ <div class="wc-shortcodes-post-content">
9
+ <?php if ( $atts['title'] ) : ?>
10
+ <div class="wc-shortcodes-entry-header">
11
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
12
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
13
+ </<?php echo $atts['heading_type']; ?>>
14
+ </div><!-- .entry-header -->
15
+ <?php endif; ?>
16
+
17
+ <?php include('entry-meta.php'); ?>
18
+
19
+ </div><!-- .wc-shortcodes-post-content -->
20
+ </div><!-- .wc-shortcodes-post-border -->
21
+ </div><!-- #post -->
includes/templates/content.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $classes[] = 'wc-shortcodes-post-box'; ?>
2
+ <div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
3
+ <div class="wc-shortcodes-post-border">
4
+ <?php if ( $atts['thumbnail'] && has_post_thumbnail() && ! post_password_required() ) : ?>
5
+ <div class="wc-shortcodes-entry-thumbnail">
6
+ <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( $atts['size'] ); ?></a>
7
+ </div>
8
+ <?php endif; ?>
9
+
10
+ <div class="wc-shortcodes-post-content">
11
+ <?php if ( $atts['title'] ) : ?>
12
+ <div class="wc-shortcodes-entry-header">
13
+ <<?php echo $atts['heading_type']; ?> class="wc-shortcodes-entry-title">
14
+ <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
15
+ </<?php echo $atts['heading_type']; ?>>
16
+ </div><!-- .entry-header -->
17
+ <?php endif; ?>
18
+
19
+ <?php if ( $atts['content'] ) : ?>
20
+ <div class="wc-shortcodes-entry-summary">
21
+ <?php the_excerpt(); ?>
22
+ </div><!-- .entry-summary -->
23
+ <?php endif; ?>
24
+
25
+ <?php include('entry-meta.php'); ?>
26
+
27
+ </div><!-- .wc-shortcodes-post-content -->
28
+ </div><!-- .wc-shortcodes-post-border -->
29
+ </div><!-- #post -->
includes/templates/entry-meta.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( $atts['meta_all'] ) : ?>
2
+ <div class="wc-shortcodes-footer-entry-meta wc-shortcodes-clearfix">
3
+ <div class="wc-shortcodes-entry-meta-inner wc-shortcodes-clearfix">
4
+ <?php if ( $atts['meta_comments'] ) : ?>
5
+ <?php if ( comments_open() ) : ?>
6
+ <span class="wc-shortcodes-comments-link">
7
+ <?php comments_popup_link( '<span class="wc-shortcodes-leave-reply">' . __( '0', 'wordpresscanvas' ) . '</span>', __( '1', 'wordpresscanvas' ), __( '%', 'wordpresscanvas' ) ); ?>
8
+ </span><!-- .comments-link -->
9
+ <?php endif; // comments_open() ?>
10
+ <?php endif; ?>
11
+
12
+ <?php
13
+ $meta = array();
14
+ // Post author
15
+ if ( $atts['meta_author'] ) {
16
+ $meta[] = sprintf( '<span class="wc-shortcodes-author"><span class="wc-shortcodes-by">By</span> <a class="wc-shortcodes-url" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
17
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
18
+ get_the_author(),
19
+ get_the_author()
20
+ );
21
+ }
22
+ ?>
23
+
24
+ <?php
25
+ if ( $atts['meta_date'] && ! has_post_format( 'link' ) ) {
26
+ $meta[] = sprintf( '<span class="wc-shortcodes-date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="wc-shortcodes-entry-date" datetime="%3$s">%4$s</time></a></span>',
27
+ esc_url( get_permalink() ),
28
+ esc_attr( sprintf( __( 'Permalink to %s', 'wordpresscanvas' ), the_title_attribute( 'echo=0' ) ) ),
29
+ esc_attr( get_the_date( 'c' ) ),
30
+ esc_html( sprintf( '%2$s', get_post_format_string( get_post_format() ), get_the_date('M t, Y') ) )
31
+ );
32
+ }
33
+ ?>
34
+ <?php echo implode( '<span class="wc-shortcodes-sep">|</span>', $meta ); ?>
35
+ </div>
36
+ </div><!-- .wc-shortcodes-footer-entry-meta -->
37
+ <?php endif; ?>
includes/templates/index.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $blog_use_excerpt = true;
3
+ $post_format = get_post_format();
4
+ if ( $blog_use_excerpt ) {
5
+ if ( empty( $post_format ) ) {
6
+ $post_format = 'excerpt';
7
+ }
8
+ }
9
+
10
+ $classes = wc_shortcodes_display_term_classes( $atts['taxonomy'] );
11
+
12
+ switch( $post_format ) {
13
+ case 'excerpt' :
14
+ include( 'content-excerpt.php' );
15
+ break;
16
+ case 'aside' :
17
+ include( 'content-aside.php' );
18
+ break;
19
+ case 'link' :
20
+ include( 'content-link.php' );
21
+ break;
22
+ case 'chat' :
23
+ include( 'content-chat.php' );
24
+ break;
25
+ case 'audio' :
26
+ include( 'content-audio.php' );
27
+ break;
28
+ case 'video' :
29
+ include( 'content-video.php' );
30
+ break;
31
+ case 'quote' :
32
+ include( 'content-quote.php' );
33
+ break;
34
+ case 'gallery' :
35
+ wp_enqueue_script('wc-shortcodes-slider');
36
+ include( 'content-gallery.php' );
37
+ break;
38
+ default :
39
+ include( 'content.php' );
40
+ }
41
+ ?>
includes/templates/nav-filtering.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $args = array(
3
+ 'orderby' => 'name',
4
+ );
5
+ $taxonomy = $atts['taxonomy'];
6
+ $whitelist = $atts['terms'];
7
+
8
+ if ( ! empty( $taxonomy ) ) {
9
+ $terms = get_terms( $taxonomy, $args );
10
+
11
+ if ( ! is_wp_error( $terms ) || empty( $terms ) ) {
12
+
13
+ $links = array();
14
+ $links[] = "<a href='#' data-filter='*' title='All Tags' class='wc-shortcodes-term wc-shortcodes-all-tags wc-shortcodes-term-active'>" . __( 'All', 'wordpresscanvas' ) . "</a>";
15
+
16
+ if ( ! is_array( $whitelist ) || empty( $whitelist ) ) {
17
+ foreach ( $terms as $term ) {
18
+ $term_link = get_term_link( $term );
19
+
20
+ $links[] = "<a href='#' data-filter='.wc-shortcodes-filter-{$term->slug}' title='{$term->name} Tag' class='wc-shortcodes-term wc-shortcodes-term-slug-{$term->slug}'>" . $term->name . "</a>";
21
+ }
22
+ }
23
+ else {
24
+ foreach ( $terms as $term ) {
25
+ if ( in_array( $term->slug, $whitelist ) ) {
26
+ $term_link = get_term_link( $term );
27
+
28
+ $links[] = "<a href='#' data-filter='.wc-shortcodes-filter-{$term->slug}' title='{$term->name} Tag' class='wc-shortcodes-term wc-shortcodes-term-slug-{$term->slug}'>" . $term->name . "</a>";
29
+ }
30
+ }
31
+ }
32
+ ?>
33
+
34
+ <?php if ( sizeof( $links ) > 2 ) : ?>
35
+ <nav class="wc-shortcodes-filtering wc-shortcodes-nav-<?php echo $taxonomy; ?>">
36
+ <?php echo implode( "<span class='tag-divider'>/</span>", $links ); ?>
37
+ </nav>
38
+ <?php endif; ?>
39
+
40
+ <?php
41
+ }
42
+ }
includes/templates/nav-pagination.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Don't print empty markup if there's only one page.
3
+ if ( $ml_query->max_num_pages < 2 )
4
+ return;
5
+ ?>
6
+ <nav class="navigation paging-navigation" role="navigation">
7
+ <h3 class="screen-reader-text"><?php _e( 'Posts Navigation', 'wordpresscanvas' ); ?></h3>
8
+ <div class="nav-links">
9
+ <?php
10
+ $big = 999999999; // need an unlikely integer
11
+ $args = array(
12
+ 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
13
+ 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
14
+ 'total' => $ml_query->max_num_pages,
15
+ 'current' => max( 1, get_query_var('paged') ),
16
+ 'show_all' => false,
17
+ 'prev_next' => true,
18
+ 'prev_text' => __('Previous Page'),
19
+ 'next_text' => __('Next Page'),
20
+ 'end_size' => 1,
21
+ 'mid_size' => 1,
22
+ 'type' => 'plain',
23
+ 'add_args' => false, // array of query args to add
24
+ 'add_fragment' => ''
25
+ );
26
+ ?>
27
+ <?php echo paginate_links( $args ); ?>
28
+
29
+ </div><!-- .nav-links -->
30
+ </nav><!-- .navigation -->
readme.txt CHANGED
@@ -1,21 +1,41 @@
1
- === WordPress Canvas Shortcodes ===
2
 
3
  Contributors: cbaldelomar
4
  Donate link: http://webplantmedia.com/pay-now/
5
- Tags: shortcode, shortcodes
6
  Requires at least: 3.7
7
- Tested up to: 3.7.1
8
  Stable tag: trunk
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- A family of shortcodes to enhance site functionality.
13
 
14
  == Description ==
15
 
16
- Enhance Pages with the following features. Accordion, Tabs, Toggle, Columns, Testimonials, Borders, Buttons, Full Width, Notifications, Google Maps, Social Icons, Progress Bars, Pricing, Highlights, Custom HTML, Code.
17
-
18
- See the shortcodes in action at [WordPress Canvas Shortcodes](http://wordpresscanvas.com/features/shortcodes/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ### Professional Support
21
 
@@ -27,7 +47,7 @@ If you're a theme author, plugin author, or just a code hobbyist, you can follow
27
 
28
  ### Donations
29
 
30
- Yes, I do accept donations. If you want to buy me a sandwich or whatever, you can do so from my [payment page](http://webplantmedia.com/pay-now/). I appreciate all donations, no matter the size. Further development of this plugin is not contingent on donations, but they are always a nice incentive.
31
 
32
  == Installation ==
33
 
@@ -42,8 +62,32 @@ Yes, I do accept donations. If you want to buy me a sandwich or whatever, you c
42
 
43
  Use the shortcode manager in the TinyMCE text editor
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  == Changelog ==
46
 
 
 
 
 
47
  ### Version 1.16
48
 
49
  * updated youtube icon
1
+ === WordPress Canvas - Shortcodes ===
2
 
3
  Contributors: cbaldelomar
4
  Donate link: http://webplantmedia.com/pay-now/
5
+ Tags: shortcode, shortcodes, accordion, accordions, tab, tabs, toggle, columns, column, section, sections, testimonials, border, borders, button, buttons, fullwidth, full width, notification, notifications, google maps, maps, googlemaps, social icons, progress bar, pricing, pricing box, highlights, countdown, rsvp, custom html, code, code snippets, snippets, isotope, masonry, posts, post_type
6
  Requires at least: 3.7
7
+ Tested up to: 3.8.1
8
  Stable tag: trunk
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ A family of shortcodes to enhance your site functionality.
13
 
14
  == Description ==
15
 
16
+ Enhance your pages and posts with the following features.
17
+
18
+ * Accordion
19
+ * Tabs
20
+ * Toggle
21
+ * Columns & Sections
22
+ * Testimonials
23
+ * Borders
24
+ * Buttons
25
+ * Full Width
26
+ * Notifications
27
+ * Google Maps
28
+ * Social Icons
29
+ * Progress Bars
30
+ * Pricing
31
+ * Highlights
32
+ * Countdown
33
+ * RSVP
34
+ * Custom HTML
35
+ * Code Snippets
36
+ * Isotope / Masonry Posts
37
+
38
+ [Live Demo & Documentation](http://wordpresscanvas.com/features/shortcodes/)
39
 
40
  ### Professional Support
41
 
47
 
48
  ### Donations
49
 
50
+ Thank you so much for even considering supporting my work. If you have benefited from my WordPress plugins, or are appreciative of my customer support, and feel led to send me a monetary donation, please follow the link [here](http://webplantmedia.com/donate/). I am truly thankful for your hard earned giving.
51
 
52
  == Installation ==
53
 
62
 
63
  Use the shortcode manager in the TinyMCE text editor
64
 
65
+ == Screenshots ==
66
+
67
+ 1. Accordion, Tabs & Toggle
68
+ 2. Columns & Sections
69
+ 3. Testimonials
70
+ 4. Borders
71
+ 5. Buttons
72
+ 6. Full Width
73
+ 7. Notifications
74
+ 8. Google Maps
75
+ 9. Social Icons
76
+ 10. Progress Bars
77
+ 11. Pricing
78
+ 12. Highlights
79
+ 13. Countdown
80
+ 14. RSVP
81
+ 15. Custom HTML
82
+ 16. Code Snippets
83
+ 17. Isotope / Masonry Posts
84
+
85
  == Changelog ==
86
 
87
+ ### Version 1.17
88
+
89
+ * Added ability to showcase posts of any post type in an isotope / masonry layout.
90
+
91
  ### Version 1.16
92
 
93
  * updated youtube icon
wc-shortcodes.php CHANGED
@@ -1,15 +1,15 @@
1
  <?php
2
  /*
3
- Plugin Name: WordPress Canvas Shortcodes
4
  Plugin URI: http://wordpresscanvas.com/features/shortcodes/
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 1.16
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_SHORTCODES_VERSION', '1.16' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
1
  <?php
2
  /*
3
+ Plugin Name: WordPress Canvas - Shortcodes
4
  Plugin URI: http://wordpresscanvas.com/features/shortcodes/
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 1.17
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_SHORTCODES_VERSION', '1.17' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );