Changeset 45015 for trunk/src/wp-includes/load.php
- Timestamp:
- 03/26/2019 10:25:47 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r44973 r45015 1502 1502 1503 1503 } 1504 1505 /** 1506 * Checks whether current request is a JSONP request, or is expecting a JSONP response. 1507 * 1508 * @since 5.2.0 1509 * 1510 * @return bool True if JSONP request, false otherwise. 1511 */ 1512 function wp_is_jsonp_request() { 1513 if ( ! isset( $_GET['_jsonp'] ) ) { 1514 return false; 1515 } 1516 1517 if ( ! function_exists( 'wp_check_jsonp_callback' ) ) { 1518 require_once ABSPATH . WPINC . '/functions.php'; 1519 } 1520 1521 $jsonp_callback = $_GET['_jsonp']; 1522 if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) { 1523 return false; 1524 } 1525 1526 /** This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */ 1527 $jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true ); 1528 1529 return $jsonp_enabled; 1530 1531 }
Note: See TracChangeset
for help on using the changeset viewer.