Skip to content

Commit

Permalink
Fixed issue of custom admin submenu link overwriting other links
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdavidmorgan committed Aug 1, 2018
1 parent bedc6b0 commit 0dd319d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== Music Lite ===

Version: 1.2.1
Version: 1.2.2
Contributors: organicthemes, itsdavidmorgan
Tags: blog, portfolio, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, custom-logo, featured-images, featured-image-header, flexible-header, full-width-template, translation-ready, sticky-post, threaded-comments, editor-style, theme-options, footer-widgets
Requires at least: 4.8
Expand Down Expand Up @@ -48,6 +48,9 @@ Music Lite is distributed under the terms of the GNU GPL

== Changelog ==

== 1.2.2 ==
* Fixed issue of custom admin submenu link overwriting other links

== 1.2.1 ==
* Localization update
* Added submenu link
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ function music_lite_enqueue_admin_scripts( $hook ) {
function music_lite_support_link() {
global $submenu;
$support_link = esc_url( 'https://organicthemes.com/support/' );
$submenu['themes.php'][6] = array( __( 'Theme Support', 'music-lite' ), 'manage_options', $support_link );
$submenu['themes.php'][] = array( __( 'Theme Support', 'music-lite' ), 'manage_options', $support_link );
}
add_action( 'admin_menu', 'music_lite_support_link' );

function music_lite_upgrade_link() {
global $submenu;
$upgrade_link = esc_url( 'https://organicthemes.com/theme/music-theme/' );
$submenu['themes.php'][7] = array( __( 'Theme Upgrade', 'music-lite' ), 'manage_options', $upgrade_link );
$submenu['themes.php'][] = array( __( 'Theme Upgrade', 'music-lite' ), 'manage_options', $upgrade_link );
}
add_action( 'admin_menu', 'music_lite_upgrade_link' );

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Author URI: https://organicthemes.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Version: 1.2.1
Version: 1.2.2
Text Domain: music-lite
Domain Path: /languages/
Tags: blog, portfolio, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, custom-logo, featured-images, featured-image-header, flexible-header, full-width-template, translation-ready, threaded-comments, editor-style, theme-options, footer-widgets
Expand Down

0 comments on commit 0dd319d

Please sign in to comment.