Skip to content

Commit

Permalink
Issue #7 - fix refactoring to use class Theme_Files
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Nov 29, 2020
1 parent aef4b58 commit dd33751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions class-theme-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ function write_pot_file( $theme, $stringer ) {
$output=$potter->write_header();
$output.=$potter->write_strings( $strings );
//echo $output;
replace_pot_file( $theme, $output );
$this->replace_pot_file( $theme, $output );

}

function replace_pot_file( $theme, $contents ) {
$filename=get_theme_dir( $theme );
$filename= $this->get_theme_dir( $theme );
$filename.='/languages/';
$filename.=$theme;
$filename.='-FSE'; // Append a suffix so we know these are FSE strings
//$filename.='-FSE'; // Append a suffix so we know these are FSE strings
$filename.='.pot';
echo "Writing: ";
echo $filename;
Expand Down
2 changes: 1 addition & 1 deletion html2pot.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$theme_files = new Theme_Files();

$stringer = new DOM_Stringer();
$stringer->set_theme( $theme );
//$stringer->set_theme( $theme );
$files = $theme_files->list_all_templates_and_parts( $theme );
$theme_files->process_theme_files( $files, $stringer );
$theme_files->write_pot_file( $theme, $stringer );
Expand Down

0 comments on commit dd33751

Please sign in to comment.