Skip to content

Commit

Permalink
Changed TGM menu function for theme directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Jul 22, 2019
1 parent dd2a7f3 commit 94c882d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions inc/class-tgm-plugin-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,15 +731,7 @@ public function admin_menu() {
* @param array $args Menu item configuration.
*/
protected function add_admin_menu( array $args ) {
if ( has_filter( 'tgmpa_admin_menu_use_add_theme_page' ) ) {
_deprecated_function( 'The "tgmpa_admin_menu_use_add_theme_page" filter', '2.5.0', esc_html__( 'Set the parent_slug config variable instead.', 'vantage' ) );
}

if ( 'themes.php' === $this->parent_slug ) {
$this->page_hook = call_user_func( 'add_theme_page', $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
} else {
$this->page_hook = call_user_func( 'add_submenu_page', $args['parent_slug'], $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
}
$this->page_hook = add_theme_page( $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
}

/**
Expand Down

1 comment on commit 94c882d

@Misplon
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference: TGMPA/TGM-Plugin-Activation#519. See item: Adjust menu location & capability config variables - variables removed.

Please sign in to comment.