Hello, there is this problem because I use “$wp_filesystem->get_contents()” to get the content of the files and on some hosts, this function is blocked, you need to contact your web host to ask him if you can use this function on your server. it is probably a small thing to activate, then it should work.
Thread Starter
drazon
(@drazon)
Nope it is not that.
get_filesystem_method() returns direct on my setup plus this function
function testfilesystem(){
global $wp_filesystem;
require_once( ABSPATH . '/wp-admin/includes/file.php' );
WP_Filesystem();
$myarray = $wp_filesystem->get_contents( get_stylesheet_directory() . '/style.css' );
$wp_filesystem->put_contents( get_stylesheet_directory() . '/style2.css' , $myarray );
}
gets the style.css and copies it to style2.css successfully in the child theme. However if i call instead get_contents(‘https://raw.githubusercontent.com/oceanwp/oceanwp/master/assets/css/third/bbpress.css’)
then the result is an empty file.
So there is the problem. Why anyway do you call the WP filesystem to handle external files while the same files exist in the oceanwp theme locally? It doesn’t feel right or secure.
-
This reply was modified 8 years, 3 months ago by
drazon.
Hi, I don’t get the style.css file, there is no purpose to that π
If you disable a script or style, a JS and CSS files are automatically generated without the scripts you un-checked.
Thread Starter
drazon
(@drazon)
Please read my answer again, I ‘ve just shown you that the functions $wp_filesystem->get_contents() and $wp_filesystem->put_contents() work very well on my system and as an example I used style.css file for demonstration. While when I used the https://raw.githubusercontent.com/oceanwp/oceanwp/master/assets/css/third/bbpress.css file it returned blank.
Do you understand?
Oh, can you create a pre-purchase ticket? I will ask you more information to try to solve this problem.
Thank you.
Thread Starter
drazon
(@drazon)
Sure how/where can I do this? I will do it later tonight.
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Don’t create “sequel” topics. Those are duplicates and not allowed here.
For pro or commercial product support please contact the author directly on their site. This includes any pre-sales topics as well.
As the author is aware, commercial products are not supported in these forums. I am sure they will have no problem supporting you there.