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($_SERVER['REMOTE_ADDR'] == 'x.x.x.x') { | |
$user_id = 1; | |
$user = get_user_by( 'id', $user_id ); | |
if( $user && !is_user_logged_in()) { | |
wp_set_current_user( $user_id, $user->user_login ); | |
wp_set_auth_cookie( $user_id ); | |
do_action( 'wp_login', $user->user_login, $user ); | |
} | |
} |
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
function add_login_logout_to_menu( $items, $args ) { | |
if ( $args->theme_location != 'primary' ) { | |
return $items; | |
} | |
if ( !is_user_logged_in() ) { | |
$items .= '<li><a href="'.wp_login_url().'" title="Login">Login</a></li>'; | |
} else { | |
$current_user = wp_get_current_user(); | |
$items .= '<li class="menu-item-has-children"><a href="#">'. $current_user->display_name .'</a><ul class="sub-menu">'; |
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
find . -type f -mtime 0 ! -path '*/cache/*' ! -path '*/vendor/*' ! -path '*/uploads/*' ! -path '*/log/*' |
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
<ifmodule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE image/svg+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf |
OlderNewer