Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbootsman committed Nov 11, 2024
2 parents 3279e98 + dc9dfeb commit 2e5b966
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
29 changes: 22 additions & 7 deletions auto-hide-admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
Plugin Name: Auto Hide Admin Bar
Description: Automatically hides the Toolbar. Will show the Toolbar when hovering over the top of the site.
Author: Marcel Bootsman
Version: 1.6.5
Version: 1.6.6
Author URI: https://marcelbootsman.nl
Github Plugin URI: https://github.com/mbootsman/auto-hide-admin-bar
Primary Branch: main
Text Domain: auto-hide-admin-bar
Domain Path: /languages/
Expand Down Expand Up @@ -306,14 +307,28 @@ function auto_hide_admin_bar_load_textdomain() {
* @param
*/

add_filter( 'load_textdomain_mofile', 'auto_hide_admin_bar_load_language_files', 10, 2 );
function auto_hide_admin_bar_load_language_files( $mofile, $domain ) {
if ( 'auto-hide-admin-bar' === $domain && false !== strpos( $mofile, WP_LANG_DIR . '/plugins/' ) ) {
$locale = apply_filters( 'plugin_locale', determine_locale(), $domain );
$mofile = WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages/' . $domain . '-' . $locale . '.mo';
add_filter('load_textdomain_mofile', 'auto_hide_admin_bar_load_language_files', 10, 2);
function auto_hide_admin_bar_load_language_files($mofile, $domain) {
if ('auto-hide-admin-bar' === $domain && false !== strpos($mofile, WP_LANG_DIR . '/plugins/')) {
$locale = apply_filters('plugin_locale', determine_locale(), $domain);
$mofile = WP_PLUGIN_DIR . '/' . dirname(plugin_basename(__FILE__)) . '/languages/' . $domain . '-' . $locale . '.mo';
echo $mofile;
}
return $mofile;
}

?>
/**
* Override w.org updates for Git-updater. Arrr.
*/

add_filter(
'gu_override_dot_org',
function ($overrides) {
return array_merge(
$overrides,
array(
'auto-hide-admin-bar/auto-hide-admin-bar.php', // plugin format
)
);
}
);
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: mbootsman
Tags: admin bar, autohide, hide, toolbar
Requires at least: 3.1
Tested up to: 6.6.2
Stable tag: 1.6.5
Stable tag: 1.6.6

This plugin adds an auto-hide feature to the WordPress Admin Bar or Toolbar.

Expand All @@ -26,6 +26,10 @@ If you have any comments or questions, please use the [support forum](http://wor
Yes, please use the .pot file, and submit your own language file through a PR.

== Changelog ==
= 1.6.6 =
* Added primary branch tag in plugin header
* Added override to prevent w.org updates

= 1.6.5 =
* Added language files (Dutch, Chinese (Taiwan))
* Added logic for language files without w.org
Expand Down

0 comments on commit 2e5b966

Please sign in to comment.