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 | |
| /** | |
| * Plugin Name: Disable Themeisle SDK Recommendations | |
| * Description: A lightweight plugin to disable the in-context helpful recommendations in Themeisle products. | |
| * Version: 1.0 | |
| * Author: Themeisle | |
| * License: GPL-2.0+ | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { |
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_check_syntax |
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 | |
| /* | |
| Plugin Name: Optimole Tweak - Force removal of wp variations | |
| Description: Force removal of WordPress image sizes in urls and use the original image. This can only be used with main Optimole plugin. | |
| Version: 0.0.1 | |
| */ | |
| function optml_post_process_fixes($html){ | |
| $extracted_urls = Optml_Manager::instance()->extract_urls_from_content( $html ); |
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 | |
| /* | |
| * Plugin Name: Optimole Tweak - Remove image sizes. | |
| * Version: 0.0.1 | |
| */ | |
| add_action('intermediate_image_sizes_advanced', '__return_empty_array'); | |
| add_filter('big_image_size_threshold', '__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 | |
| /* | |
| Plugin Name: Optimole Tweak - Remove 2nd https from image urls | |
| Version: 0.0.1 | |
| */ | |
| add_filter( 'optml_content_url', function ( $url ) { | |
| $searchString = "https://"; | |
| $firstPos = strpos( $url, $searchString ); |
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 | |
| /* | |
| Plugin Name: Optimole Tweak - Force a format for all images | |
| Version: 0.0.1 | |
| Requires PHP: 7.0 | |
| Author URI: https://optimole.com | |
| */ | |
| function optml_forced_format() { | |
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_head', function () { | |
| $current_user = wp_get_current_user(); | |
| // Hide for Editors and Contributors | |
| if (in_array('editor', $current_user->roles) || in_array('contributor', $current_user->roles)) { | |
| echo '<style>button#menu-item-optimole { display: none !important; }</style>'; | |
| } | |
| }); |
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 | |
| /* | |
| Plugin Name: Optimole Tweak - Force resize fill to all images | |
| Description: Force fill resize type to all images with smart cropping. | |
| Version: 0.0.1 | |
| */ | |
| add_filter('optml_image_args', function($args) { | |
| $args['resize']['type'] = 'fill'; | |
| $args['resize']['gravity'] = 'sm'; |
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 | |
| /* | |
| Plugin Name: Optimole Tweak - Force resize fill to most images | |
| Description: Force fill resize type to most images with smart cropping, excluding specific ones. | |
| Version: 0.0.1 | |
| */ | |
| add_filter('optml_image_args', function($args, $original_url) { | |
| // List of image URLs (or parts of them) to exclude | |
| $excluded_images = [ |
NewerOlder