From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../wp-includes/class-wp-widget-factory.php | 115 --------------------- 1 file changed, 115 deletions(-) delete mode 100644 srcs/wordpress/wp-includes/class-wp-widget-factory.php (limited to 'srcs/wordpress/wp-includes/class-wp-widget-factory.php') diff --git a/srcs/wordpress/wp-includes/class-wp-widget-factory.php b/srcs/wordpress/wp-includes/class-wp-widget-factory.php deleted file mode 100644 index ec5a96d..0000000 --- a/srcs/wordpress/wp-includes/class-wp-widget-factory.php +++ /dev/null @@ -1,115 +0,0 @@ -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(); - } - } -} -- cgit