Skip to content

Commit aa7ab3b

Browse files
committed
Fix aplazame-redirect for WP < 4.4
1 parent f3c37c7 commit aa7ab3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/classes/lib/Redirect.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public function addRedirectPage() {
4545
'post_title' => __( 'Aplazame Redirect' ),
4646
'post_type' => 'page',
4747
'post_status' => 'publish',
48-
'meta_input' => array(
49-
'aplazame-redirect' => 'true',
50-
),
5148
);
5249

5350
$id = wp_insert_post( $post );
5451

52+
// Compatibility with WP < 4.4
53+
add_post_meta( $id, 'aplazame-redirect', 'true' );
54+
5555
return $id;
5656
}
5757

0 commit comments

Comments
 (0)