File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,9 @@ public static function migrate_to_4_1_0() {
342342 case 'content ' :
343343 $ template = "[ap_content] \n\n[ap_permalink type= \"html \"] \n\n[ap_hashtags] " ;
344344 break ;
345+ case 'custom ' :
346+ $ template = \get_option ( 'activitypub_custom_post_content ' , ACTIVITYPUB_CUSTOM_POST_CONTENT );
347+ break ;
345348 default :
346349 $ template = ACTIVITYPUB_CUSTOM_POST_CONTENT ;
347350 break ;
Original file line number Diff line number Diff line change @@ -142,5 +142,18 @@ public function test_migrate_to_4_1_0() {
142142
143143 $ this ->assertEquals ( "[ap_content] \n\n[ap_permalink type= \"html \"] \n\n[ap_hashtags] " , $ template );
144144 $ this ->assertFalse ( $ content_type );
145+
146+ $ custom = "[ap_title] [ap_content] [ap_hashcats] [ap_authorurl] " ;
147+
148+ \update_option ( 'activitypub_post_content_type ' , 'custom ' );
149+ \update_option ( 'activitypub_custom_post_content ' , $ custom );
150+
151+ \Activitypub \Migration::migrate_to_4_1_0 ();
152+
153+ $ template = \get_option ( 'activitypub_custom_post_content ' );
154+ $ content_type = \get_option ( 'activitypub_post_content_type ' );
155+
156+ $ this ->assertEquals ( $ custom , $ template );
157+ $ this ->assertFalse ( $ content_type );
145158 }
146159}
You can’t perform that action at this time.
0 commit comments