├── inc ├── classes │ ├── Dependencies │ │ ├── .gitkeep │ │ └── wp-media │ │ │ └── event-manager │ │ │ ├── EventManagerAwareSubscriberInterface.php │ │ │ └── SubscriberInterface.php │ ├── class-imagify-cron-library-size.php │ └── class-imagify-data.php ├── 3rd-party │ ├── wp-rocket │ │ └── wp-rocket.php │ ├── formidable-pro │ │ ├── formidable-pro.php │ │ └── classes │ │ │ └── Main.php │ ├── regenerate-thumbnails │ │ └── regenerate-thumbnails.php │ ├── enable-media-replace │ │ └── enable-media-replace.php │ ├── nextgen-gallery │ │ ├── inc │ │ │ ├── functions │ │ │ │ ├── attachments.php │ │ │ │ └── common.php │ │ │ └── admin │ │ │ │ ├── menu.php │ │ │ │ ├── enqueue.php │ │ │ │ └── gallery.php │ │ └── nextgen-gallery.php │ ├── amp │ │ └── amp.php │ ├── wp-cloudflare-super-page-cache.php │ ├── yoast-seo.php │ ├── hosting │ │ ├── pressable.php │ │ ├── wpengine.php │ │ ├── wordpress-com.php │ │ ├── flywheel.php │ │ └── siteground.php │ ├── screets-lc.php │ ├── 3rd-party.php │ └── amazon-s3-and-cloudfront │ │ └── amazon-s3-and-cloudfront.php ├── Dependencies │ └── ActionScheduler │ │ ├── classes │ │ ├── ActionScheduler_Exception.php │ │ ├── actions │ │ │ ├── ActionScheduler_FinishedAction.php │ │ │ ├── ActionScheduler_NullAction.php │ │ │ └── ActionScheduler_CanceledAction.php │ │ ├── ActionScheduler_NullLogEntry.php │ │ ├── migration │ │ │ ├── DryRun_LogMigrator.php │ │ │ ├── DryRun_ActionMigrator.php │ │ │ ├── LogMigrator.php │ │ │ └── ActionScheduler_DBStoreMigrator.php │ │ ├── schedules │ │ │ ├── ActionScheduler_Schedule.php │ │ │ ├── ActionScheduler_NullSchedule.php │ │ │ └── ActionScheduler_CanceledSchedule.php │ │ ├── ActionScheduler_ActionClaim.php │ │ ├── data-stores │ │ │ └── ActionScheduler_wpPostStore_TaxonomyRegistrar.php │ │ └── ActionScheduler_InvalidActionException.php │ │ ├── lib │ │ └── cron-expression │ │ │ ├── CronExpression_MinutesField.php │ │ │ ├── CronExpression_YearField.php │ │ │ ├── LICENSE │ │ │ ├── CronExpression_FieldInterface.php │ │ │ ├── CronExpression_HoursField.php │ │ │ ├── CronExpression_MonthField.php │ │ │ └── CronExpression_FieldFactory.php │ │ └── deprecated │ │ ├── ActionScheduler_Schedule_Deprecated.php │ │ ├── ActionScheduler_Abstract_QueueRunner_Deprecated.php │ │ └── ActionScheduler_Store_Deprecated.php ├── functions │ ├── media.php │ ├── partners.php │ └── formatting.php ├── deprecated │ ├── Traits │ │ ├── Media │ │ │ ├── NoopDeprecatedTrait.php │ │ │ ├── NGGDeprecatedTrait.php │ │ │ ├── WPDeprecatedTrait.php │ │ │ └── CustomFoldersDeprecatedTrait.php │ │ └── Optimization │ │ │ └── Process │ │ │ └── AbstractProcessDeprecatedTrait.php │ └── classes │ │ ├── class-imagify-notices-deprecated.php │ │ └── class-imagify-abstract-db-deprecated.php ├── main.php └── common │ └── partners.php ├── assets ├── images │ ├── icon-lock.png │ ├── icon-pack.png │ ├── lazyload.png │ ├── spinner.gif │ ├── big-blue-check.png │ ├── imagify-logo.png │ ├── logo-wprocket.png │ ├── pic-ericwaltr.jpg │ ├── pic-srhdesign.jpg │ ├── upload-image.png │ ├── logo-wprocket@2x.png │ ├── mushrooms-normal.jpg │ ├── mushrooms-ultra.jpg │ ├── icon-arrow-choice.png │ ├── imagify-menu-bar-de.jpg │ ├── imagify-menu-bar-en.jpg │ ├── imagify-menu-bar-es.jpg │ ├── imagify-menu-bar-fr.jpg │ ├── imagify-menu-bar-it.jpg │ ├── mushrooms-original.jpg │ ├── mushrooms-aggressive.jpg │ ├── check-1.svg │ ├── icon-lock.svg │ ├── icon-external.svg │ ├── facebook_c.svg │ ├── icon-level.svg │ ├── check-mini-1.svg │ ├── icon-time.svg │ ├── key.svg │ ├── twitter_c.svg │ ├── bulk.svg │ ├── icon-alert.svg │ ├── stormy.svg │ ├── sun.svg │ ├── phone.svg │ ├── mail.svg │ ├── check.svg │ ├── icon-load.svg │ ├── check-mini.svg │ ├── cloudy-sun.svg │ ├── user.svg │ ├── icon-pack.svg │ ├── icon-arrow-choice.svg │ ├── logo-termly.svg │ └── logo-rank-math.svg ├── admin │ ├── manifest.json │ ├── entrypoints.json │ └── js │ │ └── runtime.js └── js │ ├── admin-bar.min.js │ ├── library.min.js │ ├── admin-bar.js │ ├── admin.min.js │ └── library.js ├── views ├── part-files-list-header.php ├── container │ └── data-actions.php ├── button │ ├── processing.php │ ├── compare-images.php │ ├── optimize.php │ ├── delete-webp.php │ ├── refresh-status.php │ ├── restore.php │ ├── generate-webp.php │ ├── retry-optimize.php │ ├── optimize-missing-sizes.php │ └── re-optimize.php ├── notice-footer.php ├── admin │ └── admin-bar-pricing.php ├── page-files-list.php ├── part-settings-webp-missing-message.php ├── notice-grid-view.php ├── part-settings-row-custom-folder.php ├── notice-temporary.php ├── notice-bulk-optimization-running.php ├── modal-settings-partners-infos.php ├── notice-header.php ├── part-settings-footer.php ├── part-discount-banner.php ├── part-bulk-optimization-newbie.php ├── notice-wrong-api-key.php ├── notice-backup-folder-not-writable.php ├── notice-http-block-external.php ├── notice-wp-rocket.php ├── notice-plugins-to-deactivate.php ├── notice-rating.php ├── part-bulk-optimization-overquota-alert.php ├── notice-bulk-optimization-complete.php ├── part-bulk-optimization-header.php ├── part-documentation-link.php └── input │ └── selector.php ├── classes ├── Dependencies │ ├── League │ │ └── Container │ │ │ ├── Argument │ │ │ ├── LiteralArgumentInterface.php │ │ │ ├── ArgumentInterface.php │ │ │ ├── ResolvableArgumentInterface.php │ │ │ ├── DefaultValueInterface.php │ │ │ ├── Literal │ │ │ │ ├── ArrayArgument.php │ │ │ │ ├── BooleanArgument.php │ │ │ │ ├── FloatArgument.php │ │ │ │ ├── IntegerArgument.php │ │ │ │ ├── ObjectArgument.php │ │ │ │ ├── StringArgument.php │ │ │ │ └── CallableArgument.php │ │ │ ├── ResolvableArgument.php │ │ │ ├── ArgumentResolverInterface.php │ │ │ ├── DefaultValueArgument.php │ │ │ └── LiteralArgument.php │ │ │ ├── ContainerAwareInterface.php │ │ │ ├── Exception │ │ │ ├── ContainerException.php │ │ │ └── NotFoundException.php │ │ │ ├── Inflector │ │ │ ├── InflectorAggregateInterface.php │ │ │ ├── InflectorInterface.php │ │ │ └── InflectorAggregate.php │ │ │ ├── ServiceProvider │ │ │ ├── BootableServiceProviderInterface.php │ │ │ ├── ServiceProviderInterface.php │ │ │ ├── ServiceProviderAggregateInterface.php │ │ │ └── AbstractServiceProvider.php │ │ │ ├── Definition │ │ │ ├── DefinitionAggregateInterface.php │ │ │ └── DefinitionInterface.php │ │ │ ├── DefinitionContainerInterface.php │ │ │ └── ContainerAwareTrait.php │ ├── Psr │ │ └── Container │ │ │ ├── NotFoundExceptionInterface.php │ │ │ ├── ContainerExceptionInterface.php │ │ │ └── ContainerInterface.php │ └── WPMedia │ │ └── PluginFamily │ │ └── Controller │ │ └── PluginFamilyInterface.php ├── CLI │ ├── AbstractCommand.php │ ├── CommandInterface.php │ ├── GenerateMissingNextgenCommand.php │ └── BulkOptimizeCommand.php ├── Avif │ ├── RewriteRules │ │ ├── Nginx.php │ │ ├── Apache.php │ │ └── IIS.php │ ├── Apache.php │ ├── IIS.php │ └── ServiceProvider.php ├── Webp │ ├── Apache.php │ ├── IIS.php │ ├── ServiceProvider.php │ └── RewriteRules │ │ ├── Nginx.php │ │ └── Apache.php ├── Stats │ ├── StatInterface.php │ └── ServiceProvider.php ├── Traits │ └── InstanceGetterTrait.php ├── User │ └── ServiceProvider.php ├── Media │ ├── Subscriber.php │ ├── ServiceProvider.php │ └── Upload │ │ └── Upload.php ├── CDN │ └── ServiceProvider.php ├── Picture │ └── ServiceProvider.php ├── ThirdParty │ └── ServiceProvider.php ├── Admin │ ├── PluginFamilySubscriber.php │ └── ServiceProvider.php ├── WriteFile │ └── WriteFileInterface.php ├── DB │ └── DBInterface.php └── Bulk │ └── BulkInterface.php ├── config └── providers.php ├── package.json └── contributors.txt /inc/classes/Dependencies/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icon-lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/icon-lock.png -------------------------------------------------------------------------------- /assets/images/icon-pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/icon-pack.png -------------------------------------------------------------------------------- /assets/images/lazyload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/lazyload.png -------------------------------------------------------------------------------- /assets/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/spinner.gif -------------------------------------------------------------------------------- /assets/images/big-blue-check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/big-blue-check.png -------------------------------------------------------------------------------- /assets/images/imagify-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/imagify-logo.png -------------------------------------------------------------------------------- /assets/images/logo-wprocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/logo-wprocket.png -------------------------------------------------------------------------------- /assets/images/pic-ericwaltr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/pic-ericwaltr.jpg -------------------------------------------------------------------------------- /assets/images/pic-srhdesign.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/pic-srhdesign.jpg -------------------------------------------------------------------------------- /assets/images/upload-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/upload-image.png -------------------------------------------------------------------------------- /assets/images/logo-wprocket@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/logo-wprocket@2x.png -------------------------------------------------------------------------------- /assets/images/mushrooms-normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/mushrooms-normal.jpg -------------------------------------------------------------------------------- /assets/images/mushrooms-ultra.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/mushrooms-ultra.jpg -------------------------------------------------------------------------------- /assets/images/icon-arrow-choice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/icon-arrow-choice.png -------------------------------------------------------------------------------- /assets/images/imagify-menu-bar-de.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/imagify-menu-bar-de.jpg -------------------------------------------------------------------------------- /assets/images/imagify-menu-bar-en.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/imagify-menu-bar-en.jpg -------------------------------------------------------------------------------- /assets/images/imagify-menu-bar-es.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/imagify-menu-bar-es.jpg -------------------------------------------------------------------------------- /assets/images/imagify-menu-bar-fr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/imagify-menu-bar-fr.jpg -------------------------------------------------------------------------------- /assets/images/imagify-menu-bar-it.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/imagify-menu-bar-it.jpg -------------------------------------------------------------------------------- /assets/images/mushrooms-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/mushrooms-original.jpg -------------------------------------------------------------------------------- /assets/images/mushrooms-aggressive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-media/imagify-plugin/HEAD/assets/images/mushrooms-aggressive.jpg -------------------------------------------------------------------------------- /assets/admin/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "chart.js": "js/chart.js", 3 | "bulk.js": "js/bulk.js", 4 | "runtime.js": "js/runtime.js", 5 | "entrypoints.json": "entrypoints.json" 6 | } -------------------------------------------------------------------------------- /views/part-files-list-header.php: -------------------------------------------------------------------------------- 1 | 5 |

