WP User Frontend has been successfully installed and saved!', 'wp-user-frontend' ); ?>
Congratulations, your payment has been completed!
', 'wp-user-frontend' ) ); $bank_page = $this->create_page( __( 'Order Received', 'wp-user-frontend' ), __( 'Hi, we have received your order. We will validate the order and will take necessary steps to move forward.', 'wp-user-frontend' ) ); } // save the settings if ( $edit_page ) { update_option( 'wpuf_frontend_posting', [ 'edit_page_id' => $edit_page, 'default_post_form' => $post_form, ] ); } // profile pages $profile_options = []; $reg_page = false; if ( $login_page ) { $profile_options['login_page'] = $login_page; } $data = apply_filters( 'wpuf_pro_page_install', $profile_options ); if ( is_array( $data ) ) { if ( isset( $data['profile_options'] ) ) { $profile_options = $data['profile_options']; } if ( isset( $data['reg_page'] ) ) { $reg_page = $data['reg_page']; } } if ( $login_page && $reg_page ) { $profile_options['register_link_override'] = 'on'; } update_option( 'wpuf_profile', $profile_options ); if ( 'on' == wpuf_get_option( 'enable_payment', 'wpuf_payment', 'on' ) ) { // payment pages update_option( 'wpuf_payment', [ 'subscription_page' => $subscr_page, 'payment_page' => $payment_page, 'payment_success' => $thank_page, 'bank_success' => $bank_page, ] ); } update_option( '_wpuf_page_created', '1' ); $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; if ( $page != 'wpuf-setup' ) { wp_redirect( admin_url( 'admin.php?page=wpuf-settings&wpuf_page_installed=1' ) ); exit; } } /** * Create a page with title and content * * @param string $page_title * @param string $post_content * * @return false|int */ public function create_page( $page_title, $post_content = '', $post_type = 'page' ) { $page_id = wp_insert_post( [ 'post_title' => $page_title, 'post_type' => $post_type, 'post_status' => 'publish', 'comment_status' => 'closed', 'post_content' => $post_content, ] ); if ( $page_id && !is_wp_error( $page_id ) ) { return $page_id; } return false; } /** * Create a basic registration form by default * * @return int|bool */ public function create_reg_form() { return wpuf_create_sample_form( __( 'Registration', 'wp-user-frontend' ), 'wpuf_profile' ); } /** * Create a post form * * @return void */ public function create_form() { return wpuf_create_sample_form( __( 'Sample Form', 'wp-user-frontend' ), 'wpuf_forms' ); } }