Skip to content

Commit

Permalink
Add prefix to new function name.
Browse files Browse the repository at this point in the history
Minior formatting updates as well.
  • Loading branch information
toolstack committed May 23, 2017
1 parent f482372 commit a5beffb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gp-templates/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function prepare_original( $text ) {
*
* @return array The sorted entries.
*/
function sort_glossary_entries_terms( $glossary_entries ) {
function gp_sort_glossary_entries_terms( $glossary_entries ) {
if ( empty ( $glossary_entries ) ) {
return;
}
Expand Down Expand Up @@ -97,7 +97,7 @@ function map_glossary_entries_to_translation_originals( $translation, $glossary,
}

if( null === $glossary_entries_terms || ! is_array( $glossary_entries_terms ) ) {
$glossary_entries_terms = sort_glossary_entries_terms( $glossary_entries );
$glossary_entries_terms = gp_sort_glossary_entries_terms( $glossary_entries );
}

// Save our current singular/plural strings before attempting any markup change. Also escape now, since we're going to add some html.
Expand Down
4 changes: 2 additions & 2 deletions gp-templates/translation-row.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
*/
$more_links = apply_filters( 'gp_translation_row_template_more_links', $more_links, $project, $locale, $translation_set, $t );

if( ! isset( $glossary_entries_terms ) ) {
if ( ! isset( $glossary_entries_terms ) ) {
$glossary_entries = $glossary->get_entries();
$glossary_entries_terms = sort_glossary_entries_terms( $glossary_entries );
$glossary_entries_terms = gp_sort_glossary_entries_terms( $glossary_entries );
}

$t = map_glossary_entries_to_translation_originals( $t, $glossary, $glossary_entries_terms );
Expand Down
2 changes: 1 addition & 1 deletion gp-templates/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
<?php
if ( $glossary ) {
$glossary_entries = $glossary->get_entries();
$glossary_entries_terms = sort_glossary_entries_terms( $glossary_entries );
$glossary_entries_terms = gp_sort_glossary_entries_terms( $glossary_entries );
}
?>
<?php foreach( $translations as $t ):
Expand Down

0 comments on commit a5beffb

Please sign in to comment.