Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 2884bcb

Browse files
committed
Hide menu by using CSS
1 parent a743e3f commit 2884bcb

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.11
1+
1.1.11+1

admin/class-defer-js-admin.php

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,19 @@ public function register_options()
6767

6868
public function register_menu()
6969
{
70-
// Temporary disable icon on menu
71-
return null;
72-
73-
// // Remove old menu
74-
// remove_menu_page(DEFER_JS_PLUGIN_NAME);
75-
76-
// // Create new top-level menu
77-
// add_menu_page(
78-
// __('Configure defer.js settings'),
79-
// __('My defer.js'),
80-
// 'administrator',
81-
// DEFER_JS_PLUGIN_NAME,
82-
// array($this, 'options_page'),
83-
// plugins_url('/icon.jpg', __FILE__),
84-
// $this->get_menu_position()
85-
// );
70+
// Remove old menu
71+
remove_menu_page(DEFER_JS_PLUGIN_NAME);
72+
73+
// Create new top-level menu
74+
add_menu_page(
75+
__('Configure defer.js settings'),
76+
__('My defer.js'),
77+
'administrator',
78+
DEFER_JS_PLUGIN_NAME,
79+
array($this, 'options_page'),
80+
plugins_url('/icon.jpg', __FILE__),
81+
$this->get_menu_position()
82+
);
8683
}
8784

8885
public function register_menu_plugin_options($links)

admin/css/defer-js-admin.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.toplevel_page_defer-wordpress {
2+
display: none;
3+
}
4+
15
.toplevel_page_defer-wordpress .menu-top img {
26
width: 16px;
37
height: 16px;
@@ -82,4 +86,4 @@
8286
margin-top: 0;
8387
margin-left: 70%;
8488
}
85-
}
89+
}

defer-wordpress.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
* Currently plugin version.
2121
* Rename this for your plugin and update it as you release new versions.
2222
*/
23-
define('DEFER_WORDPRESS_PLUGIN_VERSION', '1.1.11');
23+
define('DEFER_WORDPRESS_PLUGIN_VERSION', '1.1.11+1');
2424
define('DEFER_JS_PREFIX', 'shinsenter_deferjs_');
2525

2626
/*
2727
* @wordpress-plugin
2828
* Plugin Name: An efficient lazy loader (defer.js)
2929
* Plugin URI: https://wordpress.org/plugins/shins-pageload-magic/
3030
* Description: ⚡️ A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy load almost anything.
31-
* Version: 1.1.11
31+
* Version: 1.1.11+1
3232
* Author: Mai Nhut Tan
3333
* Author URI: https://code.shin.company/
3434
* License: GPL-2.0+

0 commit comments

Comments
 (0)