Problem with joining some plugins to themes with include_once
-
Hello
I used to merging plugins with themes which I designed via copying the plugin dir to theme dir and using include once.
It improves the admin dashboard performance with not checking which plugins are activated or not.
I use this code in functions.php to integrate (for example wpDiscuz plugin):<?php define( 'MY_WPDZ_PATH', get_stylesheet_directory() . '/includes/wpdiscuz/' ); define( 'MY_WPDZ_URL', get_stylesheet_directory() . '/includes/wpdiscuz/' ); include_once( MY_WPDZ_PATH . 'class.WpdiscuzCore.php' ); ?>
it works fine and I don’t need the wpDiscuz plugin in my plugin directory any more.
it is now in my theme directory.
but some times (and always in some other plugins) I get the errors like this:Failed to load plugin url: https://domain.com/wp-content/plugins/home/admin/domains/domain.com/public_html/wp-content/themes/theme-name/includes/wpdiscuz/assets/js/wpdiscuz-shortcode-tinymce.js Failed to load plugin url: https://domain.com/wp-content/plugins/home/admin/domains/domain.com/public_html/wp-content/themes/theme-name/includes/wpdiscuz/assets/js/wpdiscuz-shortcode-tinymce.js
as you see it is repeated twice
so what is the problem and how can I solve it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem with joining some plugins to themes with include_once’ is closed to new replies.