Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Add a Page */
- global $user_ID;
- $new_post = array(
- 'comment_status' => 'open',
- 'post_parent' => '413',
- 'post_title' => '<?php bp_displayed_user_username() ?>', /* causing a page with NO title */
- 'post_content' => 'Leave feedback for this user.',
- 'post_status' => 'publish',
- 'post_date' => date('Y-m-d H:i:s'),
- 'post_author' => '1',
- 'post_type' => 'page',
- 'post_category' => array(0)
- );
- $post_id = wp_insert_post($new_post);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement