gambitph / Titan-Framework

The easiest to use WordPress option framework.
http://www.titanframework.net
377 stars 137 forks source link

[WARNINGS] Theme check for Wordpress.org #430

Closed codeclinic closed 4 years ago

codeclinic commented 4 years ago

I'm trying to upload my theme on WordPress.org/themes repository and I have to make the control of the theme with Theme Check plugin, I had these warnings:

WARNING: fwrite was found in the file assets/titan-framework/inc/scssphp/scss.inc.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
Line 640: fwrite(STDERR, 'Line $line DEBUG: $value\n');

WARNING: file_put_contents was found in the file assets/titan-framework/inc/scssphp/scss.inc.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
Line 3662: file_put_contents($out, $css);
Line 3663: file_put_contents($this->importsCacheName($out),

WARNING: file_get_contents was found in the file assets/titan-framework/inc/scssphp/scss.inc.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
Line 1301: $code = file_get_contents($path);
Line 3640: $imports = unserialize(file_get_contents($icache));
Line 3657: $css = $this->scss->compile(file_get_contents($in), $in);
Line 3685: echo file_get_contents($output);

Ref: https://github.com/gambitph/Titan-Framework/issues/376

codeclinic commented 4 years ago

This is all inside the SCSS library which wasn't modified and just included. You could technically rewrite those lines in the library ;-)