return 'home'; } elseif ( is_page() ) { return 'page'; } elseif ( is_single() ) { return 'single'; } elseif ( is_category() ) { return 'category'; } elseif ( is_tag() ) { return 'tag'; } elseif ( is_archive() ) { return 'archive'; } else { return get_post_type(); } } private function get_included_locations() { $include = $this->array_utils->get_array_value( $this->get_lazy_load_options(), 'include' ); return $this->array_utils->ensure_array( $include ); } public function is_excluded_wp_location() { $included_locations = $this->get_included_locations(); if ( empty( $included_locations ) ) { // If not settings are set, probably, all are disabled. return true; } // Check if location is disabled. $wp_location = $this->get_wp_location(); return isset( $included_locations[ $wp_location ] ) && empty( $included_locations[ $wp_location ] ); } public function is_image_extension_supported( $ext, $src ) { if ( empty( $ext ) ) { return $this->is_image_without_extension_supported( $src ); } $ext = strtolower( $ext ); if ( ! in_array( $ext, array( 'jpg', 'jpeg', 'gif', 'png', 'svg', 'webp' ), true ) ) { return false; } return ! $this->is_format_excluded( $ext ); } private function is_image_without_extension_supported( $src ) { $pattern = '#(gravatar.com|googleusercontent.com)#is'; $pattern = apply_filters( 'wp_smush_without_extension_supported_regex', $pattern ); return preg_match( $pattern, $src ); } public function is_format_excluded( $needle ) { $supported_formats = $this->array_utils->get_array_value( $this->get_lazy_load_options(), 'format' ); $supported_formats = $this->array_utils->ensure_array( $supported_formats ); // Ensure 'jpeg' and 'jpg' are treated as the same format. if ( isset( $supported_formats['jpeg'] ) ) { $supported_formats['jpg'] = $supported_formats['jpeg']; } return in_array( false, $supported_formats, true ) && isset( $supported_formats[ $needle ] ) && ! $supported_formats[ $needle ]; } public function should_lazy_load_embed_video() { if ( $this->is_format_excluded( 'iframe' ) ) { return false; } $supported_formats = $this->array_utils->get_array_value( $this->get_lazy_load_options(), 'format' ); return ! empty( $supported_formats['embed_video'] ); } }

Error thrown

Class "Smush\Core\Lazy_Load\Lazy_Load_Helper" not found