- This topic has 5 replies, 2 voices, and was last updated 10 years, 11 months ago by
Pie Register.
- AuthorPosts
- August 27, 2015 at 2:23 pm #10003901
Andrea BettelliParticipantHi,
Thanks, really, for this great plugin!
Could I know, please, after logging in, how can I have, in the widget:
If I am the Administrator … the 3 lines with the links for: Dashboard – New Post – Logout
If I am a Member … the 3 lines with the links for:: Profile – New Post – LogoutThanks
AndreaAugust 27, 2015 at 4:16 pm #10003902
Andrea BettelliParticipantWithout make difference I chenged with the following lines of code in widget.php:
echo '<div class="member_div">'; echo '<a href="'.admin_url().'" class="" title="Dashboard">'.__("Dashborad","piereg").'</a></div><br />'; echo '<div><a href="'.site_url( "/wp-admin/post-new.php" ).'" class="" title="New Post">'.__("New Post","piereg").'</a></div><br />'; echo '<div><a href="'.wp_logout_url().'" class="" title="Logout">'.__("Logout","piereg").'</a></div></div>'; echo '<br />'; echo '<br />'; echo '<br />'; echo '<br />';Can be ok this code or have you some other solution?
Thanks
AndreaAugust 29, 2015 at 5:41 am #10003904
Andrea BettelliParticipantHi,
finally I will leave the code for the Login as the following:if( ! current_user_can('administrator')) { echo '<div><a href="'.site_url( "/wp-admin/profile.php" ).'" class="pie_log_in_out" title="Profile">'.__("Profile","piereg").'</a></div>'; } else { echo '<div><a href="'.admin_url().'" class="pie_log_in_out" title="DAshboard">'.__("Dashboard","piereg").'</a></div>'; } echo '<div><a href="'.site_url( "/wp-admin/post-new.php" ).'" class="pie_log_in_out" title="New Post">'.__("New Post","piereg").'</a></div>'; echo '<div><a href="'.wp_logout_url().'" class="pie_log_in_out" title="Logout">'.__("Logout","piereg").'</a></div></div>'; echo '<br />'; echo '<br />'; echo '<br />'; echo '<br />';Good night
AndreaSeptember 1, 2015 at 4:56 pm #10003916
Pie RegisterParticipantHello,
Thanks for your question.
Well, you can do it programmatically.
PR gives you pie_profile_username_frontend_widget filter that passes 3 arguments
$profile_text_html,$profile_link,$profile_text$profile_text_html = ‘‘ . $profile_text . ‘‘;
You can retrieve logged in users info by calling the following:
global $current_user;
get_currentuserinfo();Hope this helps
Thanks
September 1, 2015 at 7:06 pm #10003922
Andrea BettelliParticipantHi Hasnain Abbas,
Thanks for your reply …
My question was only about the missed links on your widget for open the dashboard or directly a new post.
Actually you have only active the link for open the profile.
AndreaSeptember 2, 2015 at 4:26 pm #10003934
Pie RegisterParticipantPerhaps we will add more links on the widget in our future release.
thanks
- AuthorPosts
- The forum ‘Pie-Register 2.0 Support’ is closed to new topics and replies.
