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 randomPassphrase( $numwords = 3, $minlength = 16, $ucfirst = true, $spchar = true ) | |
{ | |
if ( $numwords < 3 ) { | |
$numwords = 3; | |
} elseif ( $numwords > 6 ) { | |
$numwords = 6; | |
} | |
if ( $minlength < $numwords * 4.5 ) { | |
$minlength = $numwords * 5; |
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 | |
// Disable specific WordPress shortcodes when editing with Beaver Builder | |
function shortcode_compatibility_bb_fix() { | |
if ( FLBuilderModel::is_builder_active() ) { | |
remove_shortcode( 'gravityform' ); | |
remove_shortcode( 'fl_builder_insert_layout' ); | |
} | |
} | |
add_action( 'wp', 'shortcode_compatibility_bb_fix' ); |
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 new image size for mini gallery | |
add_action( 'after_setup_theme', 'custom_theme_setup' ); | |
function custom_theme_setup(){ | |
add_image_size( 'mini-thumb', 75, 75, array( 'center', 'center' ) ); | |
} | |
// Register image size for plugins to use | |
add_filter( 'image_size_names_choose', 'custom_image_sizes' ); | |
add_filter( 'uabb_photo_gallery_image_sizes', 'custom_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
Navigate to cPanel > Optimize Website. | |
Choose "Compress the specified MIME types." | |
Clear the contents of the "Mime Types" text input field and paste in the following space-separated list of MIME types: | |
text/css text/html text/javascript text/plain text/xml application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon | |
Click "Update Settings" button to save your changes. |
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 | |
// Defer Loading CSS in WordPress to Prevent Render-Blocking | |
function custom_defer_css( $tag, $handle ) { | |
$css_to_defer = array( 'style-handle-one', 'style-handle-two' ); | |
if ( in_array( $handle, $css_to_defer ) ) { | |
return str_replace( "media='all'", "media='print' onload=\"this.media='all';\"", $tag ); | |
} | |
return $tag; |
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 sys_uptime(){ | |
$uptime = ''; | |
if(is_readable('/proc/uptime')){ | |
$str = @file_get_contents('/proc/uptime'); | |
$num = floatval($str); | |
$secs = $num % 60; | |
$num = (int)($num / 60); | |
$mins = $num % 60; |
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
C:\Windows\Explorer.Exe | |
C:\Windows\System32\AccessibilityCpl.Dll | |
C:\Windows\System32\compstui.dll | |
C:\Windows\System32\Ddores.Dll | |
C:\Windows\System32\DDORes.dll | |
C:\Windows\System32\GameUx.Dll | |
C:\Windows\System32\imageres.dll | |
C:\Windows\System32\mmcndmgr.dll | |
C:\Windows\System32\mmRes.Dll | |
C:\Windows\System32\MorIcons.Dll |
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 | |
// Override FreeSSL plugin domain exclusion list | |
add_filter('option_exclude_domains_auto_install_free_ssl', function ($data) { | |
$custom_data = array('domains_to_exclude' => array('mail.mydomain.com')); | |
if(isset($data['domains_to_exclude'])){ | |
$data['domains_to_exclude'] = array_merge($data['domains_to_exclude'], $custom_data['domains_to_exclude']); | |
return $data; | |
} | |
return $custom_data; | |
}); |
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 shortcode_compatibility_bb_fix() { | |
if ( FLBuilderModel::is_builder_active() ) { | |
remove_shortcode( 'team-members' ); | |
} | |
} | |
add_action( 'wp', 'shortcode_compatibility_bb_fix' ); |
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 my_custom_login_styles() { ?> | |
<style type="text/css"> | |
body.login { | |
background-color: #114892 !important; | |
} | |
body.login div#login h1 a { | |
background-image: url(<?php echo get_stylesheet_directory_uri() ?>/images/site-login-logo.png); | |
padding-bottom: 15px; |
NewerOlder