Version Description
- Added the option to leave widget links blank for default handling
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 3.2.2 |
Comparing to | |
See all releases |
Code changes from version 3.2.1 to 3.2.2
- includes/admin-page.php +2 -0
- includes/widget-new.php +4 -2
- includes/widget-old.php +4 -2
- readme.txt +3 -0
- theme-my-login.php +5 -5
includes/admin-page.php
CHANGED
@@ -128,6 +128,7 @@ $profile_url = $this->GetOption('widget_profile_url');
|
|
128 |
</tr>
|
129 |
</table>
|
130 |
<h4><?php _e('Dashboard URL'); ?></h4>
|
|
|
131 |
<table class="form-table">
|
132 |
<?php foreach ($user_roles as $role => $value) : ?>
|
133 |
<tr valign="top">
|
@@ -140,6 +141,7 @@ $profile_url = $this->GetOption('widget_profile_url');
|
|
140 |
</table>
|
141 |
|
142 |
<h4><?php _e('Profile URL'); ?></h4>
|
|
|
143 |
<table class="form-table">
|
144 |
<?php foreach ($user_roles as $role => $value) : ?>
|
145 |
<tr valign="top">
|
128 |
</tr>
|
129 |
</table>
|
130 |
<h4><?php _e('Dashboard URL'); ?></h4>
|
131 |
+
<p class="setting-description">Leave blank for default</p>
|
132 |
<table class="form-table">
|
133 |
<?php foreach ($user_roles as $role => $value) : ?>
|
134 |
<tr valign="top">
|
141 |
</table>
|
142 |
|
143 |
<h4><?php _e('Profile URL'); ?></h4>
|
144 |
+
<p class="setting-description">Leave blank for default</p>
|
145 |
<table class="form-table">
|
146 |
<?php foreach ($user_roles as $role => $value) : ?>
|
147 |
<tr valign="top">
|
includes/widget-new.php
CHANGED
@@ -19,6 +19,8 @@ class ThemeMyLoginWidget extends WP_Widget {
|
|
19 |
$user_role = reset($current_user->roles);
|
20 |
$dashboard_url = $ThemeMyLogin->GetOption('widget_dashboard_url');
|
21 |
$profile_url = $ThemeMyLogin->GetOption('widget_profile_url');
|
|
|
|
|
22 |
echo $before_widget . $before_title . __('Welcome', 'theme-my-login') . ', ' . $current_user->display_name . $after_title . "\n";
|
23 |
if ($instance['show_gravatar']) :
|
24 |
echo '<div class="theme-my-login-avatar">' . get_avatar( $user_ID, $size = $instance['gravatar_size'] ) . '</div>' . "\n";
|
@@ -26,10 +28,10 @@ class ThemeMyLoginWidget extends WP_Widget {
|
|
26 |
do_action('theme_my_login_avatar', $current_user);
|
27 |
echo '<ul class="theme-my-login-links">' . "\n";
|
28 |
if ($instance['dashboard_link_' . $user_role]) :
|
29 |
-
echo '<li><a href="' . $
|
30 |
endif;
|
31 |
if ($instance['profile_link_' . $user_role]) :
|
32 |
-
echo '<li><a href="' . $
|
33 |
endif;
|
34 |
do_action('theme_my_login_links', $user_role);
|
35 |
$redirect = wp_guess_url();
|
19 |
$user_role = reset($current_user->roles);
|
20 |
$dashboard_url = $ThemeMyLogin->GetOption('widget_dashboard_url');
|
21 |
$profile_url = $ThemeMyLogin->GetOption('widget_profile_url');
|
22 |
+
$user_dashboard_url = (empty($dashboard_url[$user_role])) ? site_url('wp-admin/', 'admin') : $dashboard_url[$user_role];
|
23 |
+
$user_profile_url = (empty($profile_url[$user_role])) ? site_url('wp-admin/profile.php', 'admin') : $profile_url[$user_role];
|
24 |
echo $before_widget . $before_title . __('Welcome', 'theme-my-login') . ', ' . $current_user->display_name . $after_title . "\n";
|
25 |
if ($instance['show_gravatar']) :
|
26 |
echo '<div class="theme-my-login-avatar">' . get_avatar( $user_ID, $size = $instance['gravatar_size'] ) . '</div>' . "\n";
|
28 |
do_action('theme_my_login_avatar', $current_user);
|
29 |
echo '<ul class="theme-my-login-links">' . "\n";
|
30 |
if ($instance['dashboard_link_' . $user_role]) :
|
31 |
+
echo '<li><a href="' . $user_dashboard_url . '">' . __('Dashboard', 'theme-my-login') . '</a></li>' . "\n";
|
32 |
endif;
|
33 |
if ($instance['profile_link_' . $user_role]) :
|
34 |
+
echo '<li><a href="' . $user_profile_url . '">' . __('Profile', 'theme-my-login') . '</a></li>' . "\n";
|
35 |
endif;
|
36 |
do_action('theme_my_login_links', $user_role);
|
37 |
$redirect = wp_guess_url();
|
includes/widget-old.php
CHANGED
@@ -25,6 +25,8 @@ class ThemeMyLoginWidget {
|
|
25 |
$dashboard_url = $ThemeMyLogin->GetOption('widget_dashboard_url');
|
26 |
$profile_link = $ThemeMyLogin->GetOption('widget_profile_link');
|
27 |
$profile_url = $ThemeMyLogin->GetOption('widget_profile_url');
|
|
|
|
|
28 |
echo $before_widget . $before_title . __('Welcome', 'theme-my-login') . ', ' . $current_user->display_name . $after_title . "\n";
|
29 |
if ($ThemeMyLogin->GetOption('widget_show_gravatar') == true) :
|
30 |
echo '<div class="theme-my-login-avatar">' . get_avatar( $user_ID, $size = $ThemeMyLogin->GetOption('widget_gravatar_size') ) . '</div>' . "\n";
|
@@ -32,10 +34,10 @@ class ThemeMyLoginWidget {
|
|
32 |
do_action('theme_my_login_avatar', $current_user);
|
33 |
echo '<ul class="theme-my-login-links">' . "\n";
|
34 |
if ($dashboard_link[$user_role] == true) :
|
35 |
-
echo '<li><a href="' . $
|
36 |
endif;
|
37 |
if ($profile_link[$user_role] == true) :
|
38 |
-
echo '<li><a href="' . $
|
39 |
endif;
|
40 |
do_action('theme_my_login_links', $user_role);
|
41 |
$redirect = wp_guess_url();
|
25 |
$dashboard_url = $ThemeMyLogin->GetOption('widget_dashboard_url');
|
26 |
$profile_link = $ThemeMyLogin->GetOption('widget_profile_link');
|
27 |
$profile_url = $ThemeMyLogin->GetOption('widget_profile_url');
|
28 |
+
$user_dashboard_url = (empty($dashboard_url[$user_role])) ? site_url('wp-admin/', 'admin') : $dashboard_url[$user_role];
|
29 |
+
$user_profile_url = (empty($profile_url[$user_role])) ? site_url('wp-admin/profile.php', 'admin') : $profile_url[$user_role];
|
30 |
echo $before_widget . $before_title . __('Welcome', 'theme-my-login') . ', ' . $current_user->display_name . $after_title . "\n";
|
31 |
if ($ThemeMyLogin->GetOption('widget_show_gravatar') == true) :
|
32 |
echo '<div class="theme-my-login-avatar">' . get_avatar( $user_ID, $size = $ThemeMyLogin->GetOption('widget_gravatar_size') ) . '</div>' . "\n";
|
34 |
do_action('theme_my_login_avatar', $current_user);
|
35 |
echo '<ul class="theme-my-login-links">' . "\n";
|
36 |
if ($dashboard_link[$user_role] == true) :
|
37 |
+
echo '<li><a href="' . $user_dashboard_url . '">' . __('Dashboard', 'theme-my-login') . '</a></li>' . "\n";
|
38 |
endif;
|
39 |
if ($profile_link[$user_role] == true) :
|
40 |
+
echo '<li><a href="' . $user_profile_url . '">' . __('Profile', 'theme-my-login') . '</a></li>' . "\n";
|
41 |
endif;
|
42 |
do_action('theme_my_login_links', $user_role);
|
43 |
$redirect = wp_guess_url();
|
readme.txt
CHANGED
@@ -27,6 +27,9 @@ None yet. Please visit http://www.jfarthing.com/forum for any support!
|
|
27 |
|
28 |
== Changelog ==
|
29 |
|
|
|
|
|
|
|
30 |
= 3.2.1 =
|
31 |
* Fixed a XHTML validation issue
|
32 |
|
27 |
|
28 |
== Changelog ==
|
29 |
|
30 |
+
= 3.2.2 =
|
31 |
+
* Added the option to leave widget links blank for default handling
|
32 |
+
|
33 |
= 3.2.1 =
|
34 |
* Fixed a XHTML validation issue
|
35 |
|
theme-my-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/wordpress-plugins/theme-my-login-plugin
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
-
Version: 3.2.
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
*/
|
@@ -26,7 +26,7 @@ if ($wp_version < '2.7') {
|
|
26 |
if (!class_exists('ThemeMyLogin')) {
|
27 |
class ThemeMyLogin {
|
28 |
|
29 |
-
var $version = '3.2.
|
30 |
var $options = array();
|
31 |
var $permalink = '';
|
32 |
|
@@ -36,7 +36,7 @@ if (!class_exists('ThemeMyLogin')) {
|
|
36 |
|
37 |
function __construct() {
|
38 |
|
39 |
-
load_plugin_textdomain('theme-my-login', '
|
40 |
|
41 |
register_activation_hook ( __FILE__, array( &$this, 'Activate' ) );
|
42 |
register_deactivation_hook ( __FILE__, array( &$this, 'Deactivate' ) );
|
@@ -104,8 +104,8 @@ if (!class_exists('ThemeMyLogin')) {
|
|
104 |
|
105 |
$user_roles = array('subscriber', 'contributor', 'author', 'editor', 'administrator');
|
106 |
foreach ($user_roles as $role) {
|
107 |
-
$dashboard_url[$role] =
|
108 |
-
$profile_url[$role] =
|
109 |
}
|
110 |
$this->options['widget_dashboard_url'] = $dashboard_url;
|
111 |
$this->options['widget_profile_url'] = $profile_url;
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/wordpress-plugins/theme-my-login-plugin
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
+
Version: 3.2.2
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
*/
|
26 |
if (!class_exists('ThemeMyLogin')) {
|
27 |
class ThemeMyLogin {
|
28 |
|
29 |
+
var $version = '3.2.2';
|
30 |
var $options = array();
|
31 |
var $permalink = '';
|
32 |
|
36 |
|
37 |
function __construct() {
|
38 |
|
39 |
+
load_plugin_textdomain('theme-my-login', 'wp-content/plugins/theme-my-login/language', 'language');
|
40 |
|
41 |
register_activation_hook ( __FILE__, array( &$this, 'Activate' ) );
|
42 |
register_deactivation_hook ( __FILE__, array( &$this, 'Deactivate' ) );
|
104 |
|
105 |
$user_roles = array('subscriber', 'contributor', 'author', 'editor', 'administrator');
|
106 |
foreach ($user_roles as $role) {
|
107 |
+
$dashboard_url[$role] = '';
|
108 |
+
$profile_url[$role] = '';
|
109 |
}
|
110 |
$this->options['widget_dashboard_url'] = $dashboard_url;
|
111 |
$this->options['widget_profile_url'] = $profile_url;
|