Skip to content

Instantly share code, notes, and snippets.

View robertstaddon's full-sized avatar

Robert Staddon robertstaddon

View GitHub Profile
<Directory /var/www/vhosts/primarydomain.com/httpdocs>
<IfModule mod_fcgid.c>
<Files ~ (\.fcgi)>
SetHandler fcgid-script
Options +FollowSymLinks +ExecCGI
</Files>
</IfModule>
<IfModule mod_fcgid.c>
<Files ~ (\.php)>
SetHandler fcgid-script
DocumentRoot /var/www/vhosts/primarydomain.com/httpdocs
SuexecUserGroup primarydomainuser psacln
<Directory '/var/www/vhosts/primarydomain.com/httpdocs'>
AllowOverride All
</Directory>
location /internal-nginx-static-location/ {
<?php if(!empty($documentRoot)): ?>
alias <?php echo $documentRoot; ?>/;
<?php else: ?>
alias <?php echo $OPT['documentRoot']; ?>/;
<?php endif; ?>
add_header X-Powered-By PleskLin;
internal;
}
<?php
$confs = array(
$VAR->domain->physicalHosting->customConfigFile,
$VAR->domain->physicalHosting->customSslConfigFile
);
$documentRoot = '';
foreach ($confs as $conf) {
if (file_exists($conf)) {
$lines = file($conf);
foreach ($lines as $line) {
@robertstaddon
robertstaddon / functions.php
Last active January 16, 2017 15:41
Remove Divi sidebar styling on BuddyPress / BBPress pages by removing body classes
<?php
add_filter('body_class', 'modify_body_classes', 20);
function modify_body_classes( $classes ) {
if( is_buddypress() || is_bbpress() ) {
$remove_classes = array('et_right_sidebar', 'et_left_sidebar', 'et_includes_sidebar');
foreach( $classes as $key => $value ) {
if ( in_array( $value, $remove_classes ) ) unset( $classes[$key] );
}