Skip to content

Instantly share code, notes, and snippets.

@ideag
Created September 21, 2017 10:02
Show Gist options
  • Save ideag/4914b513e38d8a4907b8b2c87cd4d5be to your computer and use it in GitHub Desktop.
Save ideag/4914b513e38d8a4907b8b2c87cd4d5be to your computer and use it in GitHub Desktop.
Extract translation file links from WP themes directory
jQuery('.theme .url').each(function(){
var slug = jQuery(this).prop('href');
slug = slug.replace( 'https://wordpress.org/themes/', '' );
slug = slug.replace( '/', '' );
var pot = 'https://translate.wordpress.org/projects/wp-themes/'+slug+'/lt/default/export-translations';
// window.location = pot;
console.log(pot);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment