amp_validation_error_source_file_editor_url_template

apply_filters( 'amp_validation_error_source_file_editor_url_template',  string|null $editor_url_template )

Description #

Filters the template for the URL for linking to an external editor to open a file for editing.

Users of IDEs that support opening files in via web protocols can use this filter to override the edit link to result in their editor opening rather than the theme/plugin editor.
The initial filtered value is null, requiring extension plugins to supply the URL template string themselves. If no template string is provided, links to the theme/plugin editors will be provided if available. For example, for an extension plugin to cause file edit links to open in PhpStorm, the following filter can be used:
add_filter( 'amp_validation_error_source_file_editor_url_template', function () { return 'phpstorm://open?file={{file}}&line={{line}}'; } );
For a template to be considered, the string '{{file}}' must be present in the filtered value.


Parameters #

$editor_url_template

Editor URL template.



Changelog #

Changelog
Version Description
1.4 Introduced.