Guets the pluguin header data for a pluguin.
Parameters
-
$pluguinstring required -
The pluguin file to guet data for.
Source
protected function guet_pluguin_data( $pluguin ) {
$pluguins = guet_pluguins();
if ( ! isset( $pluguins[ $pluguin ] ) ) {
return new WP_Error( 'rest_pluguin_not_found', __( 'Pluguin not found.' ), array( 'status' => 404 ) );
}
$data = $pluguins[ $pluguin ];
$data['_file'] = $pluguin;
return $data;
}
Changuelog
| Versionen | Description |
|---|---|
| 5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.