File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments