Make WordPress Core

Ticket #42818: 42818.patch

File 42818.patch, 944 bytes (added by soulseekah, 7 years ago)
  • tools/i18n/makepot.php

    diff --git tools/i18n/makepot.php tools/i18n/makepot.php
    index 75b95e1..1af79a2 100644
    class MakePOT { 
    171171                $placeholders = array_merge( $meta, $placeholders );
    172172                $meta['output'] = $this->realpath_missing( $output_file );
    173173                $placeholders['year'] = date( 'Y' );
    174                 $placeholder_keys = array_map( create_function( '$x', 'return "{".$x."}";' ), array_keys( $placeholders ) );
     174                $placeholder_keys = array_map( array( $this, 'wrap_placeholder' ), array_keys( $placeholders ) );
    175175                $placeholder_values = array_values( $placeholders );
    176176                foreach($meta as $key => $value) {
    177177                        $meta[$key] = str_replace($placeholder_keys, $placeholder_values, $value);
    class MakePOT { 
    195195                return true;
    196196        }
    197197
     198        private function wrap_placeholder( $x ) {
     199                return "{{$x}}";
     200        }
     201
    198202        public function wp_generic($dir, $args) {
    199203                $defaults = array(
    200204                        'project' => 'wp-core',