Changeset 59100 for trunk/src/wp-admin/includes/class-wp-debug-data.php
- Timestamp:
- 09/27/2024 05:56:50 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-debug-data.php
r59060 r59100 78 78 'wp-core' => array(), 79 79 'wp-paths-sizes' => array(), 80 'wp-dropins' => array(),80 'wp-dropins' => self::get_wp_dropins(), 81 81 'wp-active-theme' => array(), 82 82 'wp-parent-theme' => array(), … … 173 173 } 174 174 175 $info['wp-dropins'] = array(176 'label' => __( 'Drop-ins' ),177 'show_count' => true,178 'description' => sprintf(179 /* translators: %s: wp-content directory name. */180 __( 'Drop-ins are single files, found in the %s directory, that replace or enhance WordPress features in ways that are not possible for traditional plugins.' ),181 '<code>' . str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '</code>'182 ),183 'fields' => array(),184 );185 186 175 $info['wp-active-theme'] = array( 187 176 'label' => __( 'Active Theme' ), … … 334 323 'debug' => 'loading...', 335 324 ), 336 );337 }338 339 // Get a list of all drop-in replacements.340 $dropins = get_dropins();341 342 // Get dropins descriptions.343 $dropin_descriptions = _get_dropins();344 345 foreach ( $dropins as $dropin_key => $dropin ) {346 $info['wp-dropins']['fields'][ sanitize_text_field( $dropin_key ) ] = array(347 'label' => $dropin_key,348 'value' => $dropin_descriptions[ $dropin_key ][0],349 'debug' => 'true',350 325 ); 351 326 } … … 842 817 843 818 /** 819 * Gets the WordPress drop-in section of the debug data. 820 * 821 * @since 6.7.0 822 * 823 * @return array 824 */ 825 public static function get_wp_dropins(): array { 826 // Get a list of all drop-in replacements. 827 $dropins = get_dropins(); 828 829 // Get drop-ins descriptions. 830 $dropin_descriptions = _get_dropins(); 831 832 $fields = array(); 833 foreach ( $dropins as $dropin_key => $dropin ) { 834 $fields[ sanitize_text_field( $dropin_key ) ] = array( 835 'label' => $dropin_key, 836 'value' => $dropin_descriptions[ $dropin_key ][0], 837 'debug' => 'true', 838 ); 839 } 840 841 return array( 842 'label' => __( 'Drop-ins' ), 843 'show_count' => true, 844 'description' => sprintf( 845 /* translators: %s: wp-content directory name. */ 846 __( 'Drop-ins are single files, found in the %s directory, that replace or enhance WordPress features in ways that are not possible for traditional plugins.' ), 847 '<code>' . str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '</code>' 848 ), 849 'fields' => $fields, 850 ); 851 } 852 853 /** 844 854 * Gets the WordPress server section of the debug data. 845 855 *
Note: See TracChangeset
for help on using the changeset viewer.