'closed', 'ping_status' => 'closed', 'post_content' => $affiliate_area_page_content, 'post_status' => 'publish', 'post_title' => __( 'Affiliate Area', 'affiliates' ), 'post_type' => 'page' ); $post_id = wp_insert_post( $postarr ); if ( $post_id instanceof WP_Error ) { $affiliates_admin_messages[] = '
' . __( sprintf( 'The affiliate area page could not be created. Error: %s', $post_id->get_error_message() ), 'affiliates' ) . '
'; } else { $post_ids[] = $post_id; } $post_ids = apply_filters( 'affiliates_setup_pages', $post_ids ); do_action( 'affiliates_after_setup_pages', $post_ids ); return $post_ids; } }