Skip to content

Commit

Permalink
Document mobile/tablet conditionals.
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Nov 26, 2024
1 parent 8cdf2a6 commit 0505d50
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/includes/conditionals.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand All @@ -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 );
}

Expand Down

0 comments on commit 0505d50

Please sign in to comment.