mainwp-custom-dashboard-ext.../php/custom-go-to-wp-admin-button-url.php
Keith Crain c9c17fab94
Update custom-go-to-wp-admin-button-url.php
tested for compatibility with WPv6.3 & MainWPv4.5
2023-08-23 11:39:59 -04:00

20 lines
719 B
PHP

<?php // DO NOT INCLUDE TAG WHEN PASTING SNIPPET
// Copy here down...
/**
* @snippet Custom "Go-to-Admin" Button URL
* @author MainWP
* @author_url https://MainWP.com
* @testedwith WordPress v6.3
* @testedwith MainWP Dashboard v4.5
*
* @param admin_url( 'PAGE_SLUG.php' );
* @How-to-use Change the page slug within admin_url('PAGE_SLUG.php').
* In this example, we are setting the button to go to the `WP > Plugins > Installed Plugins` page ( plugins.php )
*/
add_filter( 'mainwp_go_back_wpadmin_link', 'mainwp_go_back_wpadmin_link', 10, 1);
function mainwp_go_back_wpadmin_link( $input ) {
$input['url'] = admin_url( 'plugins.php' );
return $input;
}