Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use menu_page_url instead of admin_url

For the toolbar link. This way, we don't have to hardcode the location and WordPress can figure it out on-the-fly.
  • Loading branch information...
commit a09762e86e3de9cc45c40bf59554f0062119ff83 1 parent aaf2c36
@mjangda mjangda authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  developer.php
View
2  developer.php
@@ -177,7 +177,7 @@ public function add_node_to_admin_bar( $wp_admin_bar ) {
'id' => self::PAGE_SLUG,
'title' => esc_html__( 'Developer', 'a8c-developer' ),
'parent' => 'top-secondary', // Off on the right side
- 'href' => admin_url( 'tools.php?page=' . self::PAGE_SLUG ),
+ 'href' => menu_page_url( self::PAGE_SLUG, false ),
'meta' => array(
'title' => esc_html__( 'View the Developer Helper settings and status page', 'a8c-developer' ),
),

5 comments on commit a09762e

@eduplessis

On front-end
Fatal error: Call to undefined function menu_page_url() in xxxxxxxxxxxxx\developer\developer.php on line 180

@mjangda
Owner

Lame; reverted.

@Viper007Bond

We could include the file where it's defined on the front-end. Should (probably) work fine.

@mjangda
Owner

The admin menu structure won't be available either, which is probably why that function isn't. I think hard-coding is good enough.

@Viper007Bond

Ah right.

Please sign in to comment.
Something went wrong with that request. Please try again.