Projects by WooThemes - Version 1.4.0

Version Description

  • The default permalink structure has been tweaked to remove the project category. So http://localhost/network/project/landscapes/the-barrow-downs/ becomes http://localhost/network/project/the-barrow-downs/. Any old links will automatically redirect to their newer counterparts. You may have to re-save your permalink settings after performing this update. You can use the projects_post_type_rewrite filter to adjust this.
Download this release

Release Info

Developer jameskoster
Plugin Icon wp plugin Projects by WooThemes
Version 1.4.0
Comparing to
See all releases

Code changes from version 1.3.0 to 1.4.0

assets/js/admin.js CHANGED
@@ -42,7 +42,7 @@ jQuery(document).ready(function($){
42
 
43
  $project_images.append('\
44
  <li class="image" data-attachment_id="' + attachment.id + '">\
45
- <img src="' + attachment.url + '" />\
46
  <ul class="actions">\
47
  <li><a href="#" class="delete" title="'+ woo_projects_admin.delete_image +'">&times;</a></li>\
48
  </ul>\
42
 
43
  $project_images.append('\
44
  <li class="image" data-attachment_id="' + attachment.id + '">\
45
+ <img src="' + attachment.sizes.thumbnail.url + '" />\
46
  <ul class="actions">\
47
  <li><a href="#" class="delete" title="'+ woo_projects_admin.delete_image +'">&times;</a></li>\
48
  </ul>\
classes/class-projects-admin.php CHANGED
@@ -455,7 +455,7 @@ class Projects_Admin {
455
  global $post, $messages;
456
 
457
  // Verify
458
- if ( ( get_post_type() != $this->post_type ) || ! wp_verify_nonce( $_POST['woo_' . $this->token . '_nonce'], plugin_basename( $this->dir ) ) ) {
459
  return $post_id;
460
  }
461
 
455
  global $post, $messages;
456
 
457
  // Verify
458
+ if ( ( get_post_type() != $this->post_type ) || ! isset( $_POST['woo_' . $this->token . '_nonce'] ) || ! wp_verify_nonce( $_POST['woo_' . $this->token . '_nonce'], plugin_basename( $this->dir ) ) ) {
459
  return $post_id;
460
  }
461
 
config.codekit CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
- "creatorBuild": "17670",
4
  "files": {
5
  "\/assets\/css\/_mixins.scss": {
6
  "createSourceMap": 0,
@@ -155,6 +155,15 @@
155
  "outputPathIsOutsideProject": 0,
156
  "outputPathIsSetByUser": 0
157
  },
 
 
 
 
 
 
 
 
 
158
  "\/classes\/class-projects-shortcodes.php": {
159
  "fileType": 8192,
160
  "ignore": 0,
@@ -200,6 +209,15 @@
200
  "outputPathIsOutsideProject": 0,
201
  "outputPathIsSetByUser": 0
202
  },
 
 
 
 
 
 
 
 
 
203
  "\/projects-hooks.php": {
204
  "fileType": 8192,
205
  "ignore": 0,
@@ -218,6 +236,15 @@
218
  "outputPathIsOutsideProject": 0,
219
  "outputPathIsSetByUser": 0
220
  },
 
 
 
 
 
 
 
 
 
221
  "\/templates\/archive-project.php": {
222
  "fileType": 8192,
223
  "ignore": 0,
@@ -551,6 +578,10 @@
551
  "active": 0,
552
  "flagValue": -1
553
  },
 
 
 
 
554
  "space_operators": {
555
  "active": 0,
556
  "flagValue": -1
@@ -1026,6 +1057,7 @@
1026
  "stylusAutoOutputPathReplace1": "stylus",
1027
  "stylusAutoOutputPathReplace2": "css",
1028
  "stylusAutoOutputPathStyle": 2,
 
1029
  "stylusDebugStyle": 0,
1030
  "stylusImportCSS": 0,
1031
  "stylusOutputStyle": 0,
1
  {
2
  "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
+ "creatorBuild": "18027",
4
  "files": {
5
  "\/assets\/css\/_mixins.scss": {
6
  "createSourceMap": 0,
155
  "outputPathIsOutsideProject": 0,
156
  "outputPathIsSetByUser": 0
157
  },
158
+ "\/classes\/class-projects-settings.php": {
159
+ "fileType": 8192,
160
+ "ignore": 0,
161
+ "ignoreWasSetByUser": 0,
162
+ "inputAbbreviatedPath": "\/classes\/class-projects-settings.php",
163
+ "outputAbbreviatedPath": "No Output Path",
164
+ "outputPathIsOutsideProject": 0,
165
+ "outputPathIsSetByUser": 0
166
+ },
167
  "\/classes\/class-projects-shortcodes.php": {
168
  "fileType": 8192,
169
  "ignore": 0,
209
  "outputPathIsOutsideProject": 0,
210
  "outputPathIsSetByUser": 0
211
  },
212
+ "\/projects-core-functions.php": {
213
+ "fileType": 8192,
214
+ "ignore": 0,
215
+ "ignoreWasSetByUser": 0,
216
+ "inputAbbreviatedPath": "\/projects-core-functions.php",
217
+ "outputAbbreviatedPath": "No Output Path",
218
+ "outputPathIsOutsideProject": 0,
219
+ "outputPathIsSetByUser": 0
220
+ },
221
  "\/projects-hooks.php": {
222
  "fileType": 8192,
223
  "ignore": 0,
236
  "outputPathIsOutsideProject": 0,
237
  "outputPathIsSetByUser": 0
238
  },
239
+ "\/projects.php": {
240
+ "fileType": 8192,
241
+ "ignore": 0,
242
+ "ignoreWasSetByUser": 0,
243
+ "inputAbbreviatedPath": "\/projects.php",
244
+ "outputAbbreviatedPath": "No Output Path",
245
+ "outputPathIsOutsideProject": 0,
246
+ "outputPathIsSetByUser": 0
247
+ },
248
  "\/templates\/archive-project.php": {
249
  "fileType": 8192,
250
  "ignore": 0,
578
  "active": 0,
579
  "flagValue": -1
580
  },
581
+ "prefer_english_operator": {
582
+ "active": 0,
583
+ "flagValue": -1
584
+ },
585
  "space_operators": {
586
  "active": 0,
587
  "flagValue": -1
1057
  "stylusAutoOutputPathReplace1": "stylus",
1058
  "stylusAutoOutputPathReplace2": "css",
1059
  "stylusAutoOutputPathStyle": 2,
1060
+ "stylusCreateSourceMap": 0,
1061
  "stylusDebugStyle": 0,
1062
  "stylusImportCSS": 0,
1063
  "stylusOutputStyle": 0,
lang/projects-by-woothemes.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/projects-by-woothemes\n"
7
- "POT-Creation-Date: 2014-06-06 14:05:53+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -76,79 +76,79 @@ msgstr ""
76
  msgid "%s Gallery"
77
  msgstr ""
78
 
79
- #: classes/class-projects-admin.php:420 classes/class-projects-admin.php:568
80
  msgid "Delete image"
81
  msgstr ""
82
 
83
- #: classes/class-projects-admin.php:421
84
  msgid "Edit image"
85
  msgstr ""
86
 
87
- #: classes/class-projects-admin.php:432
88
  msgid "Add %s gallery images"
89
  msgstr ""
90
 
91
- #: classes/class-projects-admin.php:514 templates/single-project/meta.php:43
92
  msgid "Client"
93
  msgstr ""
94
 
95
- #: classes/class-projects-admin.php:515
96
  msgid "Enter the client name. (Optional)"
97
  msgstr ""
98
 
99
- #: classes/class-projects-admin.php:522
100
  msgid "URL"
101
  msgstr ""
102
 
103
- #: classes/class-projects-admin.php:523
104
  msgid "Enter the project URL. (Optional)"
105
  msgstr ""
106
 
107
- #: classes/class-projects-admin.php:543
108
  msgid "Enter the %s title here"
109
  msgstr ""
110
 
111
- #: classes/class-projects-admin.php:566
112
  msgid "Add Images to Project Gallery"
113
  msgstr ""
114
 
115
- #: classes/class-projects-admin.php:567
116
  msgid "Add to gallery"
117
  msgstr ""
118
 
119
- #: classes/class-projects-admin.php:569
120
  msgid "Upload"
121
  msgstr ""
122
 
123
- #: classes/class-projects-admin.php:570
124
  msgid "Select this"
125
  msgstr ""
126
 
127
- #: classes/class-projects-admin.php:590
128
  msgid "%sProjects by WooThemes is almost ready.%s To get started, %sconfigure your projects page%s."
129
  msgstr ""
130
 
131
- #: classes/class-projects-admin.php:604
132
  msgid "%s Cover Image"
133
  msgstr ""
134
 
135
- #: classes/class-projects-admin.php:617
136
  msgid "Set featured image"
137
  msgstr ""
138
 
139
- #: classes/class-projects-admin.php:617 classes/class-projects-admin.php:649
140
  msgid "Set cover image"
141
  msgstr ""
142
 
143
- #: classes/class-projects-admin.php:633
144
  msgid "Remove featured image"
145
  msgstr ""
146
 
147
- #: classes/class-projects-admin.php:633
148
  msgid "Remove cover image"
149
  msgstr ""
150
 
151
- #: classes/class-projects-admin.php:648
152
  msgid "Set Cover Image"
153
  msgstr ""
154
 
@@ -188,69 +188,69 @@ msgstr ""
188
  msgid "Settings"
189
  msgstr ""
190
 
191
- #: classes/class-projects-settings.php:38
192
- msgid "Projects Settings"
193
  msgstr ""
194
 
195
- #: classes/class-projects-settings.php:47
196
- msgid "Save Changes"
197
  msgstr ""
198
 
199
- #: classes/class-projects-settings.php:58
200
- msgid "Pages"
201
  msgstr ""
202
 
203
- #: classes/class-projects-settings.php:59
204
- msgid "Images"
205
  msgstr ""
206
 
207
- #: classes/class-projects-settings.php:64
208
  msgid "Configure projects pages."
209
  msgstr ""
210
 
211
- #: classes/class-projects-settings.php:77
212
  msgid "Projects Page"
213
  msgstr ""
214
 
215
- #: classes/class-projects-settings.php:81
216
  msgid "The base page of your projects. This is your projects archive."
217
  msgstr ""
218
 
219
- #: classes/class-projects-settings.php:91
220
  msgid "These settings control the dimensions of thumbnails in your projects. After updating these settings you may need to"
221
  msgstr ""
222
 
223
- #: classes/class-projects-settings.php:91
224
  msgid "regenerate your thumbnails"
225
  msgstr ""
226
 
227
- #: classes/class-projects-settings.php:121
228
  msgid "Archive Images"
229
  msgstr ""
230
 
231
- #: classes/class-projects-settings.php:125
232
- #: classes/class-projects-settings.php:134
233
- #: classes/class-projects-settings.php:143
234
  msgid "Width:"
235
  msgstr ""
236
 
237
- #: classes/class-projects-settings.php:125
238
- #: classes/class-projects-settings.php:134
239
- #: classes/class-projects-settings.php:143
240
  msgid "Height:"
241
  msgstr ""
242
 
243
- #: classes/class-projects-settings.php:125
244
- #: classes/class-projects-settings.php:134
245
- #: classes/class-projects-settings.php:143
246
  msgid "Crop:"
247
  msgstr ""
248
 
249
- #: classes/class-projects-settings.php:130
250
  msgid "Single Images"
251
  msgstr ""
252
 
253
- #: classes/class-projects-settings.php:139
254
  msgid "Thumbnails"
255
  msgstr ""
256
 
@@ -262,49 +262,49 @@ msgstr ""
262
  msgid "Categories"
263
  msgstr ""
264
 
265
- #: classes/class-projects-taxonomy.php:104
266
  msgctxt "taxonomy general name"
267
  msgid "Project %s"
268
  msgstr ""
269
 
270
- #: classes/class-projects-taxonomy.php:105
271
  msgctxt "taxonomy singular name"
272
  msgid "%s"
273
  msgstr ""
274
 
275
- #: classes/class-projects-taxonomy.php:106
276
  msgid "Search %s"
277
  msgstr ""
278
 
279
- #: classes/class-projects-taxonomy.php:107
280
  msgid "All %s"
281
  msgstr ""
282
 
283
- #: classes/class-projects-taxonomy.php:108
284
  msgid "Parent %s"
285
  msgstr ""
286
 
287
- #: classes/class-projects-taxonomy.php:109
288
  msgid "Parent %s:"
289
  msgstr ""
290
 
291
- #: classes/class-projects-taxonomy.php:110 projects.php:145
292
  msgid "Edit %s"
293
  msgstr ""
294
 
295
- #: classes/class-projects-taxonomy.php:111
296
  msgid "Update %s"
297
  msgstr ""
298
 
299
- #: classes/class-projects-taxonomy.php:112 projects.php:144
300
  msgid "Add New %s"
301
  msgstr ""
302
 
303
- #: classes/class-projects-taxonomy.php:113
304
  msgid "New %s Name"
305
  msgstr ""
306
 
307
- #: classes/class-projects-taxonomy.php:114
308
  msgid "%s"
309
  msgstr ""
310
 
@@ -356,33 +356,33 @@ msgstr ""
356
  msgid "Purchase"
357
  msgstr ""
358
 
359
- #: projects.php:129
360
  msgctxt "post type singular name"
361
  msgid "Project"
362
  msgstr ""
363
 
364
- #: projects.php:130
365
  msgctxt "post type general name"
366
  msgid "Projects"
367
  msgstr ""
368
 
369
- #: projects.php:146
370
  msgid "New %s"
371
  msgstr ""
372
 
373
- #: projects.php:148
374
  msgid "View %s"
375
  msgstr ""
376
 
377
- #: projects.php:149
378
  msgid "Search %a"
379
  msgstr ""
380
 
381
- #: projects.php:150
382
  msgid "No %s Found"
383
  msgstr ""
384
 
385
- #: projects.php:151
386
  msgid "No %s Found In Trash"
387
  msgstr ""
388
 
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/projects-by-woothemes\n"
7
+ "POT-Creation-Date: 2014-11-11 10:24:32+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
76
  msgid "%s Gallery"
77
  msgstr ""
78
 
79
+ #: classes/class-projects-admin.php:429 classes/class-projects-admin.php:581
80
  msgid "Delete image"
81
  msgstr ""
82
 
83
+ #: classes/class-projects-admin.php:430
84
  msgid "Edit image"
85
  msgstr ""
86
 
87
+ #: classes/class-projects-admin.php:441
88
  msgid "Add %s gallery images"
89
  msgstr ""
90
 
91
+ #: classes/class-projects-admin.php:527 templates/single-project/meta.php:43
92
  msgid "Client"
93
  msgstr ""
94
 
95
+ #: classes/class-projects-admin.php:528
96
  msgid "Enter the client name. (Optional)"
97
  msgstr ""
98
 
99
+ #: classes/class-projects-admin.php:535
100
  msgid "URL"
101
  msgstr ""
102
 
103
+ #: classes/class-projects-admin.php:536
104
  msgid "Enter the project URL. (Optional)"
105
  msgstr ""
106
 
107
+ #: classes/class-projects-admin.php:556
108
  msgid "Enter the %s title here"
109
  msgstr ""
110
 
111
+ #: classes/class-projects-admin.php:579
112
  msgid "Add Images to Project Gallery"
113
  msgstr ""
114
 
115
+ #: classes/class-projects-admin.php:580
116
  msgid "Add to gallery"
117
  msgstr ""
118
 
119
+ #: classes/class-projects-admin.php:582
120
  msgid "Upload"
121
  msgstr ""
122
 
123
+ #: classes/class-projects-admin.php:583
124
  msgid "Select this"
125
  msgstr ""
126
 
127
+ #: classes/class-projects-admin.php:603
128
  msgid "%sProjects by WooThemes is almost ready.%s To get started, %sconfigure your projects page%s."
129
  msgstr ""
130
 
131
+ #: classes/class-projects-admin.php:617
132
  msgid "%s Cover Image"
133
  msgstr ""
134
 
135
+ #: classes/class-projects-admin.php:630
136
  msgid "Set featured image"
137
  msgstr ""
138
 
139
+ #: classes/class-projects-admin.php:630 classes/class-projects-admin.php:662
140
  msgid "Set cover image"
141
  msgstr ""
142
 
143
+ #: classes/class-projects-admin.php:646
144
  msgid "Remove featured image"
145
  msgstr ""
146
 
147
+ #: classes/class-projects-admin.php:646
148
  msgid "Remove cover image"
149
  msgstr ""
150
 
151
+ #: classes/class-projects-admin.php:661
152
  msgid "Set Cover Image"
153
  msgstr ""
154
 
188
  msgid "Settings"
189
  msgstr ""
190
 
191
+ #: classes/class-projects-settings.php:43
192
+ msgid "Pages"
193
  msgstr ""
194
 
195
+ #: classes/class-projects-settings.php:44
196
+ msgid "Images"
197
  msgstr ""
198
 
199
+ #: classes/class-projects-settings.php:60
200
+ msgid "Projects Settings"
201
  msgstr ""
202
 
203
+ #: classes/class-projects-settings.php:82
204
+ msgid "Save Changes"
205
  msgstr ""
206
 
207
+ #: classes/class-projects-settings.php:111
208
  msgid "Configure projects pages."
209
  msgstr ""
210
 
211
+ #: classes/class-projects-settings.php:124
212
  msgid "Projects Page"
213
  msgstr ""
214
 
215
+ #: classes/class-projects-settings.php:128
216
  msgid "The base page of your projects. This is your projects archive."
217
  msgstr ""
218
 
219
+ #: classes/class-projects-settings.php:138
220
  msgid "These settings control the dimensions of thumbnails in your projects. After updating these settings you may need to"
221
  msgstr ""
222
 
223
+ #: classes/class-projects-settings.php:138
224
  msgid "regenerate your thumbnails"
225
  msgstr ""
226
 
227
+ #: classes/class-projects-settings.php:168
228
  msgid "Archive Images"
229
  msgstr ""
230
 
231
+ #: classes/class-projects-settings.php:172
232
+ #: classes/class-projects-settings.php:181
233
+ #: classes/class-projects-settings.php:190
234
  msgid "Width:"
235
  msgstr ""
236
 
237
+ #: classes/class-projects-settings.php:172
238
+ #: classes/class-projects-settings.php:181
239
+ #: classes/class-projects-settings.php:190
240
  msgid "Height:"
241
  msgstr ""
242
 
243
+ #: classes/class-projects-settings.php:172
244
+ #: classes/class-projects-settings.php:181
245
+ #: classes/class-projects-settings.php:190
246
  msgid "Crop:"
247
  msgstr ""
248
 
249
+ #: classes/class-projects-settings.php:177
250
  msgid "Single Images"
251
  msgstr ""
252
 
253
+ #: classes/class-projects-settings.php:186
254
  msgid "Thumbnails"
255
  msgstr ""
256
 
262
  msgid "Categories"
263
  msgstr ""
264
 
265
+ #: classes/class-projects-taxonomy.php:105
266
  msgctxt "taxonomy general name"
267
  msgid "Project %s"
268
  msgstr ""
269
 
270
+ #: classes/class-projects-taxonomy.php:106
271
  msgctxt "taxonomy singular name"
272
  msgid "%s"
273
  msgstr ""
274
 
275
+ #: classes/class-projects-taxonomy.php:107
276
  msgid "Search %s"
277
  msgstr ""
278
 
279
+ #: classes/class-projects-taxonomy.php:108
280
  msgid "All %s"
281
  msgstr ""
282
 
283
+ #: classes/class-projects-taxonomy.php:109
284
  msgid "Parent %s"
285
  msgstr ""
286
 
287
+ #: classes/class-projects-taxonomy.php:110
288
  msgid "Parent %s:"
289
  msgstr ""
290
 
291
+ #: classes/class-projects-taxonomy.php:111 projects.php:149
292
  msgid "Edit %s"
293
  msgstr ""
294
 
295
+ #: classes/class-projects-taxonomy.php:112
296
  msgid "Update %s"
297
  msgstr ""
298
 
299
+ #: classes/class-projects-taxonomy.php:113 projects.php:148
300
  msgid "Add New %s"
301
  msgstr ""
302
 
303
+ #: classes/class-projects-taxonomy.php:114
304
  msgid "New %s Name"
305
  msgstr ""
306
 
307
+ #: classes/class-projects-taxonomy.php:115
308
  msgid "%s"
309
  msgstr ""
310
 
356
  msgid "Purchase"
357
  msgstr ""
358
 
359
+ #: projects.php:132
360
  msgctxt "post type singular name"
361
  msgid "Project"
362
  msgstr ""
363
 
364
+ #: projects.php:133
365
  msgctxt "post type general name"
366
  msgid "Projects"
367
  msgstr ""
368
 
369
+ #: projects.php:150
370
  msgid "New %s"
371
  msgstr ""
372
 
373
+ #: projects.php:152
374
  msgid "View %s"
375
  msgstr ""
376
 
377
+ #: projects.php:153
378
  msgid "Search %a"
379
  msgstr ""
380
 
381
+ #: projects.php:154
382
  msgid "No %s Found"
383
  msgstr ""
384
 
385
+ #: projects.php:155
386
  msgid "No %s Found In Trash"
387
  msgstr ""
388
 
projects-template.php CHANGED
@@ -23,7 +23,7 @@ function projects_template_redirect() {
23
  global $wp_query, $wp;
24
 
25
  // Redirect project base page to post type archive url
26
- if ( is_page( projects_get_page_id( 'projects' ) ) ) {
27
  wp_safe_redirect( get_post_type_archive_link( 'project' ) );
28
  exit;
29
  }
23
  global $wp_query, $wp;
24
 
25
  // Redirect project base page to post type archive url
26
+ if ( ! empty( $_GET['page_id'] ) && get_option( 'permalink_structure' ) == "" && $_GET['page_id'] == projects_get_page_id( 'projects' ) ) {
27
  wp_safe_redirect( get_post_type_archive_link( 'project' ) );
28
  exit;
29
  }
projects.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://woothemes.com/
5
  * Description: Hi, I'm your project showcase plugin for WordPress. Show off your recent work using our shortcode, widget or template tag.
6
  * Author: WooThemes
7
- * Version: 1.3.0
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
@@ -45,7 +45,7 @@ final class Projects {
45
  /**
46
  * @var string
47
  */
48
- public $version = '1.3.0';
49
 
50
  /**
51
  * Constructor function.
@@ -140,6 +140,7 @@ final class Projects {
140
  * @return void
141
  */
142
  public function register_post_type () {
 
143
  $labels = array(
144
  'name' => $this->plural_name,
145
  'singular_name' => $this->singular_name,
@@ -163,10 +164,7 @@ final class Projects {
163
  'show_ui' => true,
164
  'show_in_menu' => true,
165
  'query_var' => true,
166
- 'rewrite' => array(
167
- 'slug' => trailingslashit ( strtolower( $this->singular_name ) ) . '%project_category%',
168
- 'with_front' => false
169
- ),
170
  'capability_type' => 'post',
171
  'has_archive' => ( $projects_page_id = projects_get_page_id( 'projects' ) ) && get_page( $projects_page_id ) ? get_page_uri( $projects_page_id ) : 'projects',
172
  'hierarchical' => false,
4
  * Plugin URI: http://woothemes.com/
5
  * Description: Hi, I'm your project showcase plugin for WordPress. Show off your recent work using our shortcode, widget or template tag.
6
  * Author: WooThemes
7
+ * Version: 1.4.0
8
  * Author URI: http://woothemes.com/
9
  *
10
  * @package WordPress
45
  /**
46
  * @var string
47
  */
48
+ public $version = '1.4.0';
49
 
50
  /**
51
  * Constructor function.
140
  * @return void
141
  */
142
  public function register_post_type () {
143
+
144
  $labels = array(
145
  'name' => $this->plural_name,
146
  'singular_name' => $this->singular_name,
164
  'show_ui' => true,
165
  'show_in_menu' => true,
166
  'query_var' => true,
167
+ 'rewrite' => apply_filters( 'projects_post_type_rewrite', true ),
 
 
 
168
  'capability_type' => 'post',
169
  'has_archive' => ( $projects_page_id = projects_get_page_id( 'projects' ) ) && get_page( $projects_page_id ) ? get_page_uri( $projects_page_id ) : 'projects',
170
  'hierarchical' => false,
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://woothemes.com/
4
  Tags: portfolio, projects, project, showcase, artwork, work, creative, photography, art, images, woocommerce
5
  Requires at least: 3.8
6
  Tested up to: 4.0
7
- Stable tag: 1.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,9 @@ You sure can! Read about how in the [documentation](http://docs.woothemes.com/do
103
 
104
  == Upgrade Notice ==
105
 
 
 
 
106
  = 1.3.0 =
107
  * The project category urls have been improved to use the base page title as the slug opposed to the `project-category` default. So, previously your project cateogry urls will have looked like: yoursite.com/project-category/illustration. Now, `project-category` is replaced with the slug of your projects base page. So if you're using a page called 'Portfolio' that url will now look like: yoursite.com/portfolio/illustration. You will have to create custom redirects if you want the old urls work.
108
  * This version adds admin tabs to the settings screens, and will run an update to your existing settings data. If your data is not retained, simply resave your settings.
@@ -115,6 +118,14 @@ You sure can! Read about how in the [documentation](http://docs.woothemes.com/do
115
 
116
  == Changelog ==
117
 
 
 
 
 
 
 
 
 
118
  = 1.3.0 =
119
  * 2014-08-26
120
  * New - Adds admin tabs to the settings screens for better UX.
4
  Tags: portfolio, projects, project, showcase, artwork, work, creative, photography, art, images, woocommerce
5
  Requires at least: 3.8
6
  Tested up to: 4.0
7
+ Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Upgrade Notice ==
105
 
106
+ = 1.4.0 =
107
+ * The default permalink structure has been tweaked to remove the project category. So http://localhost/network/project/landscapes/the-barrow-downs/ becomes http://localhost/network/project/the-barrow-downs/. Any old links will automatically redirect to their newer counterparts. You may have to re-save your permalink settings after performing this update. You can use the `projects_post_type_rewrite` filter to adjust this.
108
+
109
  = 1.3.0 =
110
  * The project category urls have been improved to use the base page title as the slug opposed to the `project-category` default. So, previously your project cateogry urls will have looked like: yoursite.com/project-category/illustration. Now, `project-category` is replaced with the slug of your projects base page. So if you're using a page called 'Portfolio' that url will now look like: yoursite.com/portfolio/illustration. You will have to create custom redirects if you want the old urls work.
111
  * This version adds admin tabs to the settings screens, and will run an update to your existing settings data. If your data is not retained, simply resave your settings.
118
 
119
  == Changelog ==
120
 
121
+ = 1.4.0 =
122
+ * 2014-11-11
123
+ * Fix - Project gallery thumbnail sizes in admin. (Props @corvannoorloos).
124
+ * Fix - Undefined index notice when trashing/untrashing projects. (Props @johnbuck).
125
+ * Tweak - Improvements to `projects_template_redirect()`.
126
+ * Tweak - Added `rel="lightbox"` to project galleries for compatibility with lightbox plugins.
127
+ * Tweak - Project post type default url structure no longer includes project category (resolves attachment page 404's.
128
+
129
  = 1.3.0 =
130
  * 2014-08-26
131
  * New - Adds admin tabs to the settings screens for better UX.
templates/loop/short-description.php CHANGED
@@ -10,8 +10,14 @@
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
  global $post;
13
-
 
 
 
 
 
 
14
  ?>
15
  <div itemprop="description" class="short-description">
16
- <?php echo apply_filters( 'post_excerpt', wpautop( get_the_excerpt() ) ) ?>
17
  </div>
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
  global $post;
13
+ $excerpt_raw = '';
14
+ if ( isset( $post->post_excerpt ) ) {
15
+ $excerpt_raw = $post->post_excerpt;
16
+ } // End If Statement
17
+ if ( '' === trim( $excerpt_raw ) ) {
18
+ $excerpt_raw = get_the_excerpt();
19
+ } // End If Statement
20
  ?>
21
  <div itemprop="description" class="short-description">
22
+ <?php echo apply_filters( 'post_excerpt', wpautop( $excerpt_raw ) ) ?>
23
  </div>
templates/single-project/project-feature.php CHANGED
@@ -21,6 +21,7 @@ global $post;
21
  $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
22
  $image_link = wp_get_attachment_url( get_post_thumbnail_id() );
23
  $attachment_count = count( projects_get_gallery_attachment_ids() );
 
24
 
25
  if ( $attachment_count > 0 ) {
26
  $gallery = '[project-gallery]';
@@ -29,7 +30,7 @@ global $post;
29
  }
30
 
31
  if ( apply_filters( 'projects_gallery_link_images', true ) ) {
32
- echo '<a href="' . $image_link . '" title="' . $image_title . '">' . $image . '</a>';
33
  } else {
34
  echo $image;
35
  }
21
  $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
22
  $image_link = wp_get_attachment_url( get_post_thumbnail_id() );
23
  $attachment_count = count( projects_get_gallery_attachment_ids() );
24
+ $lightbox_rel = apply_filters( 'projects_lightbox_rel', $rel = 'lightbox' );
25
 
26
  if ( $attachment_count > 0 ) {
27
  $gallery = '[project-gallery]';
30
  }
31
 
32
  if ( apply_filters( 'projects_gallery_link_images', true ) ) {
33
+ echo '<a href="' . $image_link . '" title="' . $image_title . '" rel="' . $lightbox_rel . ' project-gallery-' . $post->ID . '">' . $image . '</a>';
34
  } else {
35
  echo $image;
36
  }
templates/single-project/project-gallery.php CHANGED
@@ -9,14 +9,15 @@
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
- global $post, $projects, $project;
13
 
14
  ?>
15
  <div class="gallery">
16
 
17
  <?php
18
 
19
- $attachment_ids = projects_get_gallery_attachment_ids();
 
20
 
21
  if ( $attachment_ids ) { ?>
22
 
@@ -45,7 +46,7 @@ global $post, $projects, $project;
45
  $image_title = esc_attr( get_the_title( $attachment_id ) );
46
 
47
  if ( apply_filters( 'projects_gallery_link_images', true ) ) {
48
- echo '<a href="' . $image_link . '" title="' . $image_title . '">' . $image . '</a>';
49
  } else {
50
  echo $image;
51
  }
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
 
12
+ global $post;
13
 
14
  ?>
15
  <div class="gallery">
16
 
17
  <?php
18
 
19
+ $attachment_ids = projects_get_gallery_attachment_ids();
20
+ $lightbox_rel = apply_filters( 'projects_lightbox_rel', $rel = 'lightbox' );
21
 
22
  if ( $attachment_ids ) { ?>
23
 
46
  $image_title = esc_attr( get_the_title( $attachment_id ) );
47
 
48
  if ( apply_filters( 'projects_gallery_link_images', true ) ) {
49
+ echo '<a href="' . $image_link . '" title="' . $image_title . '" rel="' . $lightbox_rel . ' project-gallery-' . $post->ID . '">' . $image . '</a>';
50
  } else {
51
  echo $image;
52
  }