diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
| commit | 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch) | |
| tree | 39a1a4629749056191c05dfd899f931701b7acf3 /srcs/wordpress/wp-admin/includes/class-wp-ajax-upgrader-skin.php | |
| parent | 5afd237bbd22028b85532b8c0b3fcead49a00764 (diff) | |
| download | ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.gz ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.bz2 ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.zip | |
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/wordpress/wp-admin/includes/class-wp-ajax-upgrader-skin.php')
| -rw-r--r-- | srcs/wordpress/wp-admin/includes/class-wp-ajax-upgrader-skin.php | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/srcs/wordpress/wp-admin/includes/class-wp-ajax-upgrader-skin.php b/srcs/wordpress/wp-admin/includes/class-wp-ajax-upgrader-skin.php deleted file mode 100644 index 8acc9bf..0000000 --- a/srcs/wordpress/wp-admin/includes/class-wp-ajax-upgrader-skin.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -/** - * Upgrader API: WP_Ajax_Upgrader_Skin class - * - * @package WordPress - * @subpackage Upgrader - * @since 4.6.0 - */ - -/** - * Upgrader Skin for Ajax WordPress upgrades. - * - * This skin is designed to be used for Ajax updates. - * - * @since 4.6.0 - * - * @see Automatic_Upgrader_Skin - */ -class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin { - - /** - * Holds the WP_Error object. - * - * @since 4.6.0 - * @var null|WP_Error - */ - protected $errors = null; - - /** - * Constructor. - * - * @since 4.6.0 - * - * @param array $args Options for the upgrader, see WP_Upgrader_Skin::__construct(). - */ - public function __construct( $args = array() ) { - parent::__construct( $args ); - - $this->errors = new WP_Error(); - } - - /** - * Retrieves the list of errors. - * - * @since 4.6.0 - * - * @return WP_Error Errors during an upgrade. - */ - public function get_errors() { - return $this->errors; - } - - /** - * Retrieves a string for error messages. - * - * @since 4.6.0 - * - * @return string Error messages during an upgrade. - */ - public function get_error_messages() { - $messages = array(); - - foreach ( $this->errors->get_error_codes() as $error_code ) { - $error_data = $this->errors->get_error_data( $error_code ); - - if ( $error_data && is_string( $error_data ) ) { - $messages[] = $this->errors->get_error_message( $error_code ) . ' ' . esc_html( strip_tags( $error_data ) ); - } else { - $messages[] = $this->errors->get_error_message( $error_code ); - } - } - - return implode( ', ', $messages ); - } - - /** - * Stores a log entry for an error. - * - * @since 4.6.0 - * @since 5.3.0 Formalized the existing `...$args` parameter by adding it - * to the function signature. - * - * @param string|WP_Error $errors Errors. - * @param mixed ...$args Optional text replacements. - */ - public function error( $errors, ...$args ) { - if ( is_string( $errors ) ) { - $string = $errors; - if ( ! empty( $this->upgrader->strings[ $string ] ) ) { - $string = $this->upgrader->strings[ $string ]; - } - - if ( false !== strpos( $string, '%' ) ) { - if ( ! empty( $args ) ) { - $string = vsprintf( $string, $args ); - } - } - - // Count existing errors to generate a unique error code. - $errors_count = count( $this->errors->get_error_codes() ); - $this->errors->add( 'unknown_upgrade_error_' . ( $errors_count + 1 ), $string ); - } elseif ( is_wp_error( $errors ) ) { - foreach ( $errors->get_error_codes() as $error_code ) { - $this->errors->add( $error_code, $errors->get_error_message( $error_code ), $errors->get_error_data( $error_code ) ); - } - } - - parent::error( $errors, ...$args ); - } - - /** - * Stores a log entry. - * - * @since 4.6.0 - * @since 5.3.0 Formalized the existing `...$args` parameter by adding it - * to the function signature. - * - * @param string|array|WP_Error $data Log entry data. - * @param mixed ...$args Optional text replacements. - */ - public function feedback( $data, ...$args ) { - if ( is_wp_error( $data ) ) { - foreach ( $data->get_error_codes() as $error_code ) { - $this->errors->add( $error_code, $data->get_error_message( $error_code ), $data->get_error_data( $error_code ) ); - } - } - - parent::feedback( $data, ...$args ); - } -} |
