From 0505d501c5871d75a20dc31c8a77108bc7b2d28e Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Tue, 26 Nov 2024 10:41:49 -0600 Subject: [PATCH] Document mobile/tablet conditionals. --- src/includes/conditionals.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/includes/conditionals.php b/src/includes/conditionals.php index ebdbb0bc..b115c63a 100644 --- a/src/includes/conditionals.php +++ b/src/includes/conditionals.php @@ -87,7 +87,15 @@ function mc_is_mobile() { if ( function_exists( 'wp_is_mobile' ) ) { $mobile = wp_is_mobile(); } - + /** + * Add custom logic to detect mobile environments for My Calendar. + * + * @hook mc_is_mobile + * + * @param bool $mobile true if mobile user agent detected. + * + * @return bool + */ return apply_filters( 'mc_is_mobile', $mobile ); } @@ -97,7 +105,15 @@ function mc_is_mobile() { * @return boolean */ function mc_is_tablet() { - + /** + * Add custom logic to detect tablet environments for My Calendar. + * + * @hook mc_is_tablet + * + * @param bool $tablet true if mobile user agent detected. Default false. + * + * @return bool + */ return apply_filters( 'mc_is_tablet', false ); }