2021-02-17, 11:05:50
(2021-01-23, 23:46:51)Knobbles Wrote: Hello,
when exactly does the problem occur?
After activating it, or when using one of its functions?
You say it gives an error, what does the error message say? And which PHP version is used?
I found that you were/are testing GetSimple 3.4. Do you also use it here? I do not know whether this plugin is compatible, because it was made and is currently in use with GetSimple 3.3.16.
***
No need to modify the gsconfig file.
Both functions do generally the same, they minify the css file(s) and provide the URL path of the minified version.
Which of the functions will be needed depends on what you want to achieve.
As usual with GetSimple, the get... function
echoes its result (which is the path to the minified css file) to the browser,Code:get_minify_css()
while the return... function
returns the path to the calling php function.Code:return_minify_css()
So if you just want to minify your css file and then refer the minified css in the HTML header of your template, you just insert there
and it will point to the generated 'css/mystyle.min.css'.Code:<link rel="stylesheet" href="<?php get_minify_css('css/mystyle.css'); ?>" />
I feel this is the most common usage.
But perhaps you wish to minify and after this do something more with the minified file, you might want to call it from functions.php.
Then you will probably use
which returns the path to 'css/mystyle.min.css' to the caller, which in turn will do further work on this.Code:return_minify_css('css/mystyle.css');
I hope usage is more clear now.
Now it works.
I was inserting a / before the path. Like this ('/css/mystyle.css');
Thank you for the promptly response.