Laura
Forum Replies Created
-
Thanks for your response.
We have gone for a solution that doesn’t involve this plugin.Forum: Plugins
In reply to: [W3 Total Cache] Assets loading S3 URLs not CloudfrontHi @vmarko
It worked thank you!
Will this be included in the next update? I don’t want to lose this fix
Hi,
Lots of places:
$root_rel_filters = array( 'bloginfo_url', 'the_permalink', 'wp_list_pages', 'wp_list_categories', 'roots_wp_nav_menu_item', 'the_content_more_link', 'the_tags', 'get_pagenum_link', 'get_comment_link', 'month_link', 'day_link', 'year_link', 'tag_link', 'the_author_posts_link', 'script_loader_src', 'style_loader_src' );If I add this to /products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php:
/** * Get the plugin url. * * @return string The plugin url. */ public function plugin_url() { return untrailingslashit( plugins_url( '/', __FILE__ ) ); }And change anything like
$router->get_static_url('photocrati-attach_to_post#ngg_attach_to_post_tinymce_plugin.js')
to
$this->plugin_url() . '/static/ngg_attach_to_post_tinymce_plugin.js'
this solves it.
This feels a lot more like a standard WP way of doing it too.Would you consider doing this? It will work for sites using the relative URLs and standard.
- This reply was modified 7 years, 3 months ago by Laura.
Hi Mihai,
Thanks for your comment about debugging. I’ve figured out it is because the theme supports root relative urls and this is causing an issue.
I think it’s because you use$router->get_static_url()to load scripts in your plugin.enqueue_tinymce_resources()in/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php