Changeset 53003
- Timestamp:
- 03/28/2022 01:22:38 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-debug-data.php
r52021 r53003 1472 1472 1473 1473 /** 1474 * Returns the value of a MySQL variable.1474 * Returns the value of a MySQL system variable. 1475 1475 * 1476 1476 * @since 5.9.0 … … 1478 1478 * @global wpdb $wpdb WordPress database abstraction object. 1479 1479 * 1480 * @param string $ var Name of the MySQLvariable.1480 * @param string $mysql_var Name of the MySQL system variable. 1481 1481 * @return string|null The variable value on success. Null if the variable does not exist. 1482 1482 */ 1483 public static function get_mysql_var( $ var ) {1483 public static function get_mysql_var( $mysql_var ) { 1484 1484 global $wpdb; 1485 1485 1486 1486 $result = $wpdb->get_row( 1487 $wpdb->prepare( 'SHOW VARIABLES LIKE %s', $ var ),1487 $wpdb->prepare( 'SHOW VARIABLES LIKE %s', $mysql_var ), 1488 1488 ARRAY_A 1489 1489 ); … … 1501 1501 * @since 5.2.0 1502 1502 * 1503 * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data ` function.1504 * @param string $ typeThe data type to return, either 'info' or 'debug'.1503 * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data()` function. 1504 * @param string $data_type The data type to return, either 'info' or 'debug'. 1505 1505 * @return string The formatted data. 1506 1506 */ 1507 public static function format( $info_array, $ type ) {1507 public static function format( $info_array, $data_type ) { 1508 1508 $return = "`\n"; 1509 1509 … … 1514 1514 } 1515 1515 1516 $section_label = 'debug' === $ type ? $section : $details['label'];1516 $section_label = 'debug' === $data_type ? $section : $details['label']; 1517 1517 1518 1518 $return .= sprintf( … … 1527 1527 } 1528 1528 1529 if ( 'debug' === $ type && isset( $field['debug'] ) ) {1529 if ( 'debug' === $data_type && isset( $field['debug'] ) ) { 1530 1530 $debug_data = $field['debug']; 1531 1531 } else { … … 1548 1548 } 1549 1549 1550 if ( 'debug' === $ type ) {1550 if ( 'debug' === $data_type ) { 1551 1551 $label = $field_name; 1552 1552 } else {
Note: See TracChangeset
for help on using the changeset viewer.