diff --git a/php/class-media.php b/php/class-media.php index d3c85ebb7..35604d453 100644 --- a/php/class-media.php +++ b/php/class-media.php @@ -1911,6 +1911,32 @@ public function media_template() { public function editor_assets() { $deps = wp_script_is( 'cld-core', 'registered' ) ? array( 'cld-core' ) : array(); $this->plugin->register_assets(); // Ensure assets are registered. + + /** + * Filter the maximum number of files that can be imported from Cloudinary. + * + * @hook cloudinary_max_files_import + * @since 3.1.3 + * + * @param $max_files {int} The maximum number of files that can be imported from Cloudinary. + * + * @default 20 + * + * @return {int} + * + * @example + * plugin->dir_url . '/js/media-modal.js', null, $this->plugin->version, true ); wp_enqueue_script( 'cloudinary-media-library', CLOUDINARY_ENDPOINTS_MEDIA_LIBRARY, $deps, $this->plugin->version, true ); @@ -1924,6 +1950,7 @@ public function editor_assets() { 'cms_type' => 'wordpress', 'insert_caption' => __( 'Import', 'cloudinary' ), 'remove_header' => true, + 'max_files' => $max_files, 'integration' => array( 'type' => 'wordpress_plugin', 'platform' => 'WordPress ' . get_bloginfo( 'version' ), diff --git a/php/delivery/class-lazy-load.php b/php/delivery/class-lazy-load.php index cfbde17c1..126d8882b 100644 --- a/php/delivery/class-lazy-load.php +++ b/php/delivery/class-lazy-load.php @@ -86,22 +86,24 @@ public function bypass_lazy_load( $bypass, $tag_element ) { /** * Filter the classes that bypass lazy loading. * - * @hook cloudinary_lazy_load_bypass_classes - * @since 3.0.9 + * @hook cloudinary_lazy_load_bypass_classes + * @since 3.0.9 + * + * @param $classes {array} Classes that bypass the Lazy Load. + * + * @return {bool} * * @example *