6 | init(); 7 | 8 | endif; 9 | -------------------------------------------------------------------------------- /assets/admin/entrypoints.json: -------------------------------------------------------------------------------- 1 | { 2 | "chart": { 3 | "js": [ 4 | "js/runtime.js", 5 | "js/chart.js" 6 | ] 7 | }, 8 | "bulk": { 9 | "js": [ 10 | "js/runtime.js", 11 | "js/bulk.js" 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Argument/LiteralArgumentInterface.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Argument/ArgumentInterface.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /inc/3rd-party/formidable-pro/formidable-pro.php: -------------------------------------------------------------------------------- 1 | init(); 11 | 12 | endif; 13 | -------------------------------------------------------------------------------- /views/container/data-actions.php: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Exception/NotFoundException.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | 11 | 12 |
13 | 14 | print_js_template_in_footer( 'button/processing' ); 17 | -------------------------------------------------------------------------------- /inc/3rd-party/regenerate-thumbnails/regenerate-thumbnails.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/actions/ActionScheduler_FinishedAction.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/ActionScheduler_NullLogEntry.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /views/admin/admin-bar-pricing.php: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /inc/classes/Dependencies/wp-media/event-manager/EventManagerAwareSubscriberInterface.php: -------------------------------------------------------------------------------- 1 | value = $value; 14 | } 15 | 16 | public function getValue(): string 17 | { 18 | return $this->value; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /views/page-files-list.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 | print_template( 'part-files-list-header' ); ?> 7 | 8 |
9 | 10 | list_table->views(); ?> 11 | list_table->display(); ?> 12 |
13 | 14 |
15 | 3 | 17 |

18 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Inflector/InflectorAggregateInterface.php: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/ServiceProvider/BootableServiceProviderInterface.php: -------------------------------------------------------------------------------- 1 | print_template( 5 | 'notice-header', 6 | [ 7 | 'title' => __( 'You\'re missing out!', 'imagify' ), 8 | ] 9 | ); 10 | ?> 11 |

12 |

13 | print_template( 15 | 'notice-footer', 16 | [ 17 | 'dismissible' => 'grid-view', 18 | ] 19 | ); 20 | -------------------------------------------------------------------------------- /assets/images/icon-time.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php: -------------------------------------------------------------------------------- 1 | {var e=!1;r(i).on("mouseenter","#wp-admin-bar-imagify",function(){var a,i,n;!0!==e&&(e=!0,a=r("#wp-admin-bar-imagify-profile-content"),n=r("#wp-admin-bar-imagify-pricing-content"),a.is(":empty"))&&(i=m.ajaxurl||m.imagifyAdminBar.ajaxurl,i+=0%7$s', 6 | esc_url( $data['url'] ), 7 | esc_attr( $data['media_id'] ), 8 | esc_url( $data['backup_url'] ), 9 | esc_url( $data['original_url'] ), 10 | esc_attr( $data['width'] ), 11 | esc_attr( $data['height'] ), 12 | esc_html__( 'Compare Original VS Optimized', 'imagify' ) 13 | ); 14 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregateInterface.php: -------------------------------------------------------------------------------- 1 | 4 |

5 | 6 | 7 | 8 |

9 | -------------------------------------------------------------------------------- /classes/CLI/AbstractCommand.php: -------------------------------------------------------------------------------- 1 | get_command_name() ); 15 | } 16 | 17 | /** 18 | * Get the "imagify" command name. 19 | * 20 | * @return string 21 | */ 22 | abstract protected function get_command_name(): string; 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | public function get_synopsis(): array { 28 | return []; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Argument/DefaultValueArgument.php: -------------------------------------------------------------------------------- 1 | defaultValue = $defaultValue; 14 | parent::__construct($value); 15 | } 16 | 17 | /** 18 | * @return mixed|null 19 | */ 20 | public function getDefaultValue() 21 | { 22 | return $this->defaultValue; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /inc/3rd-party/amp/amp.php: -------------------------------------------------------------------------------- 1 | tags in AMP pages. 12 | * 13 | * @since 1.9 14 | * 15 | * @param bool $allow True to allow the use of tags (default). False to prevent their use. 16 | * @return bool 17 | */ 18 | function imagify_amp_disable_picture_on_endpoint( $allow ) { 19 | return $allow && ! is_amp_endpoint(); 20 | } 21 | 22 | endif; 23 | -------------------------------------------------------------------------------- /views/notice-temporary.php: -------------------------------------------------------------------------------- 1 | $type_notices ) { 15 | ?> 16 |
17 | 18 |

[] ] ); ?>

19 | 20 |
21 | get_capacity( 'bulk-optimize' ); 17 | 18 | add_submenu_page( NGGFOLDER, __( 'Bulk Optimization', 'imagify' ), __( 'Bulk Optimization', 'imagify' ), $capacity, imagify_get_ngg_bulk_screen_slug(), '_imagify_display_bulk_page' ); 19 | } 20 | -------------------------------------------------------------------------------- /views/notice-bulk-optimization-running.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |

8 | ', 13 | '', 14 | '', 15 | '' 16 | ); 17 | ?> 18 |

19 | print_template( 'notice-footer', [ 'dismissible' => 'bulk-optimization-complete' ] ); ?> 20 | -------------------------------------------------------------------------------- /assets/images/key.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/modal-settings-partners-infos.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |

8 | 9 |

10 | 11 | 15 |
16 |
17 | 18 | 4 |
5 |
6 | 9 |
10 | 11 |

12 | 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "imagify", 3 | "description": "Imagify Image Optimizer. Dramatically reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth.", 4 | "version": "1.9.9", 5 | "homepage": "https://wordpress.org/plugins/imagify/", 6 | "license": "GPL-2.0", 7 | "private": true, 8 | "author": { 9 | "name": "WP Media", 10 | "url": "http://wp-media.me" 11 | }, 12 | "devDependencies": { 13 | "autoprefixer": "^7.0.1", 14 | "grunt": "^1.0.1", 15 | "grunt-contrib-cssmin": "^4.0.0", 16 | "grunt-contrib-uglify": "^5.0.1", 17 | "grunt-eslint": "^24.0.0", 18 | "grunt-postcss": "^0.9.0" 19 | }, 20 | "scripts": { 21 | "build": "grunt" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /classes/Avif/RewriteRules/Nginx.php: -------------------------------------------------------------------------------- 1 | 6 | Geoffrey Crofte 7 | Sébastien Decamme 8 | Julio Potier 9 | Caspar Hübinger 10 | Remy Perona 11 | Grégory Viguier 12 | 13 | Interface Design: 14 | Matthieu Bousendorfer 15 | Geoffrey Crofte 16 | 17 | Translation: 18 | Alice Orrù (Italian & Spanish) 19 | Caspar Hübinger (German) 20 | Lucy Beer (English) 21 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/migration/DryRun_ActionMigrator.php: -------------------------------------------------------------------------------- 1 | base && 'attachment' === $current_screen->post_type ) { 19 | wp_dequeue_script( 'yoast-seo' ); 20 | wp_deregister_script( 'yoast-seo' ); 21 | } 22 | } 23 | 24 | endif; 25 | -------------------------------------------------------------------------------- /classes/Avif/Apache.php: -------------------------------------------------------------------------------- 1 | 29 | AddType image/avif .avif 30 | ' 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/ServiceProvider/AbstractServiceProvider.php: -------------------------------------------------------------------------------- 1 | identifier ?? get_class($this); 21 | } 22 | 23 | public function setIdentifier(string $id): ServiceProviderInterface 24 | { 25 | $this->identifier = $id; 26 | return $this; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/actions/ActionScheduler_NullAction.php: -------------------------------------------------------------------------------- 1 | set_schedule( new ActionScheduler_NullSchedule() ); 17 | } 18 | 19 | /** 20 | * Execute action. 21 | */ 22 | public function execute() { 23 | // don't execute. 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /classes/CLI/CommandInterface.php: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 | current_user_can( 'bulk-optimize' ) || imagify_get_context( 'custom-folders' )->current_user_can( 'bulk-optimize' ); 13 | 14 | if ( $user_can ) { 15 | // Submit and go to bulk page. 16 | submit_button( 17 | esc_html__( 'Save & Go to Bulk Optimizer', 'imagify' ), 18 | 'secondary imagify-button-secondary', // Type/classes. 19 | 'submit-goto-bulk', // Name (id). 20 | true, // Wrap. 21 | [] // Other attributes. 22 | ); 23 | } 24 | } 25 | ?> 26 |
27 | 28 | -------------------------------------------------------------------------------- /inc/3rd-party/hosting/pressable.php: -------------------------------------------------------------------------------- 1 | 5 | 26 | get_fullsize_url()' ); 27 | 28 | return false; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /classes/Webp/Apache.php: -------------------------------------------------------------------------------- 1 | 34 | AddType image/webp .webp 35 | ' 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /inc/main.php: -------------------------------------------------------------------------------- 1 | IMAGIFY_PATH, 30 | ] 31 | ); 32 | 33 | $plugin->init( $providers ); 34 | } 35 | add_action( 'plugins_loaded', 'imagify_init' ); 36 | -------------------------------------------------------------------------------- /classes/Avif/IIS.php: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | ' 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/images/bulk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icon-alert.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /classes/Stats/StatInterface.php: -------------------------------------------------------------------------------- 1 | {"use strict";var r,e={},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var s=o[r]={exports:{}};return e[r](s,s.exports,t),s.exports}t.m=e,r=[],t.O=(e,o,n,s)=>{if(!o){var a=1/0;for(u=0;u=s)&&Object.keys(t.O).every((r=>t.O[r](o[f])))?o.splice(f--,1):(i=!1,s0&&r[u-1][2]>s;u--)r[u]=r[u-1];r[u]=[o,n,s]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={666:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var n,s,[a,i,f]=o,l=0;if(a.some((e=>0!==r[e]))){for(n in i)t.o(i,n)&&(t.m[n]=i[n]);if(f)var u=f(t)}for(e&&e(o);lid = $id; 29 | $this->action_ids = $action_ids; 30 | } 31 | 32 | /** 33 | * Get claim ID. 34 | */ 35 | public function get_id() { 36 | return $this->id; 37 | } 38 | 39 | /** 40 | * Get IDs of claimed actions. 41 | */ 42 | public function get_actions() { 43 | return $this->action_ids; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /inc/3rd-party/hosting/wordpress-com.php: -------------------------------------------------------------------------------- 1 | get_upload_basedir( true ); 18 | 19 | if ( strpos( $upload_basedir, '/wp-content/' ) === false ) { 20 | // Uh oooooh... 21 | return $root_path; 22 | } 23 | 24 | $upload_basedir = explode( '/wp-content/', $upload_basedir ); 25 | $upload_basedir = reset( $upload_basedir ); 26 | 27 | return $upload_basedir . '/'; 28 | } 29 | 30 | endif; 31 | -------------------------------------------------------------------------------- /assets/images/stormy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/part-bulk-optimization-newbie.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |

