You can’t. Create a function that loads that file:
function load_admin_page_file()
{
require 'admin-members.php';
}
Then use that function name as callback argument.
In PHP 5.3 you can use a lambda:
add_menu_page(
'Members',
'Members',
'manage_options',
'members',
function() { require 'admin-members.php'; }
);
Related Posts:
- Reference external file as a function
- Add a Separator to the Admin Menu?
- Adding a custom admin page
- How to remove entire admin menu?
- Plugin to remove Admin menu items based on user role?
- Add my own button next to “Screen options” and “Help” in the admin
- How to show custom menu items in the WordPress android app?
- Remove ability to access certain admin menus
- Appearance->Editor not visible
- Custom WP_List_Table displays blank rows
- How do I set up a webhook?
- Admin pages have no content
- WordPress Left Hand Side Admin Menu Always Collapsed
- Reorder plugin items in the admin menu
- Re-ordering Admin Submenu Sections
- Add number new posts (post_status = pending) to administration menu [duplicate]
- add_submenu_page set for multiple roles [duplicate]
- How To Create User Specific Admin User Pages?
- Change the Default Pages Menu View in wp-admin
- How to change admin menu position of “Media”?
- Change top level menu item to point to custom submenu item
- Associating custom submenu item with post type of top level menu item
- Admin doesn’t have sufficient permissions to plugin’s page
- Remove Admin sidebar link
- Single category’s posts list in admin menu
- Dashboard menu missing
- WordPress Remove Submenus
- page not updating with database
- Why am I timing out when using the Menu Editor?
- 500 internal server error on wp-admin only
- How can I POST or GET to the same admin page from which I am POST-ing or GET-ing
- Output the admin menu_position for each item
- avoiding the display of certain categories to certain user roles at content entry time
- How can I add a menu item to the admin area?
- Backend Checkboxes working – but not visual?
- WordPress Admin Menu Order for ‘admin.php’ pages
- Give admin_menu permission to specific users
- Show all admin menus in a table
- Highlight active Admin Menu when added though add_menu_page
- require/include php file in add_menu()
- Create WordPress Menu Item Without Linking to a Custom Page
- Simple CSS admin pagination
- How to change the default url for ‘Posts’ link?
- Unsure how to add simple checkboxes that write to a small table to admin
- Add a link to the Admin menu
- Display admin sidebar into custom post pages if logged
- Modal window from within WordPress admin
- How do I remove dashboard access from specific user roles?
- How to save dismissable notice state in WP 4.2?
- Notification that the admin is online
- Remove admin AND editor from the “change role to” menu in user listing
- Modify CSS via Theme Control Panel
- Admin account only shows Profile and Dashboard with no activity
- Making Media Library “Alternative Text” Field Required
- Add extra field when admin create user
- How can I place the “Add New Post” contents on a custom page?
- How can I get an array/list of all current WordPress Admin Menu items?
- Admin Notices coding standard issue
- Restrict dashboard access for specific user roles to specific actions
- user-new.php less detailed after WP3.1; how to revert?
- How can I remove the “updates” menu in the WordPress Admin panel?
- Where does WordPress store a list of Super Admins?
- Get current logged in user under 3.1, re: remove “Howdy”
- How do I change Administrator to Super Administrator
- Hiding Admin Page While Keeping Menu Expanded
- How do you set up a WordPress blog with multiple authors to allow something like StackExchange’s “community wiki” feature?
- Add column to pages table
- wp-login behind nginx reverse-proxy inaccessible — bad redirect?
- One button on admin page works but not two
- How to display a WordPress notice on create_term action
- Display popup or admin-notice after add new categories
- Redirect in an Admin page
- When submitting the form site.com/blog/wp-admin it goes to site.com/wp-admin
- WordPress admin toolbar not loading styles after migration
- Access for adding subpages but not for pages
- I’m a super admin and I want to give an admin the ability to add new users…?
- Return User Meta text as links to post edit inside the user columns
- Order All Pages table in administration
- Show global Message in User Profiles with admin only Input field in WordPress Backend
- Is there a filter to remove or replace the post title’s link in the admin post table view (edit.php)?
- How to pass a specific post id from “all posts” list in Admin panel
- How to change the link of the wordpress logo in the admin bar?
- How should I setup the “Users” area to hand over to a client?
- Default scripts added to each admin page
- Settings API – Last two tabs not rendered separate
- WordPress Admin Panel Left Sidebar No showing on Post create page
- cannot access the wordpress dashboard after changing the site url
- Reset WordPress admin users to limit access
- Is it possible to push admin notices to one specific user instead of all users?
- Blank WordPress admin/dashboard (7 updates pending)
- Custom redirection when managing users in admin
- How to retain HTML5 Attributes on Markup
- Why doesn’t the Media Browser use thumbnail sized images?
- Improving this link color picker code
- Change Admin URL
- Change the Author name to a custom field?
- Creating an custom admin page for editing widgets
- Buddypress send admin notification email when new subscriber registers
- Background image in login showing in admin area
- What Role to assign remote site developer?