diff --git a/Gruntfile.js b/Gruntfile.js index 2a6d2b9fbaa5..a9ab00cb0576 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1462,6 +1462,17 @@ module.exports = function(grunt) { ); } ); + grunt.registerTask( 'copy:theme-json', 'Copies theme.json file contents to theme-json.php.', function() { + [ 'theme.json', 'theme-i18n.json' ].forEach( function( fileName ) { + var themeData = grunt.file.readJSON(SOURCE_DIR + 'wp-includes/' + fileName); + var newFileName = fileName.replace('.', '-'); + grunt.file.write( + SOURCE_DIR + 'wp-includes/assets/'+ newFileName + '.php', + '