| 1 |
<?php |
| 2 |
namespace Barn2\Plugin\Posts_Table_Search_Sort; |
| 3 |
|
| 4 |
/** |
| 5 |
* Factory to create/return the shared plugin instance. |
| 6 |
* |
| 7 |
* @package Barn2\posts-table-search-sort |
| 8 |
* @author Barn2 Plugins <support@barn2.com> |
| 9 |
* @license GPL-3.0 |
| 10 |
* @copyright Barn2 Media Ltd |
| 11 |
*/ |
| 12 |
class Plugin_Factory { |
| 13 |
|
| 14 |
private static $plugin = null; |
| 15 |
|
| 16 |
public static function create( $file, $version ) { |
| 17 |
if ( null === self::$plugin ) { |
| 18 |
self::$plugin = new Plugin( $file, $version ); |
| 19 |
} |
| 20 |
return self::$plugin; |
| 21 |
} |
| 22 |
|
| 23 |
} |
| 24 |
|