This file contains hidden or 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( 'wp', '__rocket_lazyload_if_log' ); | |
function __rocket_lazyload_if_log() { | |
if (is_user_logged_in ()){ | |
add_filter( 'do_rocket_lazyload', '__return_false' ); | |
} | |
} |
This file contains hidden or 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 show_thumbnail_url ($url, $width=600, $height=300){ | |
return 'http://s.wordpress.com/mshots/v1/'.urlencode($url).'?w='.$width.'&h='.$height.'; | |
} |
This file contains hidden or 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 (is_buddypress()){ | |
define('DONOTCACHEPAGE', true); | |
} |
This file contains hidden or 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 ( is_user_logged_in() && current_user_can( 'manage_options' ) ) { | |
define('DONOTCACHEPAGE', true); | |
} | |
?> |
This file contains hidden or 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
--- | |
- name: download certbot | |
get_url: url=https://dl.eff.org/certbot-auto dest=/tmp/ | |
- name: Chmod Certbot | |
command: chmod a+x certbot-auto chdir=/tmp | |
- name: Generate the certificates | |
command: ./certbot-auto certonly --standalone --agree-tos -m [email protected] -n -d {{item}} chdir=/tmp |
This file contains hidden or 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
ssl_certificate /etc/letsencrypt/live/{{url}}/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/{{url}}/privkey.pem; |
This file contains hidden or 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 add_image_insert_override($sizes){ | |
unset( $sizes['thumbnail_1']); | |
unset( $sizes['large']); | |
return $sizes; | |
} | |
add_filter('intermediate_image_sizes_advanced', 'add_image_insert_override' ); |
This file contains hidden or 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 __imagify_bulk(){ | |
return 1; | |
} | |
add_filter( 'imagify_bulk_buffer_size', '__imagify_bulk' ); |
This file contains hidden or 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_action( 'admin_init', 'imagify_only_admin' ); | |
function imagify_only_admin(){ | |
if (current_user_can('administrator')){ | |
remove_filter( 'manage_media_columns', '_imagify_manage_media_custom_column' ); | |
remove_filter( 'manage_media_columns', '_imagify_manage_media_columns' ); | |
remove_filter( 'attachment_fields_to_edit', '_imagify_attachment_fields_to_edit'); | |
remove_filter( 'media_row_actions', '_imagify_add_actions_to_media_list_row'); | |
} |
This file contains hidden or 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 | |
$im = Imagify_Attachment($id); | |
$im->optimize(); |