Submit
Path:
~
/
home
/
getwphos
/
www
/
shellfish
/
wp-content
/
plugins
/
redux-framework
/
redux-core
/
inc
/
classes
/
File Content:
class-redux-instances.php
<?php /** * Redux Framework Instance Container Class * Automatically captures and stores all instances * of ReduxFramework at instantiation. * * @package Redux_Framework/Classes * @subpackage Core * @noinspection PhpIgnoredClassAliasDeclaration */ defined( 'ABSPATH' ) || exit; if ( ! class_exists( 'Redux_Instances', false ) ) { /** * Class Redux_Instances */ class Redux_Instances { /** * ReduxFramework instances * * @var ReduxFramework[] */ private static $instances; /** * Get Instance * Get Redux_Instances instance * OR an instance of ReduxFramework by [opt_name] * * @param string|false $opt_name the defined opt_name. * * @return ReduxFramework|Redux_Instances class instance */ public static function get_instance( $opt_name = false ) { if ( $opt_name && ! empty( self::$instances[ $opt_name ] ) ) { return self::$instances[ $opt_name ]; } return new self(); } /** * Shim for old get_redux_instance method. * * @param string|false $opt_name the defined opt_name. * * @return ReduxFramework class instance */ public static function get_redux_instance( $opt_name = '' ) { return self::get_instance( $opt_name ); } /** * Get all instantiated ReduxFramework instances (so far) * * @return array|null [type] [description] */ public static function get_all_instances(): ?array { return self::$instances; } /** * Redux_Instances constructor. * * @param mixed $redux_framework Is object. */ public function __construct( $redux_framework = false ) { if ( false !== $redux_framework ) { $this->store( $redux_framework ); } else { add_action( 'redux/construct', array( $this, 'store' ), 5, 1 ); } } /** * Action hook callback. * * @param object $redux_framework Pointer. */ public function store( $redux_framework ) { if ( $redux_framework instanceof ReduxFramework ) { $key = $redux_framework->args['opt_name']; self::$instances[ $key ] = $redux_framework; } } } } if ( ! class_exists( 'ReduxFrameworkInstances' ) ) { class_alias( 'Redux_Instances', 'ReduxFrameworkInstances' ); } if ( ! function_exists( 'get_redux_instance' ) ) { /** * Shim function that some theme oddly used. * * @param string|false $opt_name the defined opt_name. * * @return ReduxFramework class instance */ function get_redux_instance( $opt_name ) { return Redux_Instances::get_instance( $opt_name ); } } if ( ! function_exists( 'get_all_redux_instances' ) ) { /** * Fetch all instances of ReduxFramework * as an associative array. * * @return array format ['opt_name' => $ReduxFramework] */ function get_all_redux_instances(): ?array { return Redux_Instances::get_all_instances(); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
class-redux-admin-notices.php
6703 bytes
0644
class-redux-ajax-save.php
6166 bytes
0644
class-redux-ajax-select2.php
3027 bytes
0644
class-redux-ajax-typography.php
1343 bytes
0644
class-redux-api.php
53888 bytes
0644
class-redux-args.php
11805 bytes
0644
class-redux-autoloader.php
2116 bytes
0644
class-redux-cdn.php
9937 bytes
0644
class-redux-class.php
1142 bytes
0644
class-redux-colors.php
11587 bytes
0644
class-redux-enqueue.php
19925 bytes
0644
class-redux-extension-abstract.php
6312 bytes
0644
class-redux-extensions.php
2236 bytes
0644
class-redux-field.php
5214 bytes
0644
class-redux-filesystem.php
29712 bytes
0644
class-redux-functions-ex.php
15919 bytes
0644
class-redux-functions.php
8827 bytes
0644
class-redux-helpers.php
37617 bytes
0644
class-redux-i18n.php
1313 bytes
0644
class-redux-installer-muter.php
506 bytes
0644
class-redux-instances.php
2831 bytes
0644
class-redux-network.php
2098 bytes
0644
class-redux-options-constructor.php
33772 bytes
0644
class-redux-options-defaults.php
6689 bytes
0644
class-redux-output.php
14619 bytes
0644
class-redux-page-render.php
37544 bytes
0644
class-redux-panel.php
14345 bytes
0644
class-redux-path.php
568 bytes
0644
class-redux-required.php
8692 bytes
0644
class-redux-sanitize.php
3778 bytes
0644
class-redux-thirdparty-fixes.php
3678 bytes
0644
class-redux-transients.php
844 bytes
0644
class-redux-validate.php
1560 bytes
0644
class-redux-validation.php
8427 bytes
0644
class-redux-wordpress-data.php
18511 bytes
0644
index.php
79 bytes
0644
N4ST4R_ID | Naxtarrr