Function
Determine if the current page is a TML page.
tml_admin_is_plugin_page( string $page = '' )
Parameters
-
$pagestring Default'' - The page name.
Return
boolean
True if the current page is the specified page, false if not.
Source
function tml_admin_is_plugin_page( $page = '' ) {
global $plugin_page;
if ( ! empty( $page ) ) {
return ( "theme-my-login-$page" === $plugin_page ) || ( "tml-$page" === $plugin_page );
}
return ( strpos( $plugin_page, 'theme-my-login' ) === 0 ) || ( strpos( $plugin_page, 'tml-' ) === 0 );
}
Uses
Changelog
| Version | Description |
|---|---|
| 7.0 | Introduced. |