• Resolved peter8nss

    (@peter8nss)


    If I use the tf_css_get_css_file_path_{$namespace} filter to place the dynamic CSS somewhere other than the default location, the url generated for it will be wrong because there is no equivalent filter in MobileMenuCSS->getCSSFileURL(). Better still, MobileMenuCSS->getCSSFileURL() should build the url by calling MobileMenuCSS->getCSSFilePath() so the same filter change applies in both cases.

    Reason I need to do this is because my site does not allow public access to the uploads directory, so I need to move the dynamic CSS file somewhere which is publicly accessible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Rui Guerreiro

    (@takanakui)

    Hi @peter8nss,

    I understand but in one place I need the path and in the other the URL so I’m calling the correct function.

    What could be done is to also add a filter in the return of the $url inside MobileMenuCSS->getCSSFileURL()

    You can try if it works fine in your site, if it does I can apply that filter in the next plugin update.

    Thread Starter peter8nss

    (@peter8nss)

    Fair point.

    I changed the “return $url;” in MobileMenuCSS->getCSSFileURL() to this:

    $namespace = $this->mobmenuInstance->optionNamespace;
    return apply_filters( "tf_css_get_css_file_url_{$namespace}", $url );

    To match the file path function. This seemed to work and I was able to work with the dynamic CSS in a different place by using these filters.

    I’m not sure what you actually want to call the filter, e.g. whether there is such a filter in the trojan framework (I’m not familiar with it), or if you should create your own name for it.

    Plugin Author Rui Guerreiro

    (@takanakui)

    Hi @peter8nss,

    I forgot to reply you, will evaluate and see if I can add this later on a future version. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.