' . esc_html__('Your demo import has been completed successfully.', 'advance-pet-care') . '
'; echo '' . esc_html__('VIEW SITE', 'advance-pet-care') . ''; //end // Social Icons set_theme_mod( 'advance_pet_care_facebook_url', '#' ); set_theme_mod( 'advance_pet_care_twitter_url', '#' ); set_theme_mod( 'advance_pet_care_youtube_url', '#' ); set_theme_mod( 'advance_pet_care_insta_url', '#' ); set_theme_mod( 'advance_pet_care_linkedin_url', '#' ); // Topbar Section set_theme_mod( 'advance_pet_care_mail1', 'exp1234@example.com' ); set_theme_mod( 'advance_pet_care_phone1', '+1800-123-456-7890' ); set_theme_mod( 'advance_pet_care_time', 'Opening Time :-' ); set_theme_mod( 'advance_pet_care_time1', 'Mon-Fri 09 Am To 16 Pm' ); set_theme_mod( 'advance_pet_care_address', 'Address:-' ); set_theme_mod( 'advance_pet_care_address1', 'We Give Special Care To Your Loving Pet' ); // Slider for($advance_pet_care_i=1;$advance_pet_care_i<=4;$advance_pet_care_i++){ $advance_pet_care_slider_title = 'Lorem ipsum dolor sit amet consectetur adipiscing elit'; $advance_pet_care_slider_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.'; // Create post object $advance_pet_care_my_post = array( 'post_title' => wp_strip_all_tags( $advance_pet_care_slider_title ), 'post_content' => $advance_pet_care_slider_content, 'post_status' => 'publish', 'post_type' => 'page', ); // Insert the post into the database $advance_pet_care_post_id = wp_insert_post( $advance_pet_care_my_post ); if ($advance_pet_care_post_id) { // Set the theme mod for the slider page set_theme_mod('advance_pet_care_slider_page' . $advance_pet_care_i, $advance_pet_care_post_id); $advance_pet_care_image_url = get_template_directory_uri().'/images/slider'.$advance_pet_care_i.'.png'; $advance_pet_care_image_id = media_sideload_image($advance_pet_care_image_url, $advance_pet_care_post_id, null, 'id'); if (!is_wp_error($advance_pet_care_image_id)) { // Set the downloaded image as the post's featured image set_post_thumbnail($advance_pet_care_post_id, $advance_pet_care_image_id); } } } // Welcome Section $advance_pet_care_post_title = 'Welcome To Advance Pet Care'; $advance_pet_care_post_content = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.'; // Create post object $advance_pet_care_my_post = array( 'post_title' => wp_strip_all_tags($advance_pet_care_post_title), 'post_content' => $advance_pet_care_post_content, 'post_status' => 'publish', 'post_type' => 'post', ); // Insert the post into the database $advance_pet_care_post_id = wp_insert_post($advance_pet_care_my_post); // Check if the post was successfully created if (!is_wp_error($advance_pet_care_post_id)) { // Set the theme mod for the post ID set_theme_mod('advance_pet_care_welcome_setting', $advance_pet_care_post_id); // Fetch the image URL $advance_pet_care_image_url = get_template_directory_uri() . '/images/image.png'; // Media sideload the image $advance_pet_care_image_id = media_sideload_image($advance_pet_care_image_url, $advance_pet_care_post_id, null, 'id'); // Check if the image was successfully uploaded if (!is_wp_error($advance_pet_care_image_id)) { // Set the downloaded image as the post's featured image set_post_thumbnail($advance_pet_care_post_id, $advance_pet_care_image_id); } else { // Handle the error if the image upload failed error_log('Image upload failed: ' . $advance_pet_care_image_id->get_error_message()); } } else { // Handle the error if the post creation failed error_log('Post creation failed: ' . $advance_pet_care_post_id->get_error_message()); } } ?>