first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
/**
* Class WPML_Media_File_Factory
*/
class WPML_Media_File_Factory {
/**
* @param $attachment_id
*
* @return WPML_Media_File
*/
public function create( $attachment_id ) {
global $wpdb;
return new WPML_Media_File( $attachment_id, $this->get_wp_filesystem(), $wpdb );
}
private function get_wp_filesystem() {
global $wp_filesystem;
if ( null === $wp_filesystem ) {
WP_Filesystem();
}
return $wp_filesystem;
}
}