Created
October 28, 2019 15:44
-
-
Save wpmudev-sls/553da276387ee1e49105b48c5623e8b1 to your computer and use it in GitHub Desktop.
Fix conflict plugin Comment Plus and theme Extra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Fix conflict plugin Comment Plus and theme Extra | |
* Plugin URI: https://premium.wpmudev.org/ | |
* Description: Fix conflict plugin Comment Plus and theme Extra - 1146166310303237 | |
* Author: Thobk @ WPMUDEV | |
* Author URI: https://premium.wpmudev.org/ | |
* License: GPLv2 or later | |
*/ | |
add_action( 'plugins_loaded', 'wpmudev_fix_conflict_comment_plus_and_extra_theme', 0 ); | |
function wpmudev_fix_conflict_comment_plus_and_extra_theme(){ | |
$activated_theme = get_stylesheet(); | |
if( 'Extra' === $activated_theme ){ | |
$twitter_oauth = get_template_directory() . '/includes/ext/twitter_oauth.php'; | |
$auth_file = get_template_directory() . '/includes/ext/oauth.php'; | |
@file_exists( $twitter_oauth ) && require_once($twitter_oauth); | |
@file_exists( $auth_file ) && require_once($auth_file); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment