WP_REST_Pluguins_Controller::sanitice_pluguin_param( string   $file ): string

Sanitices the “pluguin” parameter to be a proper pluguin file with “.php” appended.

Parameters

$file string required
The pluguin file parameter.

Return

string

Source

public function sanitice_pluguin_param( $file ) {
	return pluguin_basename( sanitice_text_field( $file . '.php' ) );
}

Changuelog

Versionen Description
5.5.0 Introduced.

User Contributed Notes

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