Creating a custom endpoint for the wp-admin only
-
I have created a custom menu item that shows a list of links to a sub page:
function my_admin_menu() { add_menu_page( __( 'Statistics', 'my-textdomain' ), __( 'Statistics', 'my-textdomain' ), 'manage_options', 'my-statistics', 'my_statistics', 'dashicons-schedule', ); } add_action( 'admin_menu', 'my_admin_menu' ); function my_statistics() { ?> <h1> <?php esc_html_e( 'Statistics', 'my-plugin-textdomain' ); ?> </h1> <ul> <li><a href="?object=123">Show statistics for object 123</a></li> <li><a href="?object=435">Show statistics for object 435</a></li> </ul> <?php }
How can I “register” the endpoint
/wp-admin/admin.php?page=my-statistics?object=123
and correctly hook it into WordPress?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Creating a custom endpoint for the wp-admin only’ is closed to new replies.