PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / trunk
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization vtrunk
4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 All 135 releases
← All changes | inc/compatibilities/shortcode_ultimate.php +8 -5 3.11.2 → trunk View file →
@@ -1,6 +1,9 @@
1 1 <?php
2 2
3 +use Optimole\Sdk\Resource\ImageProperty\ResizeTypeProperty;
4 +use Optimole\Sdk\ValueObject\Position;
5 +
3 6 /**
4 7 * Class Optml_shortcode_ultimate.
5 8 *
6 9 * @reason Shortcode Ultimate uses a strange image resizing feature
@@ -24,10 +27,10 @@
24 27 * Should we load the integration logic.
25 28 *
26 29 * @return bool Should we load.
27 30 */
28 - function should_load() {
29 - include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
31 + public function should_load() {
32 + include_once ABSPATH . 'wp-admin/includes/plugin.php';
30 33
31 34 return is_plugin_active( 'shortcodes-ultimate/shortcodes-ultimate.php' );
32 35 }
33 36
@@ -46,9 +49,9 @@
46 49 * @param array $attr Shortcode attrs.
47 50 *
48 51 * @return mixed New output.
49 52 */
50 - function alter_shortcode_output( $output, $tag, $attr ) {
53 + public function alter_shortcode_output( $output, $tag, $attr ) {
51 54
52 55 if ( ! isset( $this->allowed_tags[ $tag ] ) ) {
53 56 return $output;
54 57 }
@@ -70,9 +73,9 @@
70 73 * @return array New default cropping.
71 74 */
72 75 public function change_default_crop() {
73 76 return [
74 - 'type' => Optml_Resize::RESIZE_FILL,
75 - 'gravity' => Optml_Resize::GRAVITY_CENTER,
77 + 'type' => ResizeTypeProperty::FILL,
78 + 'gravity' => Position::CENTER,
76 79 ];
77 80 }
78 81 }