Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use separate filter
Co-authored-by: Jesús Amieiro Becerra <1667814+amieiro@users.noreply.github.com>
  • Loading branch information
swissspidy and amieiro authored Dec 22, 2023
commit 5ea9dcfc35d1d6cc2a4adc91c44a13596cefe9ec
12 changes: 11 additions & 1 deletion gp-includes/formats/format-php.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,17 @@ public function print_exported_file( $project, $locale, $translation_set, $entri
$project_id_version = implode( ' - ', $project_tree );

/** This filter is documented in gp-includes/formats/format-pomo.php */
$project_id_version = apply_filters( 'gp_pomo_export_project_id_version', $project_id_version, $project_tree );
/**
* Filter the project name and version header before export.
*
* @since 4.0.0
*
* @param string $project_id_version The default project name/version to use in the header and
* comments ( "Parent - Child - GrandChild - etc." by default).
* @param array $project_tree An array of the parent/child project tree, ordered from Parent
* to child to grandchild to etc...
*/
$project_id_version = apply_filters( 'gp_php_export_project_id_version', $project_id_version, $project_tree );

$result = array(
'x-generator' => 'GlotPress/' . GP_VERSION,
Expand Down