Skip to content

Commit 70d0050

Browse files
Tests: Clean up calls to the unused wp_add_post_meta() function.
Follow-up to [1041/tests], [23416], [23554]. Props SirLouen, mukesh27, SergeyBiryukov. See #63167. git-svn-id: https://develop.svn.wordpress.org/trunk@60799 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ecdab39 commit 70d0050

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/phpunit/tests/meta/slashes.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,10 @@ public function set_up() {
4444
public function test_edit_post() {
4545
$post_id = self::$post_id;
4646

47-
if ( function_exists( 'wp_add_post_meta' ) ) {
48-
$meta_1 = wp_add_post_meta( $post_id, 'slash_test_1', 'foo' );
49-
$meta_2 = wp_add_post_meta( $post_id, 'slash_test_2', 'foo' );
50-
$meta_3 = wp_add_post_meta( $post_id, 'slash_test_3', 'foo' );
51-
} else {
52-
// Expects slashed data.
53-
$meta_1 = add_post_meta( $post_id, 'slash_test_1', addslashes( 'foo' ) );
54-
$meta_2 = add_post_meta( $post_id, 'slash_test_2', addslashes( 'foo' ) );
55-
$meta_3 = add_post_meta( $post_id, 'slash_test_3', addslashes( 'foo' ) );
56-
}
47+
// Expects slashed data.
48+
$meta_1 = add_post_meta( $post_id, 'slash_test_1', addslashes( 'foo' ) );
49+
$meta_2 = add_post_meta( $post_id, 'slash_test_2', addslashes( 'foo' ) );
50+
$meta_3 = add_post_meta( $post_id, 'slash_test_3', addslashes( 'foo' ) );
5751

5852
$_POST = array();
5953
$_POST['post_ID'] = $post_id;

0 commit comments

Comments
 (0)