Astra_Admin_Settings::get_page_url( string $menu_slug )
Get and return page URL
Description
Parameters
- $menu_slug
-
(string) (Required) Menu name.
Return
(string) page url
Source
File: inc/core/class-astra-admin-settings.php
public static function get_page_url( $menu_slug ) {
$parent_page = self::$default_menu_position;
if ( strpos( $parent_page, '?' ) !== false ) {
$query_var = '&page=' . self::$plugin_slug;
} else {
$query_var = '?page=' . self::$plugin_slug;
}
$parent_page_url = admin_url( $parent_page . $query_var );
$url = $parent_page_url . '&action=' . $menu_slug;
return esc_url( $url );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.0 | Introduced. |