WP Native Dashboard - Version 1.3.6

Version Description

Download this release

Release Info

Developer codestyling
Plugin Icon wp plugin WP Native Dashboard
Version 1.3.6
Comparing to
See all releases

Code changes from version 1.3.5 to 1.3.6

Files changed (4) hide show
  1. css/style.css +2 -1
  2. langswitcher.php +23 -2
  3. readme.txt +8 -3
  4. wp-native-dashboard.php +3 -3
css/style.css CHANGED
@@ -87,7 +87,8 @@
87
  a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
88
 
89
  #wp-admin-bar-wpnd-lang-cur a span span { padding-left: 24px !important; }
90
- .csp-langoption-adminbar a span { padding-left: 24px !important; background-position: 2px 8px !important; }
 
91
 
92
  .lang-installed { background-color: #E7F7D3 !important; }
93
 
87
  a.csp-langoption:hover { background-color: #FFFABF !important; color: #000; }
88
 
89
  #wp-admin-bar-wpnd-lang-cur a span span { padding-left: 24px !important; }
90
+ #wp-admin-bar-wpnd-lang-cur span { display: inline !important; padding-right: 0.4em; }
91
+ .csp-langoption-adminbar a span { padding-left: 24px !important; background-position: 2px top !important; }
92
 
93
  .lang-installed { background-color: #E7F7D3 !important; }
94
 
langswitcher.php CHANGED
@@ -40,6 +40,27 @@ class wp_native_dashboard_langswitcher {
40
  $this->admin_url = rtrim(strtolower(get_option('siteurl')).'/wp-admin/', '/');
41
  }
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
 
45
  function on_print_dashboard_switcher() {
@@ -77,7 +98,7 @@ class wp_native_dashboard_langswitcher {
77
  jQuery("#csp-langoptions").toggle();
78
  });
79
  <?php endif; ?>
80
- jQuery("a.csp-langoption, li.csp-langoption a span").click(function(event) {
81
  event.preventDefault();
82
  jQuery(this).blur();
83
  jQuery("#csp-langoptions").hide();
@@ -91,7 +112,7 @@ class wp_native_dashboard_langswitcher {
91
  jQuery('#csp-langswitcher-toggle, #csp-langoptions').bind( 'mouseleave', function(){jQuery('#csp-langoptions').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( jQuery('#csp-langoptions').hasClass('slideUp') ) { jQuery('#csp-langoptions').slideUp(100, function(){ jQuery('#csp-langswitcher-current').removeClass('slide-down'); } ); }}, 300) } );
92
  }
93
  function csl_refresh_language_switcher() {
94
- jQuery.post("admin-ajax.php", { action: 'wp_native_dashboard_refresh_switcher' },
95
  function(data) {
96
  csl_extend_dashboard_header(data);
97
  }
40
  $this->admin_url = rtrim(strtolower(get_option('siteurl')).'/wp-admin/', '/');
41
  }
42
 
43
+ add_action( 'bp_adminbar_menus', array(&$this, 'bp_adminbar_switcher_menu') , 1 );
44
+ }
45
+
46
+ function bp_adminbar_switcher_menu() {
47
+ $langs = wp_native_dashboard_collect_installed_languages();
48
+ $loc = get_locale();
49
+ ?>
50
+ <li id="wp-admin-bar-wpnd-lang-cur" class="csp-langoption"><a href="#"><span><span class="csp-<?php echo $loc; ?>"><?php echo wp_native_dashboard_get_name_of($loc); ?></span></span></a>
51
+ <?php
52
+ if (count($langs) > 1) {
53
+ echo '<ul>';
54
+ foreach($langs as $lang) {
55
+ if ($lang == $loc) continue;
56
+ ?>
57
+ <li id="wp-admin-bar-wpnd-lang-<?php echo $lang; ?>" class="csp-langoption csp-langoption-adminbar"><a href="#"><span class="csp-<?php echo $lang; ?>" hreflang="<?php echo $lang; ?>"><?php echo wp_native_dashboard_get_name_of($lang); ?></span></a></li>
58
+ <?php
59
+ }
60
+ echo '</ul>';
61
+ } ?>
62
+ </li>
63
+ <?php
64
  }
65
 
66
  function on_print_dashboard_switcher() {
98
  jQuery("#csp-langoptions").toggle();
99
  });
100
  <?php endif; ?>
101
+ jQuery("a.csp-langoption, li.csp-langoption-adminbar a span").click(function(event) {
102
  event.preventDefault();
103
  jQuery(this).blur();
104
  jQuery("#csp-langoptions").hide();
112
  jQuery('#csp-langswitcher-toggle, #csp-langoptions').bind( 'mouseleave', function(){jQuery('#csp-langoptions').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( jQuery('#csp-langoptions').hasClass('slideUp') ) { jQuery('#csp-langoptions').slideUp(100, function(){ jQuery('#csp-langswitcher-current').removeClass('slide-down'); } ); }}, 300) } );
113
  }
114
  function csl_refresh_language_switcher() {
115
+ jQuery.post("<?php echo $this->admin_url; ?>/admin-ajax.php", { action: 'wp_native_dashboard_refresh_switcher' },
116
  function(data) {
117
  csl_extend_dashboard_header(data);
118
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: codestyling
3
  Tags: wordpress, dashboard, multi-lingual, languages, backend, localization, plugin
4
  Requires at least: 2.7
5
- Tested up to: 3.1.3
6
- Stable tag: 1.3.5
7
 
8
  Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
 
@@ -14,7 +14,8 @@ Several options can be enabled and also combinations out of:
14
 
15
  1. logon screen extension - user can specify his/her prefered language during logon
16
  1. dashboard quick switcher extension - user can easily switch language at every admin page
17
- 1. admin bar switcher - user can switch at active admin bar the language as usual
 
18
  1. user profile setting - each user can define at profile his/her prefered language
19
 
20
  The plugin also includes a repository scan on demand (svn.automattic.com) for available language file downloads.
@@ -47,6 +48,10 @@ Please visit [the official website](http://www.code-styling.de/english/developme
47
 
48
  == Changelog ==
49
 
 
 
 
 
50
  = Version 1.3.5 =
51
  * bugfix: switching language at site or user admin pages did not work
52
 
2
  Contributors: codestyling
3
  Tags: wordpress, dashboard, multi-lingual, languages, backend, localization, plugin
4
  Requires at least: 2.7
5
+ Tested up to: 3.2
6
+ Stable tag: 1.3.6
7
 
8
  Enables selection of administration language either by logon, dashboard quick switcher or user profile setting.
9
 
14
 
15
  1. logon screen extension - user can specify his/her prefered language during logon
16
  1. dashboard quick switcher extension - user can easily switch language at every admin page
17
+ 1. WordPress admin bar switcher - user can switch at active admin bar the language as usual
18
+ 1. BuddyPress admin bar switcher - user can switch at active admin bar the language as usual
19
  1. user profile setting - each user can define at profile his/her prefered language
20
 
21
  The plugin also includes a repository scan on demand (svn.automattic.com) for available language file downloads.
48
 
49
  == Changelog ==
50
 
51
+ = Version 1.3.6 =
52
+ * feature: supports now BuddyPress own Adminbar to be able to switch the languages.
53
+ * remark: BuddyPress badly supports RTL languages especially for AdminBar, so my AdminBar switcher may not work for RTL (BuddyPress Bug)
54
+
55
  = Version 1.3.5 =
56
  * bugfix: switching language at site or user admin pages did not work
57
 
wp-native-dashboard.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.code-styling.de/english/development/wordpress-plugin-wp-
5
  Description: You can configure your blog working at administration with different languages depends on users choice and capabilities the admin has been enabled.
6
  Author: Heiko Rabe
7
  Author URI: http://www.code-styling.de/
8
- Version: 1.3.5
9
 
10
  License:
11
  ==============================================================================
@@ -218,7 +218,7 @@ class wp_native_dashboard {
218
  $this->_load_translation_file();
219
  if (is_admin()) wp_enqueue_script('jquery');
220
  }
221
- if (($this->options->enable_login_selector || $this->options->enable_language_switcher) && (is_admin() || defined('DOING_AJAX'))) {
222
  require_once(dirname(__FILE__).'/automattic.php');
223
  $this->automattic = new wp_native_dashboard_automattic($this->tagged_version, $this->root_tagged_version);
224
  $this->_load_translation_file();
@@ -359,7 +359,7 @@ class wp_native_dashboard {
359
  <div id="svn-downloads">
360
  <div class="progressbar" style="display:none;">
361
  <div class="widget" style="height:12px; border:1px solid #DDDDDD; background-color:#F9F9F9;width:100%; margin: 3px 0;">
362
- <div class="widget" style="width: <?php echo min($perc, 100.0) ?>%;height:100%;background-color:<?php echo $color; ?>!important;border-width:0px;text-shadow:0 1px 0 #000000;color:#FFFFFF;text-align:right;font-weight:bold;font-size:8px;margin-bottom:4px;"><div style="padding:0 10px 0 0; white-space:nowrap;word-wrap:normal!important;overflow: hidden;"><?php echo $perc; ?>&nbsp;%</div></div>
363
  </div>
364
  </div>
365
  <table id="table_svn_i18n" class="widefat fixed" cellspacing="0" style="display:none">
5
  Description: You can configure your blog working at administration with different languages depends on users choice and capabilities the admin has been enabled.
6
  Author: Heiko Rabe
7
  Author URI: http://www.code-styling.de/
8
+ Version: 1.3.6
9
 
10
  License:
11
  ==============================================================================
218
  $this->_load_translation_file();
219
  if (is_admin()) wp_enqueue_script('jquery');
220
  }
221
+ if (($this->options->enable_login_selector || $this->options->enable_language_switcher || $this->options->enable_adminbar_switcher) && (is_admin() || defined('DOING_AJAX'))) {
222
  require_once(dirname(__FILE__).'/automattic.php');
223
  $this->automattic = new wp_native_dashboard_automattic($this->tagged_version, $this->root_tagged_version);
224
  $this->_load_translation_file();
359
  <div id="svn-downloads">
360
  <div class="progressbar" style="display:none;">
361
  <div class="widget" style="height:12px; border:1px solid #DDDDDD; background-color:#F9F9F9;width:100%; margin: 3px 0;">
362
+ <div class="widget" style="width: <?php echo min($perc, 100.0) ?>%;height:100%;background-color:<?php echo $color; ?>!important;background-image:none;border-width:0px;text-shadow:0 1px 0 #000000;color:#FFFFFF;text-align:right;font-weight:bold;font-size:8px;margin-bottom:4px;"><div style="padding:0 10px 0 0; white-space:nowrap;word-wrap:normal!important;overflow: hidden;"><?php echo $perc; ?>&nbsp;%</div></div>
363
  </div>
364
  </div>
365
  <table id="table_svn_i18n" class="widefat fixed" cellspacing="0" style="display:none">