7 |
8 |
9 | 10 |
11 |

12 |
13 |
14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /inc/deprecated/classes/class-imagify-notices-deprecated.php: -------------------------------------------------------------------------------- 1 | print_template( \'notice-\' . $view, $data )' ); 26 | 27 | Imagify_Views::get_instance()->print_template( 'notice-' . $view, $data ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Definition/DefinitionAggregateInterface.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | ?> 22 | 23 | > 24 | 25 | 26 | 27 | print_js_template_in_footer( 'button/processing' ); 30 | } 31 | -------------------------------------------------------------------------------- /classes/Webp/IIS.php: -------------------------------------------------------------------------------- 1 | 34 | 35 | 36 | ' 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/schedules/ActionScheduler_NullSchedule.php: -------------------------------------------------------------------------------- 1 | scheduled_date = null; 22 | } 23 | 24 | /** 25 | * This schedule has no scheduled DateTime, so we need to override the parent __sleep(). 26 | * 27 | * @return array 28 | */ 29 | public function __sleep() { 30 | return array(); 31 | } 32 | 33 | /** 34 | * Wakeup. 35 | */ 36 | public function __wakeup() { 37 | $this->scheduled_date = null; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /views/notice-wrong-api-key.php: -------------------------------------------------------------------------------- 1 | print_template( 5 | 'notice-header', 6 | [ 7 | 'title' => esc_html__( 'Your API key isn\'t valid!', 'imagify' ), 8 | 'classes' => [ 'error' ], 9 | ] 10 | ); 11 | ?> 12 |

13 | 14 | ', 19 | '', 20 | '' 21 | ); 22 | ?> 23 |

24 | print_template( 26 | 'notice-footer', 27 | [ 28 | 'dismissible' => 'wrong-api-key', 29 | ] 30 | ); 31 | -------------------------------------------------------------------------------- /views/notice-backup-folder-not-writable.php: -------------------------------------------------------------------------------- 1 | print_template( 5 | 'notice-header', 6 | [ 7 | 'classes' => [ 'error' ], 8 | ] 9 | ); 10 | 11 | $backup_path = $this->filesystem->make_path_relative( get_imagify_backup_dir_path( true ) ); 12 | 13 | if ( $this->filesystem->exists( get_imagify_backup_dir_path() ) ) { 14 | /* translators: %s is a file path. */ 15 | $message = esc_html__( 'The backup folder %s is not writable by the server, original images cannot be saved!', 'imagify' ); 16 | } else { 17 | /* translators: %s is a file path. */ 18 | $message = esc_html__( 'The backup folder %s cannot be created. Is its parent directory writable by the server? Original images cannot be saved!', 'imagify' ); 19 | } 20 | 21 | echo '

' . sprintf( $message, "$backup_path" ) . '

'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 22 | 23 | $this->print_template( 'notice-footer' ); 24 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php: -------------------------------------------------------------------------------- 1 | taxonomy_args() ); 15 | } 16 | 17 | /** 18 | * Get taxonomy arguments. 19 | */ 20 | protected function taxonomy_args() { 21 | $args = array( 22 | 'label' => __( 'Action Group', 'action-scheduler' ), 23 | 'public' => false, 24 | 'hierarchical' => false, 25 | 'show_admin_column' => true, 26 | 'query_var' => false, 27 | 'rewrite' => false, 28 | ); 29 | 30 | $args = apply_filters( 'action_scheduler_taxonomy_args', $args ); 31 | return $args; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/DefinitionContainerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class CronExpression_MinutesField extends CronExpression_AbstractField 9 | { 10 | /** 11 | * {@inheritdoc} 12 | */ 13 | public function isSatisfiedBy(DateTime $date, $value) 14 | { 15 | return $this->isSatisfied($date->format('i'), $value); 16 | } 17 | 18 | /** 19 | * {@inheritdoc} 20 | */ 21 | public function increment(DateTime $date, $invert = false) 22 | { 23 | if ($invert) { 24 | $date->modify('-1 minute'); 25 | } else { 26 | $date->modify('+1 minute'); 27 | } 28 | 29 | return $this; 30 | } 31 | 32 | /** 33 | * {@inheritdoc} 34 | */ 35 | public function validate($value) 36 | { 37 | return (bool) preg_match('/[\*,\/\-0-9]+/', $value); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /views/button/delete-webp.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | ?> 22 | 23 | > 24 | 25 | 26 | 27 | 28 | print_js_template_in_footer( 'button/processing' ); 31 | } 32 | -------------------------------------------------------------------------------- /views/button/refresh-status.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | ?> 22 | 23 | > 24 | 25 | 26 | 27 | 28 | print_js_template_in_footer( 'button/processing' ); 31 | } 32 | -------------------------------------------------------------------------------- /views/button/restore.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | ?> 22 | 23 | > 24 | 25 | 26 | 27 | 28 | print_js_template_in_footer( 'button/processing' ); 31 | } 32 | -------------------------------------------------------------------------------- /views/notice-http-block-external.php: -------------------------------------------------------------------------------- 1 | print_template( 5 | 'notice-header', 6 | [ 7 | 'title' => __( 'The external HTTP requests are blocked!', 'imagify' ), 8 | 'classes' => [ 'error' ], 9 | ] 10 | ); 11 | ?> 12 |

13 | WP_HTTP_BLOCK_EXTERNAL constant in the wp-config.php to block all external HTTP requests.', 'imagify' ); ?> 14 |

15 |

16 | wp-config.php file so that it works correctly.', 'imagify' ); ?>
17 | 18 |

19 |

20 | 21 |

