public function ap_user_page_menu($links, $userid) { if (is_my_profile() && ap_current_user_page_is('messages')) { $links['new_message'] = array('name' => __('New message', 'ap'), 'link' => '#', 'icon' => 'ap-icon-mail', 'attributes' => 'data-button="ap-new-message"'); } return $links; }
function ap_edit_profile_form() { if (!is_my_profile()) { return; } global $current_user_meta; global $user; ?> <form method="POST" data-action="ap-edit-profile" action=""> <?php do_action('ap_edit_profile_fields', $user, $current_user_meta); ?> <button class="btn ap-btn ap-success btn-submit-ask" type="submit"><?php _e('Save profile', 'ap'); ?> </button> <input type="hidden" name="action" value="ap_save_profile"> <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('edit_profile'); ?> "> </form> <?php }