[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-templates/ -> helper-functions.php (summary)

Defines helper functions used by GlotPress.

File Size: 405 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  prepare_original()
  gp_prepare_translation_textarea()
  gp_sort_glossary_entries_terms()
  map_glossary_entries_to_translation_originals()
  textareas()
  display_status()
  references()
  gp_translations_bulk_actions_toolbar()

Functions
Functions that are not part of a class:

prepare_original( $text )   X-Ref
Prepare an original string to be printed out in a translation row by adding encoding special
characters, adding glossary entires and other markup.

param: string $text A single style handle to enqueue or an array or style handles to enqueue.
return: string The prepared string for output.

gp_prepare_translation_textarea( $text )   X-Ref
Prepares a translation string to be printed out in a translation row by adding an 'extra' return/newline if
it starts with one.

param: string $text A single style handle to enqueue or an array or style handles to enqueue.
since: 2.4.0
return: string The prepared string for output.

gp_sort_glossary_entries_terms( $glossary_entries )   X-Ref
Sort a set of glossary entries by length for use in map_glossary_entries_to_translation_originals().

param: array $glossary_entries An array of glossary entries to sort.
return: array The sorted entries.

map_glossary_entries_to_translation_originals( $translation, $glossary, $glossary_entries_terms = null )   X-Ref
Add markup to a translation original to identify the glossary terms.

param: GP_Translation $translation            A GP Translation object.
param: GP_Glossary    $glossary               A GP Glossary object.
param: array          $glossary_entries_terms A list of terms to highligh.
return: obj The marked up translation entry.

textareas( $entry, $permissions, $index = 0 )   X-Ref
No description

display_status( $status )   X-Ref
No description

references( $project, $entry )   X-Ref
No description

gp_translations_bulk_actions_toolbar( $bulk_action, $can_write, $translation_set, $location = 'top' )   X-Ref
Output the bulk actions toolbar in the translations page.

param: string $bulk_action     The URL to submit the form to.
param: string $can_write       Can the current user write translations to the database.
param: string $translation_set The current translation set.
param: string $location        The location of this toolbar, used to make id's unique for each instance on a page.



Generated: Sun Jun 16 01:02:50 2019 Cross-referenced by PHPXref 0.7.1