ue( $list ) ); } /** * Returns server path of source image. * * @param string $path Relative path of source image. * * @return string Server path of source image. */ private function get_attachment_directory( string $path ): string { $upload = wp_upload_dir(); $path_directory = rtrim( dirname( $path ), '/\\.' ); $source = rtrim( $upload['basedir'], '/\\' ) . '/' . $path_directory . '/'; return str_replace( '\\', '/', $source ); } /** * @return void * * @internal */ public function save_paths_to_conversion() { $paths = array_unique( $this->uploaded_paths ); if ( ! $paths ) { return; } $this->cron_initiator->add_paths_to_conversion( $paths, true ); $this->cron_initiator->init_async_conversion( true ); } }