Make WordPress Core


Ignore:
Timestamp:
06/15/2017 12:04:56 PM (9 years ago)
Author:
johnbillion
Message:

General: Introduce a wp_is_mobile filter for controlling whether a request should be treated as coming from a mobile device.

Props PressLabs

Fixes #41023

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/vars.php

    r39638 r40907  
    140140        }
    141141
    142         return $is_mobile;
     142        /**
     143         * Filters whether the request should be treated as coming from a mobile device or not.
     144         *
     145         * @since 4.9.0
     146         *
     147         * @param bool $is_mobile Whether the request is from a mobile device or not.
     148         */
     149        return apply_filters( 'wp_is_mobile', $is_mobile );
    143150}
Note: See TracChangeset for help on using the changeset viewer.