22 | print_template( 24 | 'notice-footer', 25 | [ 26 | 'dismissible' => 'http-block-external', 27 | ] 28 | ); 29 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/deprecated/ActionScheduler_Schedule_Deprecated.php: -------------------------------------------------------------------------------- 1 | get_date(); 19 | $replacement_method = 'get_date()'; 20 | } else { 21 | $return_value = $this->get_next( $after ); 22 | $replacement_method = 'get_next( $after )'; 23 | } 24 | 25 | _deprecated_function( __METHOD__, '3.0.0', __CLASS__ . '::' . $replacement_method ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 26 | 27 | return $return_value; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /views/button/generate-webp.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | ?> 22 | 23 | > 24 | 25 | 28 | 29 | 30 | print_js_template_in_footer( 'button/processing' ); 33 | } 34 | -------------------------------------------------------------------------------- /classes/Traits/InstanceGetterTrait.php: -------------------------------------------------------------------------------- 1 | get_fullsize_url()' ); 27 | 28 | if ( ! $this->is_valid() ) { 29 | return false; 30 | } 31 | 32 | if ( $this->get_cdn() ) { 33 | return $this->get_cdn()->get_file_url(); 34 | } 35 | 36 | return ! empty( $this->image->imageURL ) ? $this->image->imageURL : false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /inc/functions/partners.php: -------------------------------------------------------------------------------- 1 | set_schedule( new ActionScheduler_NullSchedule() ); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /inc/deprecated/Traits/Media/WPDeprecatedTrait.php: -------------------------------------------------------------------------------- 1 | get_fullsize_url()' ); 27 | 28 | if ( ! $this->is_valid() ) { 29 | return false; 30 | } 31 | 32 | if ( $this->get_cdn() ) { 33 | return $this->get_cdn()->get_file_url(); 34 | } 35 | 36 | $url = wp_get_attachment_url( $this->id ); 37 | 38 | return $url ? $url : false; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /inc/3rd-party/nextgen-gallery/inc/functions/common.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/phone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /classes/User/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 30 | } 31 | 32 | /** 33 | * Registers the provided classes 34 | * 35 | * @return void 36 | */ 37 | public function register(): void { 38 | $this->getContainer()->add( User::class ); 39 | } 40 | 41 | /** 42 | * Returns the subscribers array 43 | * 44 | * @return array 45 | */ 46 | public function get_subscribers() { 47 | return []; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /assets/js/library.min.js: -------------------------------------------------------------------------------- 1 | !function(o){var i='";o(".button-imagify-optimize-missing-sizes").length&&(i+='"),(imagifyLibrary.backupOption||o(".attachment-has-backup").length)&&(i+='"),o('.bulkactions select[name="action"] option:last-child').before(i),o('.bulkactions select[name="action2"] option:last-child').before(i),o("#bulkaction option:last-child").after(i),o("#doaction").add("#doaction2").add('#bulkaction + [name="showThickbox"]').on("click",function(i){var a,t=o(this).prev("select").val().split("|");"imagify-bulk"===t[0]&&(i.preventDefault(),a=t[1],o('input[name^="media"]:checked, input[name^="doaction"]:checked').map(function(){return this.value}).get().forEach(function(i,t){setTimeout(function(){o('table .imagify-data-actions-container[data-id="'+i+'"] .button-imagify-'+a).first().trigger("click")},300*t)}))})}(jQuery,(document,window)); -------------------------------------------------------------------------------- /views/notice-wp-rocket.php: -------------------------------------------------------------------------------- 1 | 7 |
8 | 9 | 10 | 13 |

14 | 17 |

18 |

19 | 20 |

21 |
22 | -------------------------------------------------------------------------------- /views/notice-plugins-to-deactivate.php: -------------------------------------------------------------------------------- 1 | print_template( 7 | 'notice-header', 8 | [ 9 | 'classes' => [ 'error' ], 10 | ] 11 | ); 12 | ?> 13 |

14 | 15 | 24 | print_template( 'notice-footer' ); 26 | -------------------------------------------------------------------------------- /inc/3rd-party/hosting/flywheel.php: -------------------------------------------------------------------------------- 1 | get_upload_basedir( true ); 22 | 23 | if ( strpos( $upload_basedir, '/wp-content/' ) === false ) { 24 | // Uh oooooh... 25 | return $root_path; 26 | } 27 | 28 | $upload_basedir = explode( '/wp-content/', $upload_basedir ); 29 | $upload_basedir = reset( $upload_basedir ); 30 | 31 | return $upload_basedir . '/'; 32 | } 33 | 34 | endif; 35 | -------------------------------------------------------------------------------- /assets/images/mail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Definition/DefinitionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class CronExpression_YearField extends CronExpression_AbstractField 9 | { 10 | /** 11 | * {@inheritdoc} 12 | */ 13 | public function isSatisfiedBy(DateTime $date, $value) 14 | { 15 | return $this->isSatisfied($date->format('Y'), $value); 16 | } 17 | 18 | /** 19 | * {@inheritdoc} 20 | */ 21 | public function increment(DateTime $date, $invert = false) 22 | { 23 | if ($invert) { 24 | $date->modify('-1 year'); 25 | $date->setDate($date->format('Y'), 12, 31); 26 | $date->setTime(23, 59, 0); 27 | } else { 28 | $date->modify('+1 year'); 29 | $date->setDate($date->format('Y'), 1, 1); 30 | $date->setTime(0, 0, 0); 31 | } 32 | 33 | return $this; 34 | } 35 | 36 | /** 37 | * {@inheritdoc} 38 | */ 39 | public function validate($value) 40 | { 41 | return (bool) preg_match('/[\*,\/\-0-9]+/', $value); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /assets/images/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Path 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/lib/cron-expression/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Michael Dowling and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /inc/deprecated/Traits/Media/CustomFoldersDeprecatedTrait.php: -------------------------------------------------------------------------------- 1 | get_fullsize_url()' ); 27 | 28 | if ( ! $this->is_valid() ) { 29 | return false; 30 | } 31 | 32 | if ( $this->get_cdn() ) { 33 | return $this->get_cdn()->get_file_url(); 34 | } 35 | 36 | $row = $this->get_row(); 37 | 38 | if ( ! $row || empty( $row['path'] ) ) { 39 | return false; 40 | } 41 | 42 | return \Imagify_Files_Scan::remove_placeholder( $row['path'], 'url' ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /classes/Media/Subscriber.php: -------------------------------------------------------------------------------- 1 | upload = $upload; 27 | } 28 | 29 | /** 30 | * Returns an array of events that this subscriber wants to listen to. 31 | * 32 | * @return array 33 | */ 34 | public static function get_subscribed_events(): array { 35 | return [ 36 | 'restrict_manage_posts' => 'imagify_attachments_filter_dropdown', 37 | ]; 38 | } 39 | 40 | /** 41 | * Adds a dropdown that allows filtering on the attachments Imagify status. 42 | * 43 | * @return void 44 | */ 45 | public function imagify_attachments_filter_dropdown() { 46 | if ( ! \Imagify_Views::get_instance()->is_wp_library_page() ) { 47 | return; 48 | } 49 | $this->upload->add_imagify_filter_to_attachments_dropdown(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/ContainerAwareTrait.php: -------------------------------------------------------------------------------- 1 | container = $container; 20 | 21 | if ($this instanceof ContainerAwareInterface) { 22 | return $this; 23 | } 24 | 25 | throw new BadMethodCallException(sprintf( 26 | 'Attempt to use (%s) while not implementing (%s)', 27 | ContainerAwareTrait::class, 28 | ContainerAwareInterface::class 29 | )); 30 | } 31 | 32 | public function getContainer(): DefinitionContainerInterface 33 | { 34 | if ($this->container instanceof DefinitionContainerInterface) { 35 | return $this->container; 36 | } 37 | 38 | throw new ContainerException('No container implementation has been set.'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /classes/Dependencies/League/Container/Inflector/InflectorAggregate.php: -------------------------------------------------------------------------------- 1 | inflectors[] = $inflector; 23 | return $inflector; 24 | } 25 | 26 | public function inflect($object) 27 | { 28 | foreach ($this->getIterator() as $inflector) { 29 | $type = $inflector->getType(); 30 | 31 | if ($object instanceof $type) { 32 | $inflector->setContainer($this->getContainer()); 33 | $inflector->inflect($object); 34 | } 35 | } 36 | 37 | return $object; 38 | } 39 | 40 | public function getIterator(): Generator 41 | { 42 | yield from $this->inflectors; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /classes/Dependencies/Psr/Container/ContainerInterface.php: -------------------------------------------------------------------------------- 1 | get_fullsize_file()' ); 31 | 32 | if ( isset( $this->file ) ) { 33 | return $this->file; 34 | } 35 | 36 | $this->file = false; 37 | 38 | if ( $this->get_media() ) { 39 | $this->file = new File( $this->get_media()->get_raw_fullsize_path() ); 40 | } 41 | 42 | return $this->file; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /views/button/retry-optimize.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | 22 | if ( ! empty( $data['error'] ) ) { 23 | ?> 24 | 25 | true, 30 | 'code' => true, 31 | 'em' => true, 32 | 'strong' => true, 33 | ] 34 | ); 35 | ?> 36 | 37 |
38 | 41 | > 42 | 43 | 44 | 45 | print_js_template_in_footer( 'button/processing' ); 48 | } 49 | -------------------------------------------------------------------------------- /classes/CDN/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 39 | } 40 | 41 | /** 42 | * Registers the provided classes 43 | * 44 | * @return void 45 | */ 46 | public function register(): void { 47 | $this->getContainer()->addShared( CDN::class ); 48 | } 49 | 50 | /** 51 | * Returns the subscribers array 52 | * 53 | * @return array 54 | */ 55 | public function get_subscribers() { 56 | return $this->subscribers; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /inc/classes/Dependencies/wp-media/event-manager/SubscriberInterface.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | interface SubscriberInterface { 13 | /** 14 | * Returns an array of events that this subscriber wants to listen to. 15 | * 16 | * The array key is the event name. The value can be: 17 | * 18 | * * The method name 19 | * * An array with the method name and priority 20 | * * An array with the method name, priority and number of accepted arguments 21 | * 22 | * For instance: 23 | * 24 | * * array('hook_name' => 'method_name') 25 | * * array('hook_name' => array('method_name', $priority)) 26 | * * array('hook_name' => array('method_name', $priority, $accepted_args)) 27 | * * array('hook_name' => array(array('method_name_1', $priority_1, $accepted_args_1)), array('method_name_2', $priority_2, $accepted_args_2))) 28 | * 29 | * @return array 30 | */ 31 | public static function get_subscribed_events(); 32 | } 33 | -------------------------------------------------------------------------------- /inc/3rd-party/nextgen-gallery/nextgen-gallery.php: -------------------------------------------------------------------------------- 1 | init(); 20 | NGG\DB::get_instance()->init(); 21 | 22 | if ( is_admin() ) { 23 | require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php'; 24 | require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/menu.php'; 25 | require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/gallery.php'; 26 | require IMAGIFY_PATH . 'inc/3rd-party/nextgen-gallery/inc/admin/bulk.php'; 27 | } 28 | -------------------------------------------------------------------------------- /assets/images/icon-load.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/notice-rating.php: -------------------------------------------------------------------------------- 1 | print_template( 5 | 'notice-header', 6 | [ 7 | 'classes' => [ 'updated' ], 8 | ] 9 | ); 10 | ?> 11 |

12 | ', 17 | '', 18 | esc_html( number_format_i18n( $data ) ) 19 | ); 20 | ?> 21 |

22 |

23 | ', 28 | '
', 29 | '', 30 | '' 31 | ); 32 | ?> 33 |
34 | ☆☆☆☆☆ 35 |

36 | print_template( 38 | 'notice-footer', 39 | [ 40 | 'dismissible' => 'rating', 41 | ] 42 | ); 43 | -------------------------------------------------------------------------------- /classes/Picture/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 39 | } 40 | 41 | /** 42 | * Registers the provided classes 43 | * 44 | * @return void 45 | */ 46 | public function register(): void { 47 | $this->getContainer()->addShared( Display::class ) 48 | ->addArgument( 'filesystem' ); 49 | } 50 | 51 | /** 52 | * Returns the subscribers array 53 | * 54 | * @return array 55 | */ 56 | public function get_subscribers() { 57 | return $this->subscribers; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/deprecated/ActionScheduler_Store_Deprecated.php: -------------------------------------------------------------------------------- 1 | mark_failure( $action_id ); 20 | } 21 | 22 | /** 23 | * Add base hooks 24 | * 25 | * @since 2.2.6 26 | */ 27 | protected static function hook() { 28 | _deprecated_function( __METHOD__, '3.0.0' ); 29 | } 30 | 31 | /** 32 | * Remove base hooks 33 | * 34 | * @since 2.2.6 35 | */ 36 | protected static function unhook() { 37 | _deprecated_function( __METHOD__, '3.0.0' ); 38 | } 39 | 40 | /** 41 | * Get the site's local time. 42 | * 43 | * @deprecated 2.1.0 44 | * @return DateTimeZone 45 | */ 46 | protected function get_local_timezone() { 47 | _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); 48 | return ActionScheduler_TimezoneHelper::get_local_timezone(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /classes/Stats/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 39 | } 40 | 41 | /** 42 | * Registers the provided classes 43 | * 44 | * @return void 45 | */ 46 | public function register(): void { 47 | $this->getContainer()->addShared( OptimizedMediaWithoutNextGen::class ); 48 | } 49 | 50 | /** 51 | * Returns the subscribers array 52 | * 53 | * @return array 54 | */ 55 | public function get_subscribers() { 56 | return $this->subscribers; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /views/part-bulk-optimization-overquota-alert.php: -------------------------------------------------------------------------------- 1 | 'plugin', 8 | 'utm_medium' => 'imagify-wp', 9 | 'utm_content' => 'over-quota', 10 | ] 11 | ); 12 | ?> 13 |
14 |
15 | 16 | 17 | 18 |
19 | 25 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/lib/cron-expression/CronExpression_FieldInterface.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | interface CronExpression_FieldInterface 9 | { 10 | /** 11 | * Check if the respective value of a DateTime field satisfies a CRON exp 12 | * 13 | * @param DateTime $date DateTime object to check 14 | * @param string $value CRON expression to test against 15 | * 16 | * @return bool Returns TRUE if satisfied, FALSE otherwise 17 | */ 18 | public function isSatisfiedBy(DateTime $date, $value); 19 | 20 | /** 21 | * When a CRON expression is not satisfied, this method is used to increment 22 | * or decrement a DateTime object by the unit of the cron field 23 | * 24 | * @param DateTime $date DateTime object to change 25 | * @param bool $invert (optional) Set to TRUE to decrement 26 | * 27 | * @return CronExpression_FieldInterface 28 | */ 29 | public function increment(DateTime $date, $invert = false); 30 | 31 | /** 32 | * Validates a CRON expression for a given field 33 | * 34 | * @param string $value CRON expression value to validate 35 | * 36 | * @return bool Returns TRUE if valid, FALSE otherwise 37 | */ 38 | public function validate($value); 39 | } 40 | -------------------------------------------------------------------------------- /views/notice-bulk-optimization-complete.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |
10 | 13 |
14 |

