Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmudev-sls/553da276387ee1e49105b48c5623e8b1 to your computer and use it in GitHub Desktop.
Save wpmudev-sls/553da276387ee1e49105b48c5623e8b1 to your computer and use it in GitHub Desktop.
Fix conflict plugin Comment Plus and theme Extra
<?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