-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapply "[ #1079 ] - class to handle uploads"
This reverts commit c5a96d6.
- Loading branch information
1 parent
fdd7111
commit ae1aa22
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
// Exit if accessed directly. | ||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
/** | ||
* Class Modula_Gallery_Upload | ||
* | ||
* Handles the fast gallery creation from uploaded .zip file | ||
* or from a choosen folder with images that reside on the server | ||
* | ||
* @since 2.10.3 | ||
*/ | ||
|
||
class Modula_Gallery_Upload { | ||
|
||
/** | ||
* Holds the class object. | ||
* | ||
* @var Modula_Gallery_Upload | ||
* | ||
* @since 2.10.3 | ||
*/ | ||
public static $instance = null; | ||
|
||
/** | ||
* Defines the default directory for the media browser | ||
* | ||
* @var string | ||
*/ | ||
public $default_dir = null; | ||
|
||
/** | ||
* Class constructor | ||
* | ||
* @since 2.10.3 | ||
*/ | ||
private function __construct() { | ||
} | ||
|
||
/** | ||
* Create an instance of the class | ||
* | ||
* @return Modula_Gallery_Upload | ||
* | ||
* @since 2.10.3 | ||
*/ | ||
public static function get_instance() { | ||
|
||
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Modula_Gallery_Upload ) ) { | ||
self::$instance = new Modula_Gallery_Upload(); | ||
} | ||
|
||
return self::$instance; | ||
} | ||
} | ||
|
||
Modula_Gallery_Upload::get_instance(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters