WP_Debug_Data::get_wp_dropins(): array

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Gets the WordPress drop-in section of the debug data.

Return

array

Source

private static function get_wp_dropins(): array {
	// Get a list of all drop-in replacements.
	$dropins = get_dropins();

	// Get drop-ins descriptions.
	$dropin_descriptions = _get_dropins();

	$fields = array();
	foreach ( $dropins as $dropin_key => $dropin ) {
		$fields[ sanitize_text_field( $dropin_key ) ] = array(
			'label' => $dropin_key,
			'value' => $dropin_descriptions[ $dropin_key ][0],
			'debug' => 'true',
		);
	}

	return array(
		'label'       => __( 'Drop-ins' ),
		'show_count'  => true,
		'description' => sprintf(
			/* translators: %s: wp-content directory name. */
			__( '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.' ),
			'<code>' . str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '</code>'
		),
		'fields'      => $fields,
	);
}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.