Changeset 51919 for trunk/src/wp-includes/pomo/po.php
- Timestamp:
- 10/18/2021 05:51:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pomo/po.php
r51636 r51919 37 37 * @return string msgid/msgstr PO entry for this PO file headers, doesn't contain newline at the end 38 38 */ 39 function export_headers() {39 public function export_headers() { 40 40 $header_string = ''; 41 41 foreach ( $this->headers as $header => $value ) { … … 56 56 * @return string sequence of mgsgid/msgstr PO strings, doesn't containt newline at the end 57 57 */ 58 function export_entries() {58 public function export_entries() { 59 59 // TODO: Sorting. 60 60 return implode( "\n\n", array_map( array( 'PO', 'export_entry' ), $this->entries ) ); … … 67 67 * @return string ready for inclusion in PO file string for headers and all the enrtries 68 68 */ 69 function export( $include_headers = true ) {69 public function export( $include_headers = true ) { 70 70 $res = ''; 71 71 if ( $include_headers ) { … … 84 84 * @return bool true on success, false on error 85 85 */ 86 function export_to_file( $filename, $include_headers = true ) {86 public function export_to_file( $filename, $include_headers = true ) { 87 87 $fh = fopen( $filename, 'w' ); 88 88 if ( false === $fh ) { … … 104 104 * @param string $text Text to include as a comment. 105 105 */ 106 function set_comment_before_headers( $text ) {106 public function set_comment_before_headers( $text ) { 107 107 $this->comments_before_headers = $text; 108 108 } … … 294 294 * @return bool 295 295 */ 296 function import_from_file( $filename ) {296 public function import_from_file( $filename ) { 297 297 $f = fopen( $filename, 'r' ); 298 298 if ( ! $f ) { … … 336 336 * @return null|false|array 337 337 */ 338 function read_entry( $f, $lineno = 0 ) {338 public function read_entry( $f, $lineno = 0 ) { 339 339 $entry = new Translation_Entry(); 340 340 // Where were we in the last step. … … 465 465 * @return bool 466 466 */ 467 function read_line( $f, $action = 'read' ) {467 public function read_line( $f, $action = 'read' ) { 468 468 static $last_line = ''; 469 469 static $use_last_line = false; … … 487 487 * @param string $po_comment_line 488 488 */ 489 function add_comment_to_entry( &$entry, $po_comment_line ) {489 public function add_comment_to_entry( &$entry, $po_comment_line ) { 490 490 $first_two = substr( $po_comment_line, 0, 2 ); 491 491 $comment = trim( substr( $po_comment_line, 2 ) );
Note: See TracChangeset
for help on using the changeset viewer.