Info
- 3 posts
- 2 voices
- Started 2 years ago by chandersbs
- Latest reply from chandersbs
- This topic is not resolved
Profile edit URL
-
- Posted 2 years ago #
I want to add an "edit" button right next to the "log out" button, but i'm not sure what calls this the page. I checked the logged-in.php and found this:
<?php printf(__('Welcome, %1$s'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>
That generates "Welcome, username"
What code generates the "edit" button?
I checked the profile.php and I found that this code outputs an EDIT button:
<?php if (bb_current_user_can( 'edit_user', $user->ID )) : ?>
<?php printf(__('You may edit this information.'), esc_attr( get_profile_tab_link( $user_id, 'edit' ) ) ); ?>
<?php endif; ?>The downpart of this code is, the output is only visible when you actually are on the profile page. I need something like this which is visible no matter which you page you are.
Ideas?
-
- Posted 2 years ago #
put it in the header
-
- Posted 2 years ago #
You mean to make it show on every page?
This is the code located in logged-in.php that's being called:
<p id="inloggen">
- <?php printf(__('Fawaka, %1$s'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>
- <?php bb_admin_link( 'before= ' );?>
- <?php bb_logout_link(); ?>
</p>
This is what I have in my header.php
<div id="inloggen">
<?php if ( !in_array( bb_get_location(), array( 'login-page', 'register-page' ) ) ) login_form(); ?>
<?php if ( bb_is_profile() ) ; ?>
</div>However, if you are on the frontpage (/index.php) or any other page, apart from profile.php
you don't see the "edit" link.Got?
-
You must log in to post.