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 | |
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] ); | |
} |
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 | |
$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) { |
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
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; | |
} |
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
DocumentRoot /var/www/vhosts/primarydomain.com/httpdocs | |
SuexecUserGroup primarydomainuser psacln | |
<Directory '/var/www/vhosts/primarydomain.com/httpdocs'> | |
AllowOverride All | |
</Directory> |
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
<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 |
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 | |
if($_POST) { | |
$postdata = http_build_query($_POST); | |
$opts = array('http' =>array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata)); | |
$context = stream_context_create($opts); | |
$result = file_get_contents("https://mynewdomain.com$_SERVER[REQUEST_URI]", false, $context); | |
echo $result; | |
} else { | |
header("Location: https://mynewdomain.com$_SERVER[REQUEST_URI]"); | |
exit(); |
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 | |
/** | |
* Menu items of categories and forums should be hidden if the user doesn't belong to the Group | |
*/ | |
if ( !is_admin() ) { | |
add_filter( 'wp_get_nav_menu_items', 'lenspiration_hide_groups_restricted_menu_items', 999, 3 ); | |
} | |
function lenspiration_hide_groups_restricted_menu_items( $items = null, $menu = null, $args = null ) { | |
$user_id = get_current_user_id(); | |
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 | |
function mycustom_featured_width( ) { return 320; /* Custom featured post image width */ } | |
add_filter( 'et_pb_blog_image_width', 'mycustom_featured_width'); | |
function mycustom_featured_height( ) { return 260; /* Custom featured post image height */ } | |
add_filter( 'et_pb_blog_image_height', 'mycustom_featured_height'); | |
function mycustom_featured_size( $image_sizes ) { | |
$custom_size = mycustom_featured_width() . 'x' . mycustom_featured_height(); |
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 | |
function mycustom_featured_width( ) { return 320; /* Custom featured post image width */ } | |
add_filter( 'et_pb_blog_image_width', 'mycustom_featured_width'); | |
add_filter( 'et_pb_index_blog_image_width', 'mycustom_featured_width'); | |
function mycustom_featured_height( ) { return 260; /* Custom featured post image height */ } | |
add_filter( 'et_pb_blog_image_height', 'mycustom_featured_height'); | |
add_filter( 'et_pb_index_blog_image_height', 'mycustom_featured_height'); | |
function mycustom_featured_size( $image_sizes ) { |
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
@media all and (min-width: 768px) { | |
.et_pb_posts img { | |
float: left; | |
margin-right: 1em; | |
} | |
.et_pb_posts article:after { /* Clear floated image */ | |
content: ""; | |
display: table; | |
clear: both; | |
} |
OlderNewer