From d24ab0a61a955e22b5122048627ed6f2394e88ba Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 17 Mar 2017 10:59:34 +1100 Subject: [PATCH] Add post content to sample data generated using setup wizard --- includes/admin/class-sp-admin-setup-wizard.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/admin/class-sp-admin-setup-wizard.php b/includes/admin/class-sp-admin-setup-wizard.php index b3b474ad..e5512a9b 100644 --- a/includes/admin/class-sp-admin-setup-wizard.php +++ b/includes/admin/class-sp-admin-setup-wizard.php @@ -629,6 +629,7 @@ class WC_Admin_Setup_Wizard { // Initialize post $post = array( 'post_status' => 'publish' ); + $sample_content = _x( 'This is an example %1$s. As a new SportsPress user, you should go to your dashboard to delete this %1$s and create new %2$s for your content. Have fun!', 'example', 'sportspress' ); // Insert posts foreach ( $pages as $post_type => $description ) { @@ -642,6 +643,7 @@ class WC_Admin_Setup_Wizard { // Add post args $post['post_title'] = $obj->labels->singular_name; $post['post_type'] = $post_type; + $post['post_content'] = sprintf( $sample_content, $obj->labels->singular_name, $obj->labels->name, add_query_arg( 'post_type', $post_type, admin_url( 'edit.php' ) ) ); // Insert post $id = wp_insert_post( $post );