15 |

16 |

17 | ', 25 | '' 26 | ); 27 | ?> 28 |

29 |
30 | print_template( 'notice-footer', [ 'dismissible' => 'bulk-optimization-complete' ] ); ?> 31 | -------------------------------------------------------------------------------- /inc/3rd-party/3rd-party.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Path 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /views/button/optimize-missing-sizes.php: -------------------------------------------------------------------------------- 1 | build_attributes( $data['atts'] ); 21 | ?> 22 | 23 | > 24 | 25 | ', 31 | '' 32 | ); 33 | ?> 34 | 35 | 36 | print_js_template_in_footer( 'button/processing' ); 39 | } 40 | -------------------------------------------------------------------------------- /classes/CLI/GenerateMissingNextgenCommand.php: -------------------------------------------------------------------------------- 1 | run_generate_nextgen( $arguments ); 20 | 21 | \WP_CLI::log( 'Imagify missing next-gen images generation triggered.' ); 22 | } 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | protected function get_command_name(): string { 28 | return 'generate-missing-nextgen'; 29 | } 30 | 31 | /** 32 | * {@inheritdoc} 33 | */ 34 | public function get_description(): string { 35 | return 'Run the generation of the missing next-gen images versions'; 36 | } 37 | 38 | /** 39 | * {@inheritdoc} 40 | */ 41 | public function get_synopsis(): array { 42 | return [ 43 | [ 44 | 'type' => 'positional', 45 | 'name' => 'contexts', 46 | 'description' => 'The context(s) to run the missing next-gen images generation for. Possible values are wp and custom-folders.', 47 | 'optional' => false, 48 | 'repeating' => true, 49 | ], 50 | ]; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/lib/cron-expression/CronExpression_HoursField.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class CronExpression_HoursField extends CronExpression_AbstractField 9 | { 10 | /** 11 | * {@inheritdoc} 12 | */ 13 | public function isSatisfiedBy(DateTime $date, $value) 14 | { 15 | return $this->isSatisfied($date->format('H'), $value); 16 | } 17 | 18 | /** 19 | * {@inheritdoc} 20 | */ 21 | public function increment(DateTime $date, $invert = false) 22 | { 23 | // Change timezone to UTC temporarily. This will 24 | // allow us to go back or forwards and hour even 25 | // if DST will be changed between the hours. 26 | $timezone = $date->getTimezone(); 27 | $date->setTimezone(new DateTimeZone('UTC')); 28 | if ($invert) { 29 | $date->modify('-1 hour'); 30 | $date->setTime($date->format('H'), 59); 31 | } else { 32 | $date->modify('+1 hour'); 33 | $date->setTime($date->format('H'), 0); 34 | } 35 | $date->setTimezone($timezone); 36 | 37 | return $this; 38 | } 39 | 40 | /** 41 | * {@inheritdoc} 42 | */ 43 | public function validate($value) 44 | { 45 | return (bool) preg_match('/[\*,\/\-0-9]+/', $value); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /classes/ThirdParty/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 40 | } 41 | 42 | /** 43 | * Returns the subscribers array 44 | * 45 | * @return array 46 | */ 47 | public function get_subscribers() { 48 | return $this->subscribers; 49 | } 50 | 51 | /** 52 | * Registers the provided classes 53 | * 54 | * @return void 55 | */ 56 | public function register(): void { 57 | $this->getContainer()->addShared( 'gravity_from_subscriber', GravityForms::class ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /views/button/re-optimize.php: -------------------------------------------------------------------------------- 1 | __( 'Lossless', 'imagify' ), 22 | 1 => __( 'Smart', 'imagify' ), 23 | 2 => __( 'Smart', 'imagify' ), 24 | ]; 25 | $level_label = $level_labels[ $data['optimization_level'] ]; 26 | 27 | $html_atts = $this->build_attributes( $data['atts'] ); 28 | ?> 29 | 30 | > 31 | 32 | 33 | ' . esc_html( $level_label ) . '' 38 | ); 39 | ?> 40 | 41 | 42 | 43 | print_js_template_in_footer( 'button/processing' ); 46 | } 47 | -------------------------------------------------------------------------------- /classes/Admin/PluginFamilySubscriber.php: -------------------------------------------------------------------------------- 1 | plugin_family = $plugin_family; 28 | } 29 | 30 | /** 31 | * Returns an array of events this subscriber listens to 32 | * 33 | * @return array 34 | */ 35 | public static function get_subscribed_events() { 36 | $events = PluginFamily::get_subscribed_events(); 37 | 38 | return $events; 39 | } 40 | 41 | /** 42 | * Process to install & activate plugin. 43 | * 44 | * @return void 45 | */ 46 | public function install_activate() { 47 | $this->plugin_family->install_activate(); 48 | } 49 | 50 | /** 51 | * Display error notice if available. 52 | * 53 | * @return void 54 | */ 55 | public function display_error_notice() { 56 | $this->plugin_family->display_error_notice(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /inc/common/partners.php: -------------------------------------------------------------------------------- 1 | get_option_name(), 'imagify_maybe_delete_partner_on_option_update', 10, 2 ); 5 | /** 6 | * After the first API key has been successfully added, make sure the partner ID is deleted. 7 | * 8 | * @since 1.6.14 9 | * @author Grégory Viguier 10 | * 11 | * @param mixed $old_value The old option value. 12 | * @param mixed $new_value The new option value. 13 | */ 14 | function imagify_maybe_delete_partner_on_option_update( $old_value, $new_value ) { 15 | if ( empty( $old_value['api_key'] ) && ! empty( $new_value['api_key'] ) ) { 16 | imagify_delete_partner(); 17 | } 18 | } 19 | 20 | add_action( 'update_site_option_' . Imagify_Options::get_instance()->get_option_name(), 'imagify_maybe_delete_partner_on_network_option_update', 10, 3 ); 21 | /** 22 | * After the first API key has been successfully added to the network option, make sure the partner ID is deleted. 23 | * 24 | * @since 1.6.14 25 | * @author Grégory Viguier 26 | * 27 | * @param string $option Name of the network option. 28 | * @param mixed $new_value The new network option value. 29 | * @param mixed $old_value The old network option value. 30 | */ 31 | function imagify_maybe_delete_partner_on_network_option_update( $option, $new_value, $old_value ) { 32 | imagify_maybe_delete_partner_on_option_update( $old_value, $new_value ); 33 | } 34 | -------------------------------------------------------------------------------- /classes/Media/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 41 | } 42 | 43 | /** 44 | * Returns the subscribers array 45 | * 46 | * @return array 47 | */ 48 | public function get_subscribers(): array { 49 | return $this->subscribers; 50 | } 51 | 52 | /** 53 | * Registers the provided classes 54 | * 55 | * @return void 56 | */ 57 | public function register(): void { 58 | $this->getContainer()->add( Upload::class ); 59 | 60 | $this->getContainer()->addShared( Subscriber::class ) 61 | ->addArgument( Upload::class ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /classes/Avif/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 42 | } 43 | 44 | /** 45 | * Registers the provided classes 46 | * 47 | * @return void 48 | */ 49 | public function register(): void { 50 | $this->getContainer()->addShared( Display::class ); 51 | $this->getContainer()->addShared( RewriteRules::class ); 52 | } 53 | 54 | /** 55 | * Returns the subscribers array 56 | * 57 | * @return array 58 | */ 59 | public function get_subscribers() { 60 | return $this->subscribers; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /classes/Webp/ServiceProvider.php: -------------------------------------------------------------------------------- 1 | provides, true ); 42 | } 43 | 44 | /** 45 | * Registers the provided classes 46 | * 47 | * @return void 48 | */ 49 | public function register(): void { 50 | $this->getContainer()->addShared( Display::class ); 51 | $this->getContainer()->addShared( RewriteRules::class ); 52 | } 53 | 54 | /** 55 | * Returns the subscribers array 56 | * 57 | * @return array 58 | */ 59 | public function get_subscribers() { 60 | return $this->subscribers; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /inc/deprecated/classes/class-imagify-abstract-db-deprecated.php: -------------------------------------------------------------------------------- 1 | value = $value; 36 | } else { 37 | throw new InvalidArgumentException('Incorrect type for value.'); 38 | } 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function getValue() 45 | { 46 | return $this->value; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /assets/js/admin-bar.js: -------------------------------------------------------------------------------- 1 | // Admin bar ======================================================================================= 2 | (function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names 3 | 4 | var busy = false; 5 | 6 | $( d ).on( 'mouseenter', '#wp-admin-bar-imagify', function() { 7 | var $adminBarProfile, url, $adminBarPricing; 8 | 9 | if ( true === busy ) { 10 | return; 11 | } 12 | 13 | busy = true; 14 | 15 | $adminBarProfile = $( '#wp-admin-bar-imagify-profile-content' ); 16 | $adminBarPricing = $( '#wp-admin-bar-imagify-pricing-content' ); 17 | 18 | if ( ! $adminBarProfile.is( ':empty' ) ) { 19 | return; 20 | } 21 | 22 | if ( w.ajaxurl ) { 23 | url = w.ajaxurl; 24 | } else { 25 | url = w.imagifyAdminBar.ajaxurl; 26 | } 27 | 28 | url += url.indexOf( '?' ) > 0 ? '&' : '?'; 29 | 30 | $.get( url + 'action=imagify_get_admin_bar_profile&imagifygetadminbarprofilenonce=' + $( '#imagifygetadminbarprofilenonce' ).val() ) 31 | .done( function( response ) { 32 | var $templates = response.data; 33 | $( '#wp-admin-bar-imagify-profile-loading' ).remove(); 34 | if ( $templates.admin_bar_pricing ) { 35 | $adminBarPricing.html( $templates.admin_bar_pricing ); 36 | } else { 37 | $adminBarPricing.remove(); 38 | } 39 | 40 | if ( $templates.admin_bar_status ) { 41 | $adminBarProfile.html( $templates.admin_bar_status ); 42 | } 43 | 44 | busy = false; 45 | } ); 46 | } ); 47 | 48 | } )(jQuery, document, window); 49 | -------------------------------------------------------------------------------- /inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php: -------------------------------------------------------------------------------- 1 | enqueue_style( 'admin' )->enqueue_script( 'library' ); 27 | return; 28 | } 29 | 30 | /** 31 | * NGG Bulk Optimization. 32 | */ 33 | $bulk_screen_id = imagify_get_ngg_bulk_screen_id(); 34 | 35 | if ( ! imagify_is_screen( $bulk_screen_id ) ) { 36 | return; 37 | } 38 | 39 | $assets->remove_deferred_localization( 'bulk', 'imagifyBulk' ); 40 | 41 | $l10n = $assets->get_localization_data( 42 | 'bulk', 43 | [ 44 | 'bufferSizes' => [ 45 | 'ngg' => 4, 46 | ], 47 | ] 48 | ); 49 | 50 | /** This filter is documented in inc/functions/i18n.php */ 51 | $l10n['bufferSizes'] = apply_filters( 'imagify_bulk_buffer_sizes', $l10n['bufferSizes'] ); 52 | 53 | $assets->enqueue_assets( [ 'pricing-modal', 'bulk' ] )->localize( 'imagifyBulk', $l10n ); 54 | } 55 | -------------------------------------------------------------------------------- /classes/WriteFile/WriteFileInterface.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 23 | -------------------------------------------------------------------------------- /assets/images/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/classes/class-imagify-cron-library-size.php: -------------------------------------------------------------------------------- 1 | 'imagify_update_estimate_sizes', 60 | '_ajax_nonce' => wp_create_nonce( 'update_estimate_sizes' ), 61 | ] 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/migration/LogMigrator.php: -------------------------------------------------------------------------------- 1 | source = $source_logger; 40 | $this->destination = $destination_logger; 41 | } 42 | 43 | /** 44 | * Migrate an action log. 45 | * 46 | * @param int $source_action_id Source logger object. 47 | * @param int $destination_action_id Destination logger object. 48 | */ 49 | public function migrate( $source_action_id, $destination_action_id ) { 50 | $logs = $this->source->get_logs( $source_action_id ); 51 | 52 | foreach ( $logs as $log ) { 53 | if ( absint( $log->get_action_id() ) === absint( $source_action_id ) ) { 54 | $this->destination->log( $destination_action_id, $log->get_message(), $log->get_date() ); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /classes/CLI/BulkOptimizeCommand.php: -------------------------------------------------------------------------------- 1 | run_optimize( $context, $level ); 27 | } 28 | 29 | \WP_CLI::log( 'Imagify bulk optimization triggered.' ); 30 | } 31 | 32 | /** 33 | * {@inheritdoc} 34 | */ 35 | protected function get_command_name(): string { 36 | return 'bulk-optimize'; 37 | } 38 | 39 | /** 40 | * {@inheritdoc} 41 | */ 42 | public function get_description(): string { 43 | return 'Run the bulk optimization'; 44 | } 45 | 46 | /** 47 | * {@inheritdoc} 48 | */ 49 | public function get_synopsis(): array { 50 | return [ 51 | [ 52 | 'type' => 'positional', 53 | 'name' => 'contexts', 54 | 'description' => 'The context(s) to run the bulk optimization for. Possible values are wp and custom-folders.', 55 | 'optional' => false, 56 | 'repeating' => true, 57 | ], 58 | [ 59 | 'type' => 'flag', 60 | 'name' => 'lossless', 61 | 'description' => 'Use lossless compression.', 62 | 'optional' => true, 63 | ], 64 | ]; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /views/part-bulk-optimization-header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

– Imagify

4 | 5 |
6 | 7 |

8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

16 | 17 | print_template( 'part-documentation-link' ); ?> 18 |
19 | get_extensions_pattern() . '|avif'; 32 | $home_root = wp_parse_url( home_url( '/' ) ); 33 | $home_root = $home_root['path']; 34 | 35 | return trim( 36 | ' 37 | location ~* ^(' . $home_root . '.+)\.(' . $extensions . ')$ { 38 | add_header Vary Accept; 39 | 40 | set $canavif 1; 41 | 42 | if ($http_accept !~* "avif"){ 43 | set $canavif 0; 44 | } 45 | 46 | if (!-f $request_filename.avif) { 47 | set $canavif 0; 48 | 49 | } 50 | if ($canavif = 1){ 51 | rewrite ^(.*) $1.avif; 52 | break; 53 | } 54 | 55 | set $canwebp 1; 56 | 57 | if ($http_accept !~* "webp"){ 58 | set $canwebp 0; 59 | } 60 | 61 | if (!-f $request_filename.webp) { 62 | set $canwebp 0; 63 | 64 | } 65 | if ($canwebp = 1){ 66 | rewrite ^(.*) $1.webp; 67 | break; 68 | } 69 | }' 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /assets/images/icon-pack.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/lib/cron-expression/CronExpression_MonthField.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class CronExpression_MonthField extends CronExpression_AbstractField 9 | { 10 | /** 11 | * {@inheritdoc} 12 | */ 13 | public function isSatisfiedBy(DateTime $date, $value) 14 | { 15 | // Convert text month values to integers 16 | $value = str_ireplace( 17 | array( 18 | 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 19 | 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC' 20 | ), 21 | range(1, 12), 22 | $value 23 | ); 24 | 25 | return $this->isSatisfied($date->format('m'), $value); 26 | } 27 | 28 | /** 29 | * {@inheritdoc} 30 | */ 31 | public function increment(DateTime $date, $invert = false) 32 | { 33 | if ($invert) { 34 | // $date->modify('last day of previous month'); // remove for php 5.2 compat 35 | $date->modify('previous month'); 36 | $date->modify($date->format('Y-m-t')); 37 | $date->setTime(23, 59); 38 | } else { 39 | //$date->modify('first day of next month'); // remove for php 5.2 compat 40 | $date->modify('next month'); 41 | $date->modify($date->format('Y-m-01')); 42 | $date->setTime(0, 0); 43 | } 44 | 45 | return $this; 46 | } 47 | 48 | /** 49 | * {@inheritdoc} 50 | */ 51 | public function validate($value) 52 | { 53 | return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /classes/Avif/RewriteRules/Apache.php: -------------------------------------------------------------------------------- 1 | get_extensions_pattern(); 29 | $extensions = str_replace( '|avif', '', $extensions ); 30 | $home_root = wp_parse_url( home_url( '/' ) ); 31 | $home_root = $home_root['path']; 32 | 33 | return trim( 34 | ' 35 | 36 | # Vary: Accept for all the requests to jpeg, png, and gif. 37 | SetEnvIf Request_URI "\.(' . $extensions . ')$" REQUEST_image 38 | 39 | 40 | 41 | RewriteEngine On 42 | RewriteBase ' . $home_root . ' 43 | 44 | # Check if browser supports AVIF images. 45 | # Update the MIME type accordingly. 46 | RewriteCond %{HTTP_ACCEPT} image/avif 47 | 48 | # Check if AVIF replacement image exists. 49 | RewriteCond %{REQUEST_FILENAME}.avif -f 50 | 51 | # Serve AVIF image instead. 52 | RewriteRule (.+)\.(' . $extensions . ')$ $1.$2.avif [T=image/avif,NC] 53 | 54 | 55 | 56 | # Update the MIME type accordingly. 57 | Header append Vary Accept env=REQUEST_image 58 | ' 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/ActionScheduler_InvalidActionException.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Shape 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /classes/Webp/RewriteRules/Apache.php: -------------------------------------------------------------------------------- 1 | get_extensions_pattern(); 33 | $extensions = str_replace( '|webp', '', $extensions ); 34 | $home_root = wp_parse_url( home_url( '/' ) ); 35 | $home_root = $home_root['path']; 36 | 37 | return trim( 38 | ' 39 | 40 | # Vary: Accept for all the requests to jpeg, png, and gif. 41 | SetEnvIf Request_URI "\.(' . $extensions . ')$" REQUEST_image 42 | 43 | 44 | 45 | RewriteEngine On 46 | RewriteBase ' . $home_root . ' 47 | 48 | # Check if browser supports WebP images. 49 | RewriteCond %{HTTP_ACCEPT} image/webp 50 | 51 | # Check if WebP replacement image exists. 52 | RewriteCond %{REQUEST_FILENAME}.webp -f 53 | 54 | # Serve WebP image instead. 55 | RewriteRule (.+)\.(' . $extensions . ')$ $1.$2.webp [T=image/webp,NC] 56 | 57 | 58 | 59 | Header append Vary Accept env=REQUEST_image 60 | ' 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /assets/images/logo-termly.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/js/admin.min.js: -------------------------------------------------------------------------------- 1 | window.imagify=window.imagify||{},jQuery.extend(window.imagify,{concat:0/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^}]+?)\}\}(?!\})/g,variable:"data"};return function(){return(a=a||_.template(jQuery("#tmpl-"+o).html(),null,e))(i=i||{})}})},humanSize:function(i){var a;return 0===i?"0 kB":(a=parseInt(Math.floor(Math.log(i)/Math.log(1024)),10),(i/Math.pow(1024,a)).toFixed(2)+" "+["B","kB","MB"][a])}}),function(a,i,e){a(".imagify-modal").attr("aria-hidden","true"),a(i).on("click.imagify",".imagify-modal-trigger",function(i){i.preventDefault(),e.imagify.openModal(a(this))}).on("click.imagify",".imagify-modal .close-btn",function(){a(this).closest(".imagify-modal").fadeOut(400).attr("aria-hidden","true").removeClass("modal-is-open").trigger("modalClosed.imagify"),a("body").removeClass("imagify-modal-is-open")}).on("blur.imagify",".imagify-modal .close-btn",function(){var i=a(this).closest(".imagify-modal");"false"===i.attr("aria-hidden")&&i.attr("tabindex","0").trigger("focus").removeAttr("tabindex")}).on("click.imagify",".imagify-modal",function(i){a(i.target).filter(".modal-is-open").find(".close-btn").trigger("click.imagify")}).on("keydown.imagify",function(i){27===i.keyCode&&0 5 | 14 | provides, true ); 46 | } 47 | 48 | /** 49 | * Registers the provided classes 50 | * 51 | * @return void 52 | */ 53 | public function register(): void { 54 | $this->getContainer()->addShared( AdminBar::class ) 55 | ->addArgument( User::class ); 56 | $this->getContainer()->addShared( AdminSubscriber::class ) 57 | ->addArgument( User::class ); 58 | 59 | $this->getContainer()->add( PluginFamily::class ); 60 | $this->getContainer()->addShared( PluginFamilySubscriber::class ) 61 | ->addArgument( PluginFamily::class ); 62 | } 63 | 64 | /** 65 | * Returns the subscribers array 66 | * 67 | * @return array 68 | */ 69 | public function get_subscribers() { 70 | return $this->subscribers; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /inc/functions/formatting.php: -------------------------------------------------------------------------------- 1 | 0 ) { 24 | if ( $decimal <= 0.5 ) { 25 | return floatval( $number[0] ) + 0.5; 26 | } 27 | if ( $decimal <= 0.99 ) { 28 | return floatval( $number[0] ) + 1; 29 | } 30 | return 1; 31 | } 32 | 33 | return floatval( $number ); 34 | } 35 | 36 | /** 37 | * Convert number of bytes largest unit bytes will fit into. 38 | * This is a clone of size_format(), but with a non-breaking space. 39 | * 40 | * @since 1.7 41 | * @since 1.8.1 Automatic $decimals. 42 | * @author Grégory Viguier 43 | * 44 | * @param int|string $bytes Number of bytes. Note max integer size for integers. 45 | * @param int $decimals Optional. Precision of number of decimal places. 46 | * If negative or not an integer, $decimals value is "automatic": 0 if $bytes <= 1GB, or 1 if > 1GB. 47 | * @return string|false False on failure. Number string on success. 48 | */ 49 | function imagify_size_format( $bytes, $decimals = -1 ) { 50 | 51 | if ( $decimals < 0 || ! is_int( $decimals ) ) { 52 | $decimals = $bytes > pow( 1024, 3 ) ? 1 : 0; 53 | } 54 | 55 | $bytes = @size_format( $bytes, $decimals ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 56 | return str_replace( ' ', ' ', $bytes ); 57 | } 58 | -------------------------------------------------------------------------------- /inc/3rd-party/formidable-pro/classes/Main.php: -------------------------------------------------------------------------------- 1 | true` argument. 9 | * 10 | * @since 1.6.13 11 | * @author Grégory Viguier 12 | */ 13 | class Main { 14 | use InstanceGetterTrait; 15 | 16 | /** 17 | * Class version. 18 | * 19 | * @var string 20 | */ 21 | const VERSION = '1.1'; 22 | 23 | /** 24 | * Set to true when the current query comes from Imagify. 25 | * 26 | * @var int 27 | */ 28 | protected $is_imagify; 29 | 30 | /** 31 | * Launch the hooks. 32 | * 33 | * @since 1.6.13 34 | * @author Grégory Viguier 35 | */ 36 | public function init() { 37 | add_action( 'parse_query', [ $this, 'maybe_remove_media_library_filter' ] ); 38 | add_action( 'posts_selection', [ $this, 'maybe_put_media_library_filter_back' ] ); 39 | } 40 | 41 | /** 42 | * Fires before the 'pre_get_posts' hook. 43 | * 44 | * @since 1.6.13 45 | * @author Grégory Viguier 46 | * 47 | * @param object $wp_query The WP_Query instance (passed by reference). 48 | */ 49 | public function maybe_remove_media_library_filter( $wp_query ) { 50 | if ( ! empty( $wp_query->query_vars['is_imagify'] ) && class_exists( 'FrmProFileField' ) ) { 51 | $this->is_imagify = true; 52 | remove_action( 'pre_get_posts', 'FrmProFileField::filter_media_library', 99 ); 53 | } else { 54 | $this->is_imagify = false; 55 | } 56 | } 57 | 58 | /** 59 | * Fires after the 'pre_get_posts' hook. 60 | * 61 | * @since 1.6.13 62 | * @author Grégory Viguier 63 | */ 64 | public function maybe_put_media_library_filter_back() { 65 | if ( $this->is_imagify ) { 66 | add_action( 'pre_get_posts', 'FrmProFileField::filter_media_library', 99 ); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /classes/Media/Upload/Upload.php: -------------------------------------------------------------------------------- 1 | _x( 'Optimized', 'Media Files', 'imagify' ), 33 | 'unoptimized' => _x( 'Unoptimized', 'Media Files', 'imagify' ), 34 | 'errors' => _x( 'Errors', 'Media Files', 'imagify' ), 35 | ]; 36 | 37 | echo ''; 38 | echo ' '; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /assets/images/logo-rank-math.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/3rd-party/amazon-s3-and-cloudfront/amazon-s3-and-cloudfront.php: -------------------------------------------------------------------------------- 1 | = 0 ) { 27 | // A new version that removes a punlic method. 28 | return false; 29 | } 30 | 31 | return true; 32 | } 33 | 34 | if ( function_exists( 'as3cf_pro_init' ) ) { 35 | // WP Offload S3 Pro. 36 | $version = ! empty( $GLOBALS['aws_meta']['amazon-s3-and-cloudfront-pro']['version'] ) ? $GLOBALS['aws_meta']['amazon-s3-and-cloudfront-pro']['version'] : false; 37 | 38 | if ( ! $version ) { 39 | return false; 40 | } 41 | 42 | if ( ! function_exists( 'amazon_web_services_init' ) && version_compare( $version, '1.6' ) < 0 ) { 43 | // Old version, plugin Amazon Web Services is required. 44 | return false; 45 | } 46 | 47 | if ( version_compare( $version, '2.3' ) >= 0 ) { 48 | // A new version that removes a punlic method. 49 | return false; 50 | } 51 | 52 | return true; 53 | } 54 | 55 | return false; 56 | } 57 | 58 | if ( imagify_load_as3cf_compat() ) : 59 | 60 | class_alias( '\\Imagify\\ThirdParty\\AS3CF\\Main', '\\Imagify_AS3CF' ); 61 | 62 | add_action( 'imagify_loaded', [ \Imagify\ThirdParty\AS3CF\Main::get_instance(), 'init' ], 1 ); 63 | 64 | endif; 65 | -------------------------------------------------------------------------------- /classes/Bulk/BulkInterface.php: -------------------------------------------------------------------------------- 1 | __wakeup() for details. 10 | * 11 | * @var null 12 | */ 13 | private $timestamp = null; 14 | 15 | /** 16 | * Calculate when the next instance of this schedule would run based on a given date & time. 17 | * 18 | * @param DateTime $after Timestamp. 19 | * 20 | * @return DateTime|null 21 | */ 22 | public function calculate_next( DateTime $after ) { 23 | return null; 24 | } 25 | 26 | /** 27 | * Cancelled actions should never have a next schedule, even if get_next() 28 | * is called with $after < $this->scheduled_date. 29 | * 30 | * @param DateTime $after Timestamp. 31 | * @return DateTime|null 32 | */ 33 | public function get_next( DateTime $after ) { 34 | return null; 35 | } 36 | 37 | /** 38 | * Action is not recurring. 39 | * 40 | * @return bool 41 | */ 42 | public function is_recurring() { 43 | return false; 44 | } 45 | 46 | /** 47 | * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 48 | * 49 | * Prior to Action Scheduler 3.0.0, schedules used different property names to refer 50 | * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp 51 | * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 52 | * aligned properties and property names for better inheritance. To maintain backward 53 | * compatibility with schedules serialized and stored prior to 3.0, we need to correctly 54 | * map the old property names with matching visibility. 55 | */ 56 | public function __wakeup() { 57 | if ( ! is_null( $this->timestamp ) ) { 58 | $this->scheduled_timestamp = $this->timestamp; 59 | unset( $this->timestamp ); 60 | } 61 | parent::__wakeup(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /views/input/selector.php: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 47 |
48 | -------------------------------------------------------------------------------- /assets/js/library.js: -------------------------------------------------------------------------------- 1 | (function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names 2 | 3 | var bulkOpt; 4 | /** 5 | * Add a "Imagify'em all" in the select list. 6 | */ 7 | bulkOpt = ''; 8 | 9 | if ( $( '.button-imagify-optimize-missing-sizes' ).length ) { 10 | // If we have items that have missing sizes. 11 | bulkOpt += ''; 12 | } 13 | 14 | if ( imagifyLibrary.backupOption || $( '.attachment-has-backup' ).length ) { 15 | // If the backup option is enabled, or if we have items that can be restored. 16 | bulkOpt += ''; 17 | } 18 | 19 | $( '.bulkactions select[name="action"] option:last-child' ).before( bulkOpt ); 20 | $( '.bulkactions select[name="action2"] option:last-child' ).before( bulkOpt ); 21 | $( '#bulkaction option:last-child' ).after( bulkOpt ); 22 | 23 | /** 24 | * Process optimization for all selected images. 25 | */ 26 | $( '#doaction' ) 27 | .add( '#doaction2' ) 28 | .add( '#bulkaction + [name="showThickbox"]' ) 29 | .on( 'click', function( e ) { 30 | var value = $( this ).prev( 'select' ).val().split( '|' ), 31 | action, ids; 32 | 33 | if ( 'imagify-bulk' !== value[0] ) { 34 | return; 35 | } 36 | 37 | e.preventDefault(); 38 | 39 | action = value[1]; 40 | ids = $( 'input[name^="media"]:checked, input[name^="doaction"]:checked' ).map( function() { 41 | return this.value; 42 | } ).get(); 43 | 44 | ids.forEach( function( id, index ) { 45 | setTimeout( function() { 46 | $( 'table .imagify-data-actions-container[data-id="' + id + '"] .button-imagify-' + action ).first().trigger( 'click' ); 47 | }, index * 300 ); 48 | } ); 49 | } ); 50 | 51 | } )(jQuery, document, window); 52 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/lib/cron-expression/CronExpression_FieldFactory.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://en.wikipedia.org/wiki/Cron 8 | */ 9 | class CronExpression_FieldFactory 10 | { 11 | /** 12 | * @var array Cache of instantiated fields 13 | */ 14 | private $fields = array(); 15 | 16 | /** 17 | * Get an instance of a field object for a cron expression position 18 | * 19 | * @param int $position CRON expression position value to retrieve 20 | * 21 | * @return CronExpression_FieldInterface 22 | * @throws InvalidArgumentException if a position is not valid 23 | */ 24 | public function getField($position) 25 | { 26 | if (!isset($this->fields[$position])) { 27 | switch ($position) { 28 | case 0: 29 | $this->fields[$position] = new CronExpression_MinutesField(); 30 | break; 31 | case 1: 32 | $this->fields[$position] = new CronExpression_HoursField(); 33 | break; 34 | case 2: 35 | $this->fields[$position] = new CronExpression_DayOfMonthField(); 36 | break; 37 | case 3: 38 | $this->fields[$position] = new CronExpression_MonthField(); 39 | break; 40 | case 4: 41 | $this->fields[$position] = new CronExpression_DayOfWeekField(); 42 | break; 43 | case 5: 44 | $this->fields[$position] = new CronExpression_YearField(); 45 | break; 46 | default: 47 | throw new InvalidArgumentException( 48 | $position . ' is not a valid position' 49 | ); 50 | } 51 | } 52 | 53 | return $this->fields[$position]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /inc/classes/class-imagify-data.php: -------------------------------------------------------------------------------- 1 | 0.0, 37 | 'average_size_images_per_month' => 0.0, 38 | 'previous_quota_percent' => 0.0, 39 | ]; 40 | 41 | /** ----------------------------------------------------------------------------------------- */ 42 | /** SANITIZATION, VALIDATION ================================================================ */ 43 | /** ----------------------------------------------------------------------------------------- */ 44 | 45 | /** 46 | * Sanitize and validate an option value. Basic casts have been made. 47 | * 48 | * @since 1.7 49 | * @author Grégory Viguier 50 | * @access public 51 | * 52 | * @param string $key The option key. 53 | * @param mixed $value The value. 54 | * @param mixed $default_value The default value. 55 | * @return mixed 56 | */ 57 | public function sanitize_and_validate_value( $key, $value, $default_value ) { 58 | switch ( $key ) { 59 | case 'total_size_images_library': 60 | case 'average_size_images_per_month': 61 | if ( $value <= 0 ) { 62 | // Invalid. 63 | return 0.0; 64 | } 65 | return $value; 66 | 67 | case 'previous_quota_percent': 68 | $value = round( $value, 1 ); 69 | return min( max( 0, $value ), 100 ); 70 | } 71 | 72 | return false; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /inc/3rd-party/nextgen-gallery/inc/admin/gallery.php: -------------------------------------------------------------------------------- 1 | $path ) { 42 | if ( false !== strpos( $url['path'], $path ) ) { 43 | $paths = false; 44 | break; 45 | } 46 | } 47 | 48 | if ( $paths ) { 49 | return $r; 50 | } 51 | 52 | // Randomize the User-Agent. 53 | if ( ! isset( $user_agent ) ) { 54 | $user_agent = wp_generate_password( 12, false ); 55 | /** 56 | * Filter the User-Agent used for requests "to self". 57 | * 58 | * @since 1.7.1 59 | * @author Grégory Viguier 60 | * 61 | * @param string $user_agent The User-Agent. 62 | * @param array $r An array of HTTP request arguments. 63 | * @param array $url The request URL, parsed. 64 | */ 65 | $user_agent = apply_filters( 'imagify_user_agent_for_internal_requests', $user_agent, $r, $url ); 66 | } 67 | 68 | $r['user-agent'] = $user_agent; 69 | 70 | return $r; 71 | } 72 | -------------------------------------------------------------------------------- /classes/Avif/RewriteRules/IIS.php: -------------------------------------------------------------------------------- 1 | get_extensions_pattern(); 29 | $extensions = str_replace( '|avif', '', $extensions ); 30 | $home_root = wp_parse_url( home_url( '/' ) ); 31 | $home_root = $home_root['path']; 32 | 33 | return trim( 34 | ' 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | ' 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /inc/Dependencies/ActionScheduler/classes/migration/ActionScheduler_DBStoreMigrator.php: -------------------------------------------------------------------------------- 1 | $this->get_scheduled_date_string( $action, $last_attempt_date ), 40 | 'last_attempt_local' => $this->get_scheduled_date_string_local( $action, $last_attempt_date ), 41 | ); 42 | 43 | $wpdb->update( $wpdb->actionscheduler_actions, $data, array( 'action_id' => $action_id ), array( '%s', '%s' ), array( '%d' ) ); 44 | } 45 | 46 | return $action_id; 47 | } catch ( \Exception $e ) { 48 | // translators: %s is an error message. 49 | throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); 50 | } 51 | } 52 | } 53 | --------------------------------------------------------------------------------