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 no_webp_for_gif( $response, $process, $file, $thumb_size, $optimization_level, $webp, $is_disabled ) { | |
if ( ! $webp || $is_disabled || is_wp_error( $response ) ) { | |
return $response; | |
} | |
| |
if ( 'image/gif' !== $file->get_mime_type() ) { | |
return $response; | |
} |
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 __imagify_exclude($attachment_id){ | |
if (in_array(23, 34,439)){ | |
return false; | |
} | |
return true; | |
} | |
add_filter( 'imagify_auto_optimize_attachment', '__imagify_exclude' ); |
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 | |
require('wp-load.php'); | |
echo '<pre>; | |
print_r(wp_remote_get("https://app.imagify.io/api/version")); |
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_action( 'admin_init', '__remove_imagify_notice' ) | |
function __remove_imagify_notice() { | |
remove_filter( 'admin_notices', '_imagify_rocket_notice' ); | |
} |
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 | |
$im = Imagify_Attachment($id); | |
$im->optimize(); |
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_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 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 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 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 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 |
NewerOlder