@@ -195,7 +195,7 @@ public function test_wp_force_plain_post_permalink_statuses_filter_future_posts_
195
195
$ post_id = self ::factory ()->post ->create (
196
196
array (
197
197
'post_status ' => 'future ' ,
198
- 'post_date ' => date ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
198
+ 'post_date ' => gmdate ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
199
199
'post_name ' => 'future-post ' ,
200
200
)
201
201
);
@@ -213,15 +213,15 @@ public function test_wp_force_plain_post_permalink_statuses_filter_allows_custom
213
213
// Add filter to allow future posts to use pretty permalinks.
214
214
add_filter (
215
215
'wp_force_plain_post_permalink_statuses ' ,
216
- function ( $ statuses ) {
216
+ function ( $ statuses ) {
217
217
return array_diff ( $ statuses , array ( 'future ' ) );
218
218
}
219
219
);
220
220
221
221
$ post_id = self ::factory ()->post ->create (
222
222
array (
223
223
'post_status ' => 'future ' ,
224
- 'post_date ' => date ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
224
+ 'post_date ' => gmdate ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
225
225
'post_name ' => 'future-post ' ,
226
226
)
227
227
);
@@ -242,15 +242,15 @@ public function test_wp_force_plain_post_permalink_statuses_filter_selective_by_
242
242
// Add filter to allow only future posts to use pretty permalinks.
243
243
add_filter (
244
244
'wp_force_plain_post_permalink_statuses ' ,
245
- function ( $ statuses ) {
245
+ function ( $ statuses ) {
246
246
return array_diff ( $ statuses , array ( 'future ' ) );
247
247
}
248
248
);
249
249
250
250
$ future_post_id = self ::factory ()->post ->create (
251
251
array (
252
252
'post_status ' => 'future ' ,
253
- 'post_date ' => date ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
253
+ 'post_date ' => gmdate ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
254
254
'post_name ' => 'future-post ' ,
255
255
)
256
256
);
@@ -282,7 +282,7 @@ public function test_wp_force_plain_post_permalink_statuses_filter_selective_by_
282
282
// Add filter to allow future posts pretty permalinks only for 'post' type.
283
283
add_filter (
284
284
'wp_force_plain_post_permalink_statuses ' ,
285
- function ( $ statuses , $ post ) {
285
+ function ( $ statuses , $ post ) {
286
286
if ( 'future ' === $ post ->post_status && 'post ' === $ post ->post_type ) {
287
287
return array_diff ( $ statuses , array ( 'future ' ) );
288
288
}
@@ -296,7 +296,7 @@ function( $statuses, $post ) {
296
296
$ post_id = self ::factory ()->post ->create (
297
297
array (
298
298
'post_status ' => 'future ' ,
299
- 'post_date ' => date ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
299
+ 'post_date ' => gmdate ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
300
300
'post_name ' => 'future-post ' ,
301
301
)
302
302
);
@@ -306,7 +306,7 @@ function( $statuses, $post ) {
306
306
array (
307
307
'post_type ' => 'page ' ,
308
308
'post_status ' => 'future ' ,
309
- 'post_date ' => date ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
309
+ 'post_date ' => gmdate ( 'Y-m-d H:i:s ' , strtotime ( '+1 day ' ) ),
310
310
'post_name ' => 'future-page ' ,
311
311
)
312
312
);
@@ -340,5 +340,4 @@ public function test_wp_force_plain_post_permalink_statuses_filter_published_pos
340
340
// Should return false (allow pretty permalink) for published posts.
341
341
$ this ->assertFalse ( wp_force_plain_post_permalink ( $ post ) );
342
342
}
343
-
344
343
}
0 